private void InputTextBox_TextEntered(string str) { if (string.IsNullOrEmpty(str)) { Close(); return; } if (this.serverButton.IsChecked == true) { if (GameData.Data.User != null) { var msg = new IPExpressionMessage(str); GameData.Data.User.Send(msg); } } else if (this.clientButton.IsChecked == true) { if (m_ipRunner == null) { m_ipRunner = new IPRunner(Writer); } m_ipRunner.Exec(str); } else { throw new Exception(); } }
void ReceiveMessage(IPExpressionMessage msg) { //trace.TraceInformation("IPExpressionMessage {0}", msg.Script); if (m_ipStartTask != null) { m_ipStartTask.Wait(); } if (m_ipRunner != null) { m_ipRunner.ExecExpr(msg.Script); } else { Send(new Messages.IPOutputMessage() { Text = "IronPython not enabled" }); } }