Exemplo n.º 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();
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 //Revert a modify bitmap uInput (not currently implemented)
 void revertBmp(SControl steps)
 {
 }
Exemplo n.º 5
0
 void revertStep(SControl steps)
 {
     steps.insert(inputs.Peek().stepNum, new Step(inputs.Peek().step));
 }
Exemplo n.º 6
0
 void revertEvents(SControl steps)
 {
     steps.modEvent(inputs.Peek().stepNum, inputs.Peek().step.events);
 }