private void Button_Click_1(object sender, RoutedEventArgs e) { SessionEditor se = new SessionEditor(); se.ShowDialog(); this.Close(); }
public void EndSession(string reason) { ShouldForceStop = false; TaskIsRunning = false; if (reason != "") { SessionEditor.Log(LogType.Message, "Session End. Reason : " + reason); } }
public HtmlNode GetSingleElement(string xpath) { try { return(Document.DocumentNode.SelectSingleNode(xpath)); } catch (Exception e) { SessionEditor.Log(LogType.Error, "XPath Error : {0}" + e.Message); } return(null); }
public HtmlNodeCollection GetMultipleElements(string xpath) { try { return(Document.DocumentNode.SelectNodes(xpath)); } catch (Exception e) { SessionEditor.Log(LogType.Error, "XPath Error : {0}" + e.Message); } return(null); }
public void RenderToPng() { if (View.InvokeRequired) { InvokeWithoutArguments(new Action(RenderToPng)); return; } bool isSaved = ((BitmapSurface)View.Surface).SaveToPNG(sDebugPNGSavePath); SessionEditor.Log(LogType.Debug, "Saving status : " + isSaved); if (isSaved && File.Exists(sDebugPNGSavePath)) { Process.Start(sDebugPNGSavePath); } }
public void StartSession(string reason) { if (RestartOnError == false) { RestartOnError = true; } CurrentTaskIndex = 0; ClearVariables(); TaskIsRunning = true; if (reason != "") { SessionEditor.Log(LogType.Message, "Session starting. Reason : " + reason); } _functionalElements.ElementAt(0).StartTask(null); }
public bool LoadUrl(string url) { if (View.InvokeRequired) { return((bool)InvokeWithoutArguments(new Func <bool>(() => LoadUrl(url)))); } try { var uri = new Uri(url); isLoading = true; View.Source = uri; return(true); } catch (Exception e) { SessionEditor.Log(LogType.Error, "URL Validator Error : " + e.Message); } return(false); }