private void ThemeButton_Click(object sender, RoutedEventArgs e) { if (themeWindow != null) { themeWindow = null; } themeWindow = new ThemeWindow(); themeWindow.Show(); }
public MainWindow() { themeWindow = new ThemeWindow(); vm = new ViewModel.MainViewModel(); this.DataContext = vm; vm.RequestPosted += new EventHandler(delegate(object o, EventArgs e) { this.Dispatcher.Invoke((Action)(() => { if (vm.Response != null && vm.Response != "") { HideScriptErrors(this.WebBrowserView, true); WebBrowserView.NavigateToString(vm.Response.ToString()); } })); }); ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); }; InitializeComponent(); }
public MainWindow() { themeWindow = new ThemeWindow(); vm = new ViewModel.MainViewModel(); this.DataContext = vm; vm.RequestPosted += new EventHandler(delegate (object o, EventArgs e) { this.Dispatcher.Invoke((Action)(() => { if (vm.Response != null && vm.Response != "") { HideScriptErrors(this.WebBrowserView, true); WebBrowserView.NavigateToString(vm.Response.ToString()); } })); }); ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; InitializeComponent(); }