コード例 #1
0
        public override bool parseXml(XElement xml)
        {
            if (xml == null || xml.Name != "ActionIntervalBezier")
            {
                return(false);
            }

            if (!base.parseXml(xml))
            {
                return(false);
            }

            try {
                type       = (ActionType)int.Parse(xml.Element("Type").Value);
                point1     = new Point(int.Parse(xml.Element("Point1X").Value), int.Parse(xml.Element("Point1Y").Value));
                point2     = new Point(int.Parse(xml.Element("Point2X").Value), int.Parse(xml.Element("Point2Y").Value));
                point3     = new Point(int.Parse(xml.Element("Point3X").Value), int.Parse(xml.Element("Point3Y").Value));
                easingType = (TEasingFunction.EasingType) int.Parse(xml.Element("EasingType").Value);
                easingMode = (TEasingFunction.EasingMode) int.Parse(xml.Element("EasingMode").Value);
                return(true);
            } catch (Exception e) {
                Console.WriteLine(e.Message);
                return(false);
            }
        }
コード例 #2
0
        public TActionIntervalScale()
        {
            name          = "Scale";
            startingColor = Color.FromArgb(255, 247, 221);
            endingColor   = Color.FromArgb(255, 245, 220);
            icon          = Properties.Resources.icon_action_scale;

            type       = ActionType.TO;
            scale      = new SizeF(1, 1);
            easingType = TEasingFunction.EasingType.None;
            easingMode = TEasingFunction.EasingMode.In;
        }
コード例 #3
0
        public TActionIntervalRotate()
        {
            name          = "Rotate";
            startingColor = Color.FromArgb(221, 255, 249);
            endingColor   = Color.FromArgb(209, 255, 247);
            icon          = Properties.Resources.icon_action_rotate;

            type       = ActionType.TO;
            angle      = 0;
            easingType = TEasingFunction.EasingType.None;
            easingMode = TEasingFunction.EasingMode.In;
        }
コード例 #4
0
        public TActionIntervalMove()
        {
            name          = "Move";
            startingColor = Color.FromArgb(205, 243, 255);
            endingColor   = Color.FromArgb(188, 239, 255);
            icon          = Properties.Resources.icon_action_move;

            type       = ActionType.TO;
            position   = new PointF();
            easingType = TEasingFunction.EasingType.None;
            easingMode = TEasingFunction.EasingMode.In;
        }
コード例 #5
0
        public TActionIntervalFade()
        {
            name          = "Fade";
            startingColor = Color.FromArgb(226, 226, 226);
            endingColor   = Color.FromArgb(216, 216, 216);
            icon          = Properties.Resources.icon_action_fade;

            type       = ActionType.TO;
            startAlpha = 0;
            endAlpha   = 1;
            easingType = TEasingFunction.EasingType.None;
            easingMode = TEasingFunction.EasingMode.In;
        }
コード例 #6
0
        public TActionIntervalBezier()
        {
            name          = "Bezier";
            startingColor = Color.FromArgb(255, 230, 205);
            endingColor   = Color.FromArgb(255, 222, 189);
            icon          = Properties.Resources.icon_action_bezier;

            type       = ActionType.TO;
            point1     = new Point();
            point2     = new Point();
            point3     = new Point();
            easingType = TEasingFunction.EasingType.None;
            easingMode = TEasingFunction.EasingMode.In;
        }
コード例 #7
0
        public override bool parseXml(XElement xml)
        {
            if (xml == null || xml.Name != "ActionIntervalScale")
            {
                return(false);
            }

            if (!base.parseXml(xml))
            {
                return(false);
            }

            try {
                type       = (ActionType)int.Parse(xml.Element("Type").Value);
                scale      = new SizeF(float.Parse(xml.Element("ScaleWidth").Value), float.Parse(xml.Element("ScaleHeight").Value));
                easingType = (TEasingFunction.EasingType) int.Parse(xml.Element("EasingType").Value);
                easingMode = (TEasingFunction.EasingMode) int.Parse(xml.Element("EasingMode").Value);
                return(true);
            } catch (Exception e) {
                Console.WriteLine(e.Message);
                return(false);
            }
        }
コード例 #8
0
        public override bool parseXml(XElement xml)
        {
            if (xml == null || xml.Name != "ActionIntervalRotate")
            {
                return(false);
            }

            if (!base.parseXml(xml))
            {
                return(false);
            }

            try {
                type       = (ActionType)int.Parse(xml.Element("Type").Value);
                angle      = int.Parse(xml.Element("Angle").Value);
                easingType = (TEasingFunction.EasingType) int.Parse(xml.Element("EasingType").Value);
                easingMode = (TEasingFunction.EasingMode) int.Parse(xml.Element("EasingMode").Value);
                return(true);
            } catch (Exception e) {
                Console.WriteLine(e.Message);
                return(false);
            }
        }