private void PerformURLRequest(Guid pageGUID, string url, RequestMethod requestMethod) { var browser = FindBrowser(pageGUID); if (browser == null) { browser = new BrowserForm(ServerGUID.Value, ProcessGUID.Value, pageGUID, url); //Processed as 'GET' browser.FormClosing += Browser_FormClosing; browser.OnJobCompleted += Browser_OnJobCompleted; browser.OnHandlerJobCompleted += Browser_OnHandlerJobCompleted; Browsers.Add(browser); browser.Show(); } else { browser.PerformURLRequest(url, requestMethod); } }
private void Browser_OnJobCompleted(BrowserForm browser, Guid?logElementGUID, JobStatus jobStatus) { if (this.InvokeRequired) { this.Invoke(new MethodInvoker(delegate { textBox1.AppendText(logElementGUID.ToString() + Environment.NewLine); })); } else { textBox1.AppendText(logElementGUID.ToString() + Environment.NewLine); } //MessageBox.Show("Send BrowserJobComplete to player"); //MessageBox.Show($"jobcomplete: logElementGUID={logElementGUID}"); PlayerCommunicationHelper.SetLogElementAsDone(ServerGUID.Value, null, browser.PageGUID, logElementGUID, jobStatus); //, async: false); // NamedPipeHelper.SendBrowserJobComplete(ServerGUID.Value, new NamedPipeBrowserJob() { PageGUID = browser.PageGUID, LogElementGUID = logElementGUID }); }
private LogElementDTO Browser_OnHandlerJobCompleted(BrowserForm browser, LogType logType, string handlerUrl, JobStatus jobStatus) { return(PlayerCommunicationHelper.SetHandlerLogElementAsDone(ServerGUID.Value, browser.PageGUID, logType, handlerUrl, jobStatus)); //, async: false); }
public ScriptManager(BrowserForm form) { _form = form; }