Beispiel #1
0
 protected override void OnStartup(StartupEventArgs e)
 {
     Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;
     var window = new diags.LoginWindow();
     bool? dialogResult = window.ShowDialog();
     if ((dialogResult.HasValue == true) &&
         (dialogResult.Value == true))
     {
         base.OnStartup(e);
         Current.ShutdownMode = ShutdownMode.OnMainWindowClose;
     }
     else
     {
         this.Shutdown();
     }
 }
Beispiel #2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;
            var  window       = new diags.LoginWindow();
            bool?dialogResult = window.ShowDialog();

            if ((dialogResult.HasValue == true) &&
                (dialogResult.Value == true))
            {
                base.OnStartup(e);
                Current.ShutdownMode = ShutdownMode.OnMainWindowClose;
            }
            else
            {
                this.Shutdown();
            }
        }