Пример #1
0
        public void copy(SControl s)
        {
            List <Step> temp = this.steps;

            Action free = () =>
            {
                temp.ForEach((item) =>
                {
                    if (item.image != null)
                    {
                        item.image.Dispose();
                    }

                    item.events.Clear();
                });
            };

            if (temp.Count > 0)
            {
                (new Thread(new ThreadStart(free))).Start();
            }

            this.steps = s.steps;
            onChange();
        }
Пример #2
0
        //Display test case
        private void dispTC(SControl s)
        {
            indices.sIndex = 1;
            toEnable.ForEach((item) => { item.Enabled = true; });  // Enable list of controls
            steps.copy(s);                                         // Deallocates unused space and assigns s to steps

            save.Enabled = true;
        }
Пример #3
0
        // Revert one step back
        public int revert(SControl steps)
        {
            int stepNum = inputs.Peek().stepNum;

            switch (inputs.Peek().type)
            {
            case modified.bitmap:
                revertBmp(steps);
                break;

            case modified.events:
                revertEvents(steps);
                break;

            case modified.both:
                revertStep(steps);
                break;
            }
            ;

            Pop();

            return(stepNum);
        }
Пример #4
0
 //Revert a modify bitmap uInput (not currently implemented)
 void revertBmp(SControl steps)
 {
 }
Пример #5
0
 void revertStep(SControl steps)
 {
     steps.insert(inputs.Peek().stepNum, new Step(inputs.Peek().step));
 }
Пример #6
0
 void revertEvents(SControl steps)
 {
     steps.modEvent(inputs.Peek().stepNum, inputs.Peek().step.events);
 }