private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            SessionEditor se = new SessionEditor();

            se.ShowDialog();
            this.Close();
        }
示例#2
0
 public void EndSession(string reason)
 {
     ShouldForceStop = false;
     TaskIsRunning   = false;
     if (reason != "")
     {
         SessionEditor.Log(LogType.Message, "Session End. Reason : " + reason);
     }
 }
示例#3
0
 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);
 }
示例#4
0
 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);
            }
        }
示例#6
0
 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);
 }