Inheritance: Livet.ViewModel
示例#1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            DispatcherHelper.UIDispatcher = Dispatcher;
            //AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            Microsoft.Win32.RegistryKey reg = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", true);
            reg.SetValue("SRNicoNico.exe", 0x00002AF9, Microsoft.Win32.RegistryValueKind.DWord);

            ViewModelRoot = new MainWindowViewModel();
            MainWindow = new MainWindow { DataContext = ViewModelRoot };
            MainWindow.Show();
        }
示例#2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            //UIスレッドのディスパッチャを登録しておく
            DispatcherHelper.UIDispatcher = Dispatcher;
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            //WebBrowserコントロールのIEバージョンを最新にする 古いとUI崩れるからね
            //レジストリを弄るのはここだけ
            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", "SRNicoNico.exe", 0x00002AF8, RegistryValueKind.DWord);
            Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_GPU_RENDERING", "SRNicoNico.exe", 0x00000001, RegistryValueKind.DWord);

            ViewModelRoot = new MainWindowViewModel();
            MainWindow = new MainWindow { DataContext = ViewModelRoot };

            MainWindow.Show();
        }