示例#1
0
        public W40080(string programID, string programName) : base(programID, programName)
        {
            InitializeComponent();
            this.Text = _ProgramID + "─" + _ProgramName;

            dao40080 = new D40080();
            daoSP2   = new SP2();
        }
示例#2
0
        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);
            }
        }
示例#3
0
        private void SendBreak_Click(object sender, RoutedEventArgs e)
        {
            MenuItem menu = (MenuItem)sender;

            if (menu.Name.Contains("2"))
            {
                SP2.SendBreak();
            }
            else
            {
                SP1.SendBreak();
            }
        }
示例#4
0
        private void Clear_Serial1_Click(object sender, RoutedEventArgs e)
        {
            MenuItem menu = (MenuItem)sender;

            if (menu.Header.ToString() == "Clear Left")
            {
                SP1.ClearDisplay();
            }
            else
            {
                SP2.ClearDisplay();
            }
        }
示例#5
0
 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
     { }
 }
示例#6
0
        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);
            }
        }
示例#7
0
 private void ClosePorts()
 {
     SP1.Close_Port();
     SP2.Close_Port();
 }
示例#8
0
 private void Clear_All_Click(object sender, RoutedEventArgs e)
 {
     SP1.ClearDisplay();
     SP2.ClearDisplay();
 }
示例#9
0
 public static void DestLae() => SP2.ExecuteQuery();