Exemplo n.º 1
0
        private void radButtonOK_Click(object sender, EventArgs e)
        {
            IAutomation      at = new Automation(new ExcelFileParser(), new ExcelReporter(new ExcelFileParser()), this.pathproject);
            UIAActionManager am = new UIAActionManager(at);

            currentAutomation = at;

            try
            {
                Script startScript = new Script(at.Parser.NewInstance);
                startScript.FileName = this.script;



                at.Name  = "Regression";
                at.Speed = 10;
                if (this.data != null && this.data.Length > 0)
                {
                    Data data = new Data(at.Parser.NewInstance);
                    data.FileName = this.data;

                    at.Data = data;
                }


                at.StartScript = startScript;
                at.Start();

                //----------------------------------

                at.Paused           += at_Paused;
                at.Resumed          += at_Resumed;
                at.Interupted       += at_Interupted;
                at.Ended            += at_Ended;
                at.ActionPerforming += at_ActionPerforming;
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
            }
        }
 /// <summary>
 /// construct an ActionManager
 /// </summary>
 /// <param name="parent">the Automation object</param>
 public ActionManager(Automation parent)
 {
     Parent = parent;
     parent.ActionManagers.Add(this);
     Actions = new Dictionary <string, Action>();
 }
Exemplo n.º 3
0
 /// <summary>
 /// construct an ActionManager
 /// </summary>
 /// <param name="parent">the Automation object</param>
 public ActionManager(Automation parent)
 {
     Parent = parent;
     parent.ActionManagers.Add(this);
     Actions = new Dictionary<string, Action>();
 }
Exemplo n.º 4
0
 private void radMenuItem15_Click(object sender, EventArgs e)
 {
     Automation at = new Automation(new ExcelFileParser(), new ExcelReporter(), @"C:\Users\10110_000\Desktop\Duoc");
     UIAActionManager am = new UIAActionManager(at);
     Script startScript = new Script(at.Parser);
     at.Scripts.Push(startScript);
     at.Start();
 }