Пример #1
0
 private void IrSendText_Initiate()
 {
     if (File.Exists(IRCmdsPath))
     {
         StreamReader sr = new StreamReader(IRCmdsPath, Encoding.Default);
         String       line;
         while ((line = sr.ReadLine()) != null)
         {
             IrSendTextBox.AddItem(new AutoCompleteEntry(line, null));
         }
     }
 }
Пример #2
0
        public void IrSend_Click(object sender, RoutedEventArgs e)
        {
            String S = IrSendTextBox.Text;

            if (S == "")
            {
                return;
            }

            IrSendTextBox.AddItem(new AutoCompleteEntry(S, null));

            if (irRobot.IsConnected)
            {
                irRobot.SendCmd(S);
            }
            else
            {
                AppLog.Error("IrRobot didn't connected");
            }

            IrSendTextBox.Text = "";
        }