Ejemplo n.º 1
0
        //_________________________________________________________________________________________________________
        //_________________________________________________________________________________________________________
        private void cTimerNext_Tick(object sender, EventArgs e)
        {
            cTimerNext.Enabled = false;
            if (cLstMacros.Text == "")
            {
                return;
            }
            if (mh == null)
            {
                return;
            }

            MacroHelper.Running = false;
            if (!MacroHelper.MustCallBack)
            {
                return;
            }
            MacroHelper.MustCallBack = false;
            if (MacroHelper.NextScriptName == "")
            {
                MacroHelper.NextScriptName = MacroHelper.GetSelectedMacroPath(cLstMacros);
            }

            mh.ExecMacroNextSectionAfterAsyncCall(MacroHelper.NextScriptName);
        }
Ejemplo n.º 2
0
        //_________________________________________________________________________________________________________
        //_________________________________________________________________________________________________________
        private void mExecMacro_Click(object sender, EventArgs e)
        {
            if (cLstMacros.Text == "")
            {
                return;
            }
            mExecMacro.Enabled = false;

            MacroHelper.Running        = false;
            MacroHelper.ExecName       = "";
            MacroHelper.NextScriptName = "";
            MacroHelper.MustCallBack   = false;

            if (mh == null)
            {
                mh = new MacroHelper(this, dgValues);
            }
            if (MacroHelper.AboutConditions(cMaxRunProfiles))
            {
                string sMacro = MacroHelper.NewAboutMacro();
                mh.ExecMacro(sMacro);
                File.Delete(sMacro);
            }
            else
            {
                mh.ExecMacro(MacroHelper.GetSelectedMacroPath(cLstMacros));
            }
            //mExecMacro.Enabled = true; // It is not activated till the end of macro execution
        }
Ejemplo n.º 3
0
        //_________________________________________________________________________________________________________
        //_________________________________________________________________________________________________________
        private void mEditMacro_Click(object sender, EventArgs e)
        {
            string sMacroPath = MacroHelper.GetSelectedMacroPath(cLstMacros);

            if (Control.ModifierKeys == Keys.Control)
            {
                sMacroPath = MacroHelper.NewMacro((File.Exists(sMacroPath) ? "" : sMacroPath));
                MacroHelper.LoadMacroList(cLstMacros);
            }

            try { System.Diagnostics.Process.Start(sMacroPath); }
            catch (Exception) { }
        }
Ejemplo n.º 4
0
        //_________________________________________________________________________________________________________
        //_________________________________________________________________________________________________________
        private void mExecCustomMenu_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem MnuItem    = (ToolStripMenuItem)sender;
            string            sMacroName = MacroHelper.GetSelectedMacroPath(MnuItem.Tag.ToString());

            if (!File.Exists(sMacroName))
            {
                return;
            }

            mExecMacro.Enabled = false;

            MacroHelper.Running        = false;
            MacroHelper.ExecName       = "";
            MacroHelper.NextScriptName = "";
            MacroHelper.MustCallBack   = false;

            if (mh == null)
            {
                mh = new MacroHelper(this, dgValues);
            }
            mh.ExecMacro(sMacroName);
            //mExecMacro.Enabled = true; // It is not activated till the end of macro execution
        }