public FrmIceWebAutomation() { InitializeComponent(); objFrmInputParams = new FrmInputParams(); objFrmInputParams.Owner = this; objFrmInputInvokeScript = new FrmInputInvokeScript(); objFrmInputInvokeScript.Owner = this; objFrmInputImgInfo = new FrmInputImgInfo(); objFrmInputImgInfo.Owner = this; objFrmShowImage = new FrmShowImage(); objFrmShowImage.Owner = this; }
public CommandQueue(string TaskScript, WebBrowser wb, FrmShowImage objShowImg, Control ctrl) { control = ctrl; //Commands.Clear(); ProceQueue.Clear(); string BodyText = TaskScript; string[] CL = BodyText.Split(';'); foreach (string LineText in CL) { IEvent e = new Event(); Regex r = new Regex(@"[a-z]*\(", RegexOptions.IgnoreCase); Match m = r.Match(LineText.Trim()); if (m.Success) { e.Webbrowser = wb; e.Detail = LineText.Trim(); e.ShowImageForm = objShowImg; e.Command = CommandHelper.GetCommandByName(m.Value.Remove(m.Value.Length - 1, 1)); r = new Regex(@"\([\s\S]*\)", RegexOptions.IgnoreCase); m = r.Match(LineText.Trim()); if (m.Success) { string ts = m.Value.Remove(m.Value.Length - 1, 1); ts = ts.Remove(0, 1); string[] sl = ts.Split(','); foreach (string s in sl) { e.Data.Add(s); } //Commands.Add(e); ProceQueue.Add(e, CommandHelper.GetHandleByCommand(e.Command)); } } } }