Example #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            //AppContext.SetSwitch("Switch.System.Windows.Input.Stylus.DisableStylusAndTouchSupport", true);
            base.OnStartup(e);

            Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException;
            AppDomain.CurrentDomain.UnhandledException       += CurrentDomain_UnhandledException;
            TaskScheduler.UnobservedTaskException            += TaskScheduler_UnobservedTaskException;
            RemoveTrayIcon();
            AddTrayIcon();

            var win = new LoginWindow();

            win.Closed     += Win_Closed;
            this.MainWindow = win;
            LoginViewModel loginViewModel = win.ViewModel as LoginViewModel;

            loginViewModel.OnLoginSuccess += LoginViewModel_OnLoginSuccess;
            win.Show();
        }
Example #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.login = ((IMClient.LoginWindow)(target));
                return;

            case 2:
                this.btnClose = ((System.Windows.Controls.Button)(target));

            #line 42 "..\..\LoginWindow.xaml"
                this.btnClose.Click += new System.Windows.RoutedEventHandler(this.btnClose_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.gridLayout = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.btnLoginUser = ((IMCustomControls.PopupToggleButton)(target));
                return;

            case 5:
                this.gridHead = ((System.Windows.Controls.Grid)(target));
                return;

            case 6:
                this.elpRing = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 7:
                this.rotateRing = ((System.Windows.Media.RotateTransform)(target));
                return;

            case 8:
                this.btnLogin = ((System.Windows.Controls.Button)(target));
                return;

            case 9:
                this.cbLogining = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 10:
                this.BeginLoading = ((System.Windows.Media.Animation.BeginStoryboard)(target));
                return;

            case 11:
                this.sp_Error = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 12:
                this.BdIcon = ((System.Windows.Controls.Border)(target));
                return;

            case 13:
                this.pathIcon = ((System.Windows.Controls.Image)(target));
                return;

            case 14:
                this.txb_ErrorTip = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 15:
                this.txb_Delete = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 16:
                this.sp_Error2 = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 17:
                this.bd_Error = ((System.Windows.Controls.Border)(target));
                return;

            case 18:
                this.img_Error = ((System.Windows.Controls.Image)(target));
                return;

            case 19:
                this.controlQR = ((System.Windows.Controls.ContentControl)(target));
                return;
            }
            this._contentLoaded = true;
        }