public HomePage() { int BrowserVer, RegVal; try { // get the installed IE version using (WebBrowser Wb = new WebBrowser()) BrowserVer = Wb.Version.Major; // set the appropriate IE version if (BrowserVer >= 11) { RegVal = 11001; } else if (BrowserVer == 10) { RegVal = 10001; } else if (BrowserVer == 9) { RegVal = 9999; } else if (BrowserVer == 8) { RegVal = 8888; } else { RegVal = 7000; } // set the actual key using (RegistryKey Key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", RegistryKeyPermissionCheck.ReadWriteSubTree)) if (Key.GetValue(System.Diagnostics.Process.GetCurrentProcess().ProcessName + ".exe") == null) { Key.SetValue(System.Diagnostics.Process.GetCurrentProcess().ProcessName + ".exe", RegVal, RegistryValueKind.DWord); } //SetBrowserFeatureControl(); } catch (Exception e) { Console.WriteLine(e); } InitializeComponent(); //banner.LoadCompleted += new System.Windows.Navigation.LoadCompletedEventHandler(WebBrowser_LoadCompletedAsync); if (DataContext is MainViewModel vm) { vm.Refreshed += () => { AudioDropdown.Shake(); VideoWriterComboBox.Shake(); }; } }
public HomePage() { InitializeComponent(); if (DataContext is MainViewModel vm) { vm.Refreshed += () => AudioDropdown.Shake(); } }
public VideoPage() { InitializeComponent(); if (DataContext is MainViewModel vm) { vm.Refreshed += () => { AudioDropdown.Shake(); VideoWriterComboBox.Shake(); }; } }