Ejemplo n.º 1
0
        private KitchanismoTransition GeneratedTransition()
        {
            var _transition = new KitchanismoTransition();

            _transition.Speed        = (int)num.Value;
            _transition.Type         = GeneratedType();
            _transition.ReverseShift = NegateShift(IsReverseShit());
            _transition.Shift        = GeneratedShift();
            _transition.Ease         = EaseFactory.ParseEase(cbo.Text.ToString().ToLower());

            return(_transition);
        }
Ejemplo n.º 2
0
        private void DoTransition(Control ctrl)
        {
            transition.Speed = Int32.Parse(num.Value.ToString());
            transition.Ease  = EaseFactory.ParseEase(cbo.Text.ToString().ToLower());

            //y

            if (rbSwap.Checked == true && rby.Checked == true && rbfu.Checked == true)
            {
                transition.ReverseShift = false;
                transition.Type         = TypeTransition.Swap;
                transition.Shift        = ShiftTransition.Y;
                transition.Run(ctrl);
                return;
            }

            else if (rbSwap.Checked == true && rby.Checked == true && rbfd.Checked == true)
            {
                transition.ReverseShift = true;
                transition.Type         = TypeTransition.Swap;
                transition.Shift        = ShiftTransition.Y;
                transition.Run(ctrl);
                return;
            }
            else if (rbPush.Checked == true && rby.Checked == true && rbfu.Checked == true)
            {
                transition.ReverseShift = false;
                transition.Type         = TypeTransition.Push;
                transition.Shift        = ShiftTransition.Y;
                transition.Run(ctrl);
                return;
            }

            else if (rbPush.Checked == true && rby.Checked == true && rbfd.Checked == true)
            {
                transition.ReverseShift = true;
                transition.Type         = TypeTransition.Push;
                transition.Shift        = ShiftTransition.Y;
                transition.Run(ctrl);
                return;
            }

            //x

            if (rbSwap.Checked == true && rbx.Checked == true && rbfl.Checked == true)
            {
                transition.ReverseShift = false;
                transition.Type         = TypeTransition.Swap;
                transition.Shift        = ShiftTransition.X;
                transition.Run(ctrl);
                return;
            }

            else if (rbSwap.Checked == true && rbx.Checked == true && rbfr.Checked == true)
            {
                transition.ReverseShift = true;
                transition.Type         = TypeTransition.Swap;
                transition.Shift        = ShiftTransition.X;
                transition.Run(ctrl);
                return;
            }
            else if (rbPush.Checked == true && rbx.Checked == true && rbfl.Checked == true)
            {
                transition.ReverseShift = true;
                transition.Type         = TypeTransition.Push;
                transition.Shift        = ShiftTransition.X;
                transition.Run(ctrl);
                return;
            }

            else if (rbPush.Checked == true && rbx.Checked == true && rbfr.Checked == true)
            {
                transition.ReverseShift = false;
                transition.Type         = TypeTransition.Push;
                transition.Shift        = ShiftTransition.X;
                transition.Run(ctrl);
                return;
            }

            //yx

            if (rbSwap.Checked == true && rbyx.Checked == true && rbfu.Checked == true)
            {
                transition.ReverseShift = false;
                transition.Type         = TypeTransition.Swap;
                transition.Shift        = ShiftTransition.YX;
                transition.Run(ctrl);
                return;
            }

            else if (rbSwap.Checked == true && rbyx.Checked == true && rbfd.Checked == true)
            {
                transition.ReverseShift = true;
                transition.Type         = TypeTransition.Swap;
                transition.Shift        = ShiftTransition.YX;
                transition.Run(ctrl);
                return;
            }
            else if (rbPush.Checked == true && rbyx.Checked == true && rbfu.Checked == true)
            {
                transition.ReverseShift = false;
                transition.Type         = TypeTransition.Push;
                transition.Shift        = ShiftTransition.YX;
                transition.Run(ctrl);
                return;
            }

            else if (rbPush.Checked == true && rbyx.Checked == true && rbfd.Checked == true)
            {
                transition.ReverseShift = true;
                transition.Type         = TypeTransition.Push;
                transition.Shift        = ShiftTransition.YX;
                transition.Run(ctrl);
                return;
            }

            else if (rbIntersect.Checked == true && rbyx.Checked == true && rbfu.Checked == true)
            {
                transition.ReverseShift = true;
                transition.Type         = TypeTransition.Intersect;
                transition.Shift        = ShiftTransition.YX;
                transition.Run(ctrl);
                return;
            }

            else if (rbIntersect.Checked == true && rbyx.Checked == true && rbfd.Checked == true)
            {
                transition.ReverseShift = false;
                transition.Type         = TypeTransition.Intersect;
                transition.Shift        = ShiftTransition.YX;
                transition.Run(ctrl);
            }

            //xy

            if (rbSwap.Checked == true && rbxy.Checked == true && rbfl.Checked == true)
            {
                transition.ReverseShift = false;
                transition.Type         = TypeTransition.Swap;
                transition.Shift        = ShiftTransition.XY;
                transition.Run(ctrl);
                return;
            }

            else if (rbSwap.Checked == true && rbxy.Checked == true && rbfr.Checked == true)
            {
                transition.ReverseShift = true;
                transition.Type         = TypeTransition.Swap;
                transition.Shift        = ShiftTransition.XY;
                transition.Run(ctrl);
                return;
            }
            else if (rbPush.Checked == true && rbxy.Checked == true && rbfl.Checked == true)
            {
                transition.ReverseShift = false;
                transition.Type         = TypeTransition.Push;
                transition.Shift        = ShiftTransition.XY;
                transition.Run(ctrl);
                return;
            }

            else if (rbPush.Checked == true && rbxy.Checked == true && rbfr.Checked == true)
            {
                transition.ReverseShift = true;
                transition.Type         = TypeTransition.Push;
                transition.Shift        = ShiftTransition.XY;
                transition.Run(ctrl);
                return;
            }
            else if (rbIntersect.Checked == true && rbxy.Checked == true && rbfl.Checked == true)
            {
                transition.ReverseShift = true;
                transition.Type         = TypeTransition.Intersect;
                transition.Shift        = ShiftTransition.XY;
                transition.Run(ctrl);
                return;
            }

            else if (rbIntersect.Checked == true && rbxy.Checked == true && rbfr.Checked == true)
            {
                transition.ReverseShift = false;
                transition.Type         = TypeTransition.Intersect;
                transition.Shift        = ShiftTransition.XY;
                transition.Run(ctrl);
                return;
            }
        }