File tree Expand file tree Collapse file tree 2 files changed +19
-23
lines changed
External/Plugins/StartPage Expand file tree Collapse file tree 2 files changed +19
-23
lines changed Original file line number Diff line number Diff line change 12
12
using ProjectManager ;
13
13
using StartPage . Controls ;
14
14
using WeifenLuo . WinFormsUI . Docking ;
15
- using Microsoft . Win32 ;
16
15
17
16
namespace StartPage
18
17
{
@@ -102,7 +101,6 @@ public void Initialize()
102
101
this . InitBasics ( ) ;
103
102
this . LoadSettings ( ) ;
104
103
this . AddEventHandlers ( ) ;
105
- this . UseLatestBrowserControl ( ) ;
106
104
this . CreateMenuItem ( ) ;
107
105
}
108
106
@@ -198,24 +196,6 @@ public void AddEventHandlers()
198
196
EventManager . AddEventHandler ( this , EventType . RestoreSession ) ;
199
197
}
200
198
201
- /// <summary>
202
- /// Sets a key in registry so that latest .NET browser control is used
203
- /// </summary>
204
- private void UseLatestBrowserControl ( )
205
- {
206
- try
207
- {
208
- String valueName = DistroConfig . DISTRIBUTION_NAME + ".exe" ;
209
- String subKey = "Software\\ Microsoft\\ Internet Explorer\\ Main\\ FeatureControl\\ FEATURE_BROWSER_EMULATION\\ " ;
210
- RegistryKey emu = Registry . CurrentUser . OpenSubKey ( subKey , true ) ;
211
- {
212
- Object value = emu . GetValue ( valueName ) ;
213
- if ( value == null ) emu . SetValue ( valueName , 0 , RegistryValueKind . DWord ) ;
214
- }
215
- }
216
- catch { } // No errors please...
217
- }
218
-
219
199
/// <summary>
220
200
/// Loads the plugin settings
221
201
/// </summary>
Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Text ;
3
2
using System . Drawing ;
4
3
using System . Windows . Forms ;
5
4
using System . ComponentModel ;
6
- using System . Collections . Generic ;
7
5
using PluginCore . Localization ;
8
- using PluginCore . Controls ;
9
6
using PluginCore . Helpers ;
10
7
using PluginCore ;
8
+ using Microsoft . Win32 ;
9
+ using System . Reflection ;
10
+ using System . IO ;
11
11
12
12
namespace FlashDevelop . Controls
13
13
{
@@ -21,6 +21,22 @@ public class Browser : UserControl
21
21
private System . Windows . Forms . ToolStripSpringComboBox addressComboBox ;
22
22
private FlashDevelop . Controls . WebBrowserEx webBrowser ;
23
23
24
+ static Browser ( )
25
+ {
26
+ try
27
+ {
28
+ // Sets a key in registry so that latest .NET browser control is used
29
+ String valueName = Path . GetFileName ( Application . ExecutablePath ) ;
30
+ String subKey = "Software\\ Microsoft\\ Internet Explorer\\ Main\\ FeatureControl\\ FEATURE_BROWSER_EMULATION\\ " ;
31
+ RegistryKey emu = Registry . CurrentUser . OpenSubKey ( subKey , true ) ;
32
+ {
33
+ Object value = emu . GetValue ( valueName ) ;
34
+ if ( value == null ) emu . SetValue ( valueName , 0 , RegistryValueKind . DWord ) ;
35
+ }
36
+ }
37
+ catch { } // No errors please...
38
+ }
39
+
24
40
public Browser ( )
25
41
{
26
42
this . Font = Globals . Settings . DefaultFont ;
You can’t perform that action at this time.
0 commit comments