public W40080(string programID, string programName) : base(programID, programName) { InitializeComponent(); this.Text = _ProgramID + "─" + _ProgramName; dao40080 = new D40080(); daoSP2 = new SP2(); }
private void CommandList_MouseDoubleClick(object sender, MouseButtonEventArgs e) { string text = ""; ListBox commandlist = (ListBox)sender; if (commandlist.SelectedItem != null) { text = (string)commandlist.SelectedItem + "\r\n"; SP2.SendData(text); } }
private void SendBreak_Click(object sender, RoutedEventArgs e) { MenuItem menu = (MenuItem)sender; if (menu.Name.Contains("2")) { SP2.SendBreak(); } else { SP1.SendBreak(); } }
private void Clear_Serial1_Click(object sender, RoutedEventArgs e) { MenuItem menu = (MenuItem)sender; if (menu.Header.ToString() == "Clear Left") { SP1.ClearDisplay(); } else { SP2.ClearDisplay(); } }
private void treeView_MouseDoubleClick(object sender, MouseButtonEventArgs e) { try { var tree = sender as TreeView; CMDNode item = tree.SelectedItem as CMDNode; if (item.ID == 2) { SP2.SendData(item.NodeName); } } catch { } }
private void HexDisplayChecked(object sender, RoutedEventArgs e) { CheckBox checkbox = (CheckBox)sender; bool state = (bool)(checkbox.IsChecked); if (checkbox.Name.Contains("1")) { SP1.ShowHexString(state); } else { SP2.ShowHexString(state); } }
private void ClosePorts() { SP1.Close_Port(); SP2.Close_Port(); }
private void Clear_All_Click(object sender, RoutedEventArgs e) { SP1.ClearDisplay(); SP2.ClearDisplay(); }
public static void DestLae() => SP2.ExecuteQuery();