private void DealwithCmd() { string s = GetCommandLine().Trim(); if (s != "") { if (s.ToUpper().StartsWith("PRINT")) { string[] splits = Regex.Split(s, @"\s{1,}"); if (splits.Length != 3) { throw new Exception("PRINT格式不对"); } Packet c = new PrintPacket(splits[1], splits[2], CmdCB); c.EcChannel = ec; c.Send(); } else { CmdPacket c = new CmdPacket(s, CmdCB); c.EcChannel = ec; c.Send(); } } else { richTextBox1.Text += "\r\n" + "请检查命令格式!"; richTextBox1.Text += "\r\n" + (char)9632; } }
public void GetFlights(string s) { CmdPacket c = new CmdPacket(s, CmdCB, new CmdResultEvaluator(EvaluatorAVH), null); c.EcChannel = ec; c.Send(); //ec.SendCmd(c); }
public void RTWithNMAndPrice(string s) { CmdPacket c = new CmdPacket(s, CmdCB, new CmdResultEvaluator(EvaluatorTeamNM), null); c.EcChannel = ec; c.Send(); //ec.SendCmd(c); }
private void DealwithCmd() { string s = GetCommandLine().Trim(); if (s != "") { if (s.ToUpper().StartsWith("PRINT")) { string[] splits=Regex.Split(s,@"\s{1,}"); if (splits.Length != 3) { throw new Exception("PRINT格式不对"); } Packet c = new PrintPacket(splits[1], splits[2], CmdCB); c.EcChannel = ec; c.Send(); } else { CmdPacket c = new CmdPacket(s, CmdCB); c.EcChannel = ec; c.Send(); } } else { richTextBox1.Text += "\r\n" + "请检查命令格式!"; richTextBox1.Text += "\r\n" + (char)9632; } }