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. } }
public void Dispose() { PoolingTimer.Stop(); PoolingTimer.Dispose(); Client.Dispose(); Mutex.Dispose(); }