private void Window_Closed(object sender, EventArgs e)
        {
            MouseKeyboardEventHandler.UnInit();
            MouseKeyboardHook.StopHook();
            s_mainWin = null;

            System.Windows.Interop.HwndSource.FromHwnd(s_windowHandle).RemoveHook(RunOnUiThread);

            AppInsights.LogEvent("Window_Closed");
        }
Exemple #2
0
        public static void UnInit()
        {
            MouseKeyboardHook.StopHook();

            if (s_timerFromPoint != null)
            {
                s_timerFromPoint.Stop();
                s_timerFromPoint.Elapsed -= OnTimedEvent;
                s_timerFromPoint.Close();
                s_timerFromPoint = null;
            }

            s_eventRecordNow.Reset();

            s_eventQuitRecording.Set();
            if (s_threadRecorder != null)
            {
                s_threadRecorder.Join(1000);
                s_threadRecorder = null;
            }
        }