Пример #1
0
 /// <summary>
 /// Resumes notifications for requests to display scanners.
 /// The parameter controls whether this should detect which
 /// window is currently active.
 /// </summary>
 /// <param name="getActiveWindow"></param>
 public void ResumePanelChangeRequests(bool getActiveWindow = true)
 {
     _panelChangeNotifications.Release();
     if (getActiveWindow)
     {
         WindowActivityMonitor.GetActiveWindowAsync();
     }
 }
Пример #2
0
        /// <summary>
        /// Talk window form closed. Notify subscribers and
        /// restore focus to the application window that at
        /// the top of the Z order
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="e">event args</param>
        private void _talkWindowForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            Log.Debug("********* Calling EXiting all frames");
            System.Windows.Threading.Dispatcher.ExitAllFrames();
            System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvokeShutdown(System.Windows.Threading.DispatcherPriority.Background);

            Log.Debug("appquit: " + PanelManagement.Context.AppQuit);

            if (!PanelManagement.Context.AppQuit)
            {
                if (EvtTalkWindowClosed != null)
                {
                    EvtTalkWindowClosed(this, new EventArgs());
                }

                EnumWindows.RestoreFocusToTopWindow();
                WindowActivityMonitor.GetActiveWindowAsync();
            }

            Log.Debug("Exiting");
        }
Пример #3
0
        /// <summary>
        /// Talk window form closed. Notify subscribers and
        /// restore focus to the application window that at
        /// the top of the Z order
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="e">event args</param>
        private void _talkWindowForm_FormClosed(object sender, FormClosedEventArgs e)
        {
#if TALKWINDOW_DISPATCHER_THREAD

            Log.Debug("********* Calling EXiting all frames");
            System.Windows.Threading.Dispatcher.ExitAllFrames();
            System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvokeShutdown(System.Windows.Threading.DispatcherPriority.Background);
#endif
            Log.Debug("appquit: " + Context.AppQuit);

            if (!Context.AppQuit)
            {
                if (EvtTalkWindowClosed != null)
                {
                    EvtTalkWindowClosed(this, new EventArgs());
                }

                //Context.AppPanelManager.CloseCurrentForm();
                EnumWindows.RestoreFocusToTopWindowOnDesktop();
                WindowActivityMonitor.GetActiveWindowAsync();
            }

            Log.Debug("Exiting");
        }