示例#1
0
 private void ThemeButton_Click(object sender, RoutedEventArgs e)
 {
     if (themeWindow != null)
     {
         themeWindow = null;
     }
     themeWindow = new ThemeWindow();
     themeWindow.Show();
 }
示例#2
0
 private void ThemeButton_Click(object sender, RoutedEventArgs e)
 {
     if (themeWindow != null)
     {
         themeWindow = null;
     }
     themeWindow = new ThemeWindow();
     themeWindow.Show();
 }
示例#3
0
        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();
        }
示例#4
0
 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();
 }