Beispiel #1
0
        private static void OpenKeyboard()
        {
            if (_currentProcess != null)
            {
                return;
            }

            try
            {
                _currentProcess = Process.Start(new ProcessStartInfo
                {
                    FileName        = OnScreenKeyboardCommand,
                    Verb            = "runas", // UAC prompt
                    UseShellExecute = true,
                });

                PoolingTimer.PoolUntilTrue(
                    IsKeyboardClosed,
                    OnKeyboardClosed,
                    TimeSpan.FromMilliseconds(700),
                    TimeSpan.FromMilliseconds(50));
            }
            catch (Exception)
            {
                // Ignore.
            }
        }
Beispiel #2
0
        public void Dispose()
        {
            PoolingTimer.Stop();
            PoolingTimer.Dispose();

            Client.Dispose();

            Mutex.Dispose();
        }