private void btnWritePowerDownSeq_Click(object sender, RoutedEventArgs e) { Screen screen = (Screen)cmbxScreenList.SelectedItem; PowerSequence seq = new PowerSequence(); seq.VPOS = (PowerStrobe)byte.Parse(((ListBoxItem)cmbxPowerDownSeqVPOS.SelectedItem).Uid); seq.VNEG = (PowerStrobe)byte.Parse(((ListBoxItem)cmbxPowerDownSeqVNEG.SelectedItem).Uid); seq.VDDH = (PowerStrobe)byte.Parse(((ListBoxItem)cmbxPowerDownSeqVDDH.SelectedItem).Uid); seq.VEE = (PowerStrobe)byte.Parse(((ListBoxItem)cmbxPowerDownSeqVEE.SelectedItem).Uid); screen.PowerDownSequence = seq; }
private void btnReadPowerDownSeq_Click(object sender, RoutedEventArgs e) { Screen screen = (Screen)cmbxScreenList.SelectedItem; PowerSequence seq = screen.PowerDownSequence; foreach (ListBoxItem item in cmbxPowerDownSeqVPOS.Items) { if (item.Uid == ((byte)seq.VPOS).ToString()) { cmbxPowerDownSeqVPOS.SelectedItem = item; } } foreach (ListBoxItem item in cmbxPowerDownSeqVNEG.Items) { if (item.Uid == ((byte)seq.VNEG).ToString()) { cmbxPowerDownSeqVNEG.SelectedItem = item; } } foreach (ListBoxItem item in cmbxPowerDownSeqVDDH.Items) { if (item.Uid == ((byte)seq.VDDH).ToString()) { cmbxPowerDownSeqVDDH.SelectedItem = item; } } foreach (ListBoxItem item in cmbxPowerDownSeqVEE.Items) { if (item.Uid == ((byte)seq.VEE).ToString()) { cmbxPowerDownSeqVEE.SelectedItem = item; } } }