private void btnRecord_Click(object sender, RoutedEventArgs e) { SelectChangedSource = UiSelectChangedSource.SelectChangeFinished; if (IsRecording == false) { MouseKeyboardEventHandler.Init(); btnRecord.Content = "Pause"; textBoxRecording.Text = "Recording"; gridTextRecording.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0, 0)); IsRecording = true; AppInsights.LogEvent("Record"); } else { IsRecording = false; MouseKeyboardEventHandler.UnInit(); btnRecord.Content = "Record"; textBoxRecording.Text = ""; gridTextRecording.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF)); AddInspectUi(null); // remove last Inspect node AppInsights.LogEvent("Pause"); } }
private void Window_Closed(object sender, EventArgs e) { MouseKeyboardEventHandler.UnInit(); MouseKeyboardHook.StopHook(); System.Windows.Interop.HwndSource.FromHwnd(windowHandle).RemoveHook(XmlNodePathRecorder.ProcessMessage); s_mainWin = null; }
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"); }
private void btnRecord_Click(object sender, RoutedEventArgs e) { SelectChangedSource = UiSelectChangedSource.SelectChangeFinished; if (IsRecording == false) { try { //Start Application Under Test var app = new Winium.Cruciatus.Application(txtAppAddress.Text); app.Start(); //****** MouseKeyboardEventHandler.Init(); btnRecord.Content = "Pause"; textBoxRecording.Text = "Recording"; gridTextRecording.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0, 0)); IsRecording = true; AppInsights.LogEvent("Record"); } catch (Exception) { MessageBox.Show("The application under test does not exists"); } } else { IsRecording = false; MouseKeyboardEventHandler.UnInit(); btnRecord.Content = "Start"; textBoxRecording.Text = ""; gridTextRecording.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF)); AddInspectUi(null); // remove last Inspect node AppInsights.LogEvent("Pause"); } }