예제 #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();
 }