Exemple #1
0
        protected static NewSBEEventEW defineFrom(OldSBEEventEW evt)
        {
            NewSBEEventEW ret = (NewSBEEventEW)defineFrom((OldSBEEvent)evt);

            ret.Codes       = evt.codes;
            ret.IsWhitelist = evt.isWhitelist;
            return(ret);
        }
Exemple #2
0
        protected static NewSBEEvent defineFrom(OldSBEEvent evt)
        {
            NewSBEEventEW ret = new NewSBEEventEW();

            ret.Caption             = evt.caption;
            ret.Enabled             = evt.enabled;
            ret.IgnoreIfBuildFailed = evt.buildFailedIgnore;
            ret.Name              = "Act1";
            ret.Process.Hidden    = evt.processHide;
            ret.Process.Waiting   = evt.waitForExit;
            ret.SupportMSBuild    = evt.parseVariablesMSBuild;
            ret.SupportSBEScripts = true;
            ret.ToConfiguration   = evt.toConfiguration;

            if (evt.mode == Events.TModeCommands.File)
            {
                ret.Mode = new ModeFile();
                ((IModeFile)ret.Mode).Command = evt.command;
            }
            else if (evt.mode == Events.TModeCommands.Interpreter)
            {
                ret.Mode = new ModeInterpreter();
                ((IModeInterpreter)ret.Mode).Command = evt.command;
                ((IModeInterpreter)ret.Mode).Handler = evt.interpreter;
                ((IModeInterpreter)ret.Mode).Newline = evt.newline;
                ((IModeInterpreter)ret.Mode).Wrapper = evt.wrapper;
            }
            else if (evt.mode == Events.TModeCommands.Operation)
            {
                ret.Mode = new ModeOperation();
                ((IModeOperation)ret.Mode).AbortOnFirstError = evt.dteExec.abortOnFirstError;
                ((IModeOperation)ret.Mode).Caption           = evt.dteExec.caption;
                ((IModeOperation)ret.Mode).Command           = evt.dteExec.cmd;
            }

            if (evt.executionOrder != null)
            {
                int len = evt.executionOrder.Length;
                ret.ExecutionOrder = new ExecutionOrder[len];
                for (int i = 0; i < len; ++i)
                {
                    ret.ExecutionOrder[i] = new ExecutionOrder()
                    {
                        Project = evt.executionOrder[i].project,
                        Order   = (ExecutionOrderType)evt.executionOrder[i].order
                    };
                }
            }
            return(ret);
        }
        protected static NewSBEEvent defineFrom(OldSBEEvent evt)
        {
            NewSBEEventEW ret = new NewSBEEventEW();

            ret.Caption             = evt.caption;
            ret.Enabled             = evt.enabled;
            ret.IgnoreIfBuildFailed = evt.buildFailedIgnore;
            ret.Name                = "Act1";
            ret.Process.Hidden      = evt.processHide;
            ret.Process.Waiting     = evt.waitForExit;
            ret.SupportMSBuild      = evt.parseVariablesMSBuild;
            ret.SupportSBEScripts   = true;
            ret.ToConfiguration     = evt.toConfiguration;

            if(evt.mode == Events.TModeCommands.File)
            {
                ret.Mode = new ModeFile();
                ((IModeFile)ret.Mode).Command = evt.command;
            }
            else if(evt.mode == Events.TModeCommands.Interpreter)
            {
                ret.Mode = new ModeInterpreter();
                ((IModeInterpreter)ret.Mode).Command = evt.command;
                ((IModeInterpreter)ret.Mode).Handler = evt.interpreter;
                ((IModeInterpreter)ret.Mode).Newline = evt.newline;
                ((IModeInterpreter)ret.Mode).Wrapper = evt.wrapper;
            }
            else if(evt.mode == Events.TModeCommands.Operation)
            {
                ret.Mode = new ModeOperation();
                ((IModeOperation)ret.Mode).AbortOnFirstError = evt.dteExec.abortOnFirstError;
                ((IModeOperation)ret.Mode).Caption = evt.dteExec.caption;
                ((IModeOperation)ret.Mode).Command = evt.dteExec.cmd;
            }

            if(evt.executionOrder != null)
            {
                int len = evt.executionOrder.Length;
                ret.ExecutionOrder = new ExecutionOrder[len];
                for(int i = 0; i < len; ++i) {
                    ret.ExecutionOrder[i] = new ExecutionOrder() {
                        Project = evt.executionOrder[i].project,
                        Order   = (ExecutionOrderType)evt.executionOrder[i].order
                    };
                }
            }
            return ret;
        }
 protected void saveData(SBEEventEW evt)
 {
     evt.Codes       = listBoxEW.Items.Cast<string>().ToList();
     evt.IsWhitelist = radioCodesWhitelist.Checked;
 }
        protected void renderData(SBEEventEW evt)
        {
            listBoxEW.Items.Clear();
            listBoxEW.Items.AddRange(evt.Codes.ToArray());

            if(evt.IsWhitelist) {
                radioCodesWhitelist.Checked = true;
            }
            else {
                radioCodesBlacklist.Checked = true;
            }
        }