Ejemplo n.º 1
0
 private BatchScripter.ScriptingArgs PrepareWorkerThreadArgs()
 {
     BatchScripter.ScriptingArgs args = new BatchScripter.ScriptingArgs();
     args.Objects        = objList.SelectedObjects;
     args.Options        = _options;
     args.BatchSeparator = edtBatchSep.Text;
     return(args);
 }
Ejemplo n.º 2
0
        private void StartScripting()
        {
            gbError.Visible = false;

            ResetProgressInfo();

            if (!PromptForFileName())
            {
                return;
            }

            BatchScripter.ScriptingArgs args = PrepareWorkerThreadArgs();

            wizardControl1.BackButtonEnabled = false;
            wizardControl1.NextButtonEnabled = false;

            PrepareScripter();
            StartTimer();

            bw.RunWorkerAsync(args);
        }
Ejemplo n.º 3
0
        private void bw_DoWork(object sender, DoWorkEventArgs e)
        {
            BatchScripter.ScriptingArgs args = e.Argument as BatchScripter.ScriptingArgs;
            _isScripting = true;

            ScripterResult result = new ScripterResult();

            try
            {
                result.Content = _scripter.ScriptObjects(args);
            }
            catch (Exception ex)
            {
                result.Error = ex;
            }
            finally
            {
                e.Cancel            = _scripter.CancelRequested;
                result.RecentErrors = _scripter.RecentErrors;
                e.Result            = result;
            }
        }