/// <summary> /// Select a specified resolution from the data grid /// </summary> /// <param name="sender">UI class originating the message</param> /// <param name="e">Event args</param> private void DataGrid_CurrentCellChanged(object sender, EventArgs e) { VID117CTC1 module = this.DataContext as VID117CTC1; DataGrid dg = sender as DataGrid; DataGridCellInfo dgci = dg.CurrentCell; VID117CTC1.ICableResList resList = dgci.Item as VID117CTC1.ICableResList; DataGridColumn column = dgci.Column; if (column != null) { int index = column.DisplayIndex; module.Reposition(resList, index); } }
/// <summary> /// Select the HDMI cable /// </summary> /// <param name="sender">UI class originating the message</param> /// <param name="e">Routed event args</param> private void SelectHDMI(object sender, RoutedEventArgs e) { VID117CTC1 module = this.DataContext as VID117CTC1; module.SetCable(VID117.CableType.HDMI); }
/// <summary> /// Confirm a resolution/format/cable as real bad (Catastrophic) /// </summary> /// <param name="sender">UI class originating the message</param> /// <param name="e">Routed event args</param> private void Catastrophic(object sender, RoutedEventArgs e) { VID117CTC1 module = this.DataContext as VID117CTC1; module.ConfirmCable("real bad"); }
/// <summary> /// Confirm a resolution/format/cable as bad /// </summary> /// <param name="sender">UI class originating the message</param> /// <param name="e">Routed event args</param> private void LooksBad(object sender, RoutedEventArgs e) { VID117CTC1 module = this.DataContext as VID117CTC1; module.ConfirmCable("bad"); }
/// <summary> /// Move to the next page /// </summary> /// <param name="sender">UI class originating the message</param> /// <param name="e">Routed event args</param> private void TestCable(object sender, RoutedEventArgs e) { VID117CTC1 module = this.DataContext as VID117CTC1; module.TestCable(); }
/// <summary> /// Move to the next page /// </summary> /// <param name="sender">UI class originating the message</param> /// <param name="e">Routed event args</param> private void NextPage(object sender, RoutedEventArgs e) { VID117CTC1 module = this.DataContext as VID117CTC1; module.NextPage(); }
/// <summary> /// Initializes a new instance of the <see cref="VID117CTC1UI" /> class. /// </summary> /// <param name="module">The module class associated with this UI</param> public VID117CTC1UI(VID117CTC1 module) { this.InitializeComponent(); this.DataContext = module; }