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)); } } }
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 = ""; }