public void Start() { if (_session == null) { _session = new MSession(); } //TODO: //_nextViewer = User32.SetClipboardViewer(this.Handle); _robot.Deal(null, null); }
private void Answer(MSession session, MRequest request) { if (session.LastInput == request.RawInput) { session.RIndex += 1; } else { session.LastInput = request.RawInput; string t = Regex.Replace(request.RawInput, "\\s+", ""); // 仅数字 if (Regex.IsMatch(t, "^\\d+$")) { return; } // 数学运算 t = Regex.Replace(t, "[\\[\\{(【{]", "("); t = Regex.Replace(t, "[\\]\\})】}]", ")"); if (Regex.IsMatch('(' + t + ')', @"^(((?<o>\()[-+]?(\d+[-+*/])*)+\d+((?<-o>\))([-+*/]\d+)*)+($|[-+*/]))*(?(o)(?!))$")) { return; } session.Question.Clear(); session.QIndex = 0; _DataModel.FindQuestion(session.Question, session.LastInput, session.Style, session.Language, session.Category); if (session.Question.Count < 1) { _Target.SendMessage(session.LastInput); return; } session.Response.Clear(); session.RIndex = 0; _DataModel.FindResponse(session.Response, session.Question[0].P3100103, session.Style, session.Language, session.Category); if (session.Response.Count < 1) { _Target.SendMessage(session.LastInput); return; } } _Target.SendMessage(session.Response[session.RIndex].P3100105); }
public bool Start() { if (_session == null) { _session = new MSession(); } SrcWindow = IntPtr.Zero; SrcControl = IntPtr.Zero; DstWindow = IntPtr.Zero; DstControl = IntPtr.Zero; return Deal(_UserModel.Solution.PreFunction); }
public void Start() { if (_Session == null) { _Session = new MSession(); ShowOptions(EOptions.Default, ""); } if (!_MagicPtn.Visible) { _MagicPtn.Visible = true; } }