Пример #1
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();
        }
Пример #2
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();
 }
Пример #3
0
 public CredentialsWindow(ViewModel.MainViewModel vm)
 {
     this.DataContext = vm;
     InitializeComponent();
 }