protected override void OnClosing(CancelEventArgs e)
 {
     if (IsRealyClosingApp)
     {
         appvm.Close();
     }
     else
     {
         if (appvm.IsUnlocked)
         {
             e.Cancel            = true;
             m_storedWindowState = WindowState;
             Hide();
             if (m_notifyIcon != null)
             {
                 m_notifyIcon.Visible = true;
                 if (baloonShow)
                 {
                     baloonShow = false;
                     m_notifyIcon.ShowBalloonTip(2000);
                 }
             }
         }
     }
     base.OnClosing(e);
 }
Esempio n. 2
0
        private void CloseCommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            LogFileViewModel logFile;

            logFile = e.Parameter as LogFileViewModel;
            if (logFile != null)
            {
                appViewModel.Close(logFile);
            }
        }