/// <summary> /// Event handler for previewing loss of keyboard focus /// </summary> /// <param name="sender">The UI element originating this event</param> /// <param name="e">Routed event args</param> private void StackPanel_PreviewLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) { PER033CTC1 module = this.DataContext as PER033CTC1; e.Handled = module.KeyboardIsCaptured; }
/// <summary> /// Event handler for clicking on Y /// </summary> /// <param name="sender">The UI element originating this event</param> /// <param name="e">Routed event args</param> private void Y_Click(object sender, RoutedEventArgs e) { PER033CTC1 module = this.DataContext as PER033CTC1; module.SendControllerButton(XboxAutomationButtonFlags.Y_Button); }
/// <summary> /// Advance to the next page /// </summary> /// <param name="sender">UI Element originating this event</param> /// <param name="e">Routed event args</param> private void NextPage(object sender, RoutedEventArgs e) { PER033CTC1 module = this.DataContext as PER033CTC1; module.NextPage(); }
/// <summary> /// Event handler for failing fourth test /// </summary> /// <param name="sender">The UI element originating this event</param> /// <param name="e">Routed event args</param> private void Fail4_Click(object sender, RoutedEventArgs e) { PER033CTC1 module = this.DataContext as PER033CTC1; module.FailStep(4); }
/// <summary> /// Event handler for passing third test /// </summary> /// <param name="sender">The UI element originating this event</param> /// <param name="e">Routed event args</param> private void Pass3_Click(object sender, RoutedEventArgs e) { PER033CTC1 module = this.DataContext as PER033CTC1; module.PassStep(3); }
/// <summary> /// Event handler for clicking on Right Trigger /// </summary> /// <param name="sender">The UI element originating this event</param> /// <param name="e">Routed event args</param> private void RightTrigger_Click(object sender, RoutedEventArgs e) { PER033CTC1 module = this.DataContext as PER033CTC1; module.SendControllerLeftTrigger(); }
/// <summary> /// Initializes a new instance of the <see cref="PER033CTC1UI" /> class. /// </summary> /// <param name="module">The module class associated with this UI</param> public PER033CTC1UI(PER033CTC1 module) { this.InitializeComponent(); this.DataContext = module; }