Пример #1
0
        private void ColorAnimationForm_Load(object sender, EventArgs e)
        {
            if (AnimatedSetting.Step != null)
            {
                //TODO: What if the step is different type?
                ColorAnimationStep step = (ColorAnimationStep)XmlAnimatedPropertySetting.DeserializeStep(AnimatedSetting.Step);

                this.upDownStepA.Value = step.A;
                this.upDownStepR.Value = step.R;
                this.upDownStepG.Value = step.G;
                this.upDownStepB.Value = step.B;
            }
            else
            {
                this.checkBoxUseCurrentValue.Checked = true;
            }

            if (AnimatedSetting.ReverseStep != null)
            {
                //TODO: What if the step is different type?
                ColorAnimationStep step = (ColorAnimationStep)XmlAnimatedPropertySetting.DeserializeStep(AnimatedSetting.ReverseStep);

                this.upDownReverseStepA.Value = step.A;
                this.upDownReverseStepR.Value = step.R;
                this.upDownReverseStepG.Value = step.G;
                this.upDownReverseStepB.Value = step.B;
            }

            if (AnimatedSetting.Value != null)
            {
                this.colorComboStart.SelectedColor   = (Color)AnimatedSetting.Value;//(Color)XmlPropertySetting.DeserializeValue(Property, AnimatedSetting.Value);
                this.checkBoxUseCurrentValue.Checked = false;
            }
            else
            {
                this.checkBoxUseCurrentValue.Checked = true;
            }


            if (AnimatedSetting.EndValue != null)
            {
                this.colorComboEnd.SelectedColor = (Color)AnimatedSetting.EndValue;//(Color)XmlPropertySetting.DeserializeValue(Property, AnimatedSetting.EndValue);
            }
            if (AnimatedSetting.ReverseStep == null)
            {
                this.checkBoxAutomaticReverse.Checked = true;
            }
        }
Пример #2
0
        private void FontAnimationForm_Load(object sender, EventArgs e)
        {
            if (AnimatedSetting.Step != null)
            {
                //TODO: What if the step is different type?
                FontAnimationStep step = (FontAnimationStep)XmlAnimatedPropertySetting.DeserializeStep(AnimatedSetting.Step);

                this.tbStepSize.Text = step.SizeStep.ToString();
            }
            else
            {
                this.checkBoxUseCurrentValue.Checked = true;
            }

            if (AnimatedSetting.ReverseStep != null)
            {
                //TODO: What if the step is different type?
                FontAnimationStep step = (FontAnimationStep)XmlAnimatedPropertySetting.DeserializeStep(AnimatedSetting.ReverseStep);

                this.tbReversedStepSize.Text = step.SizeStep.ToString();
            }

            if (AnimatedSetting.Value != null)
            {
                this.tbStartSize.Text = ((Font)AnimatedSetting.Value).Size.ToString(); //((Font)XmlPropertySetting.DeserializeValue(Property, AnimatedSetting.Value)).Size.ToString();
                this.checkBoxUseCurrentValue.Checked = false;
            }
            else
            {
                this.checkBoxUseCurrentValue.Checked = true;
            }


            if (AnimatedSetting.EndValue != null)
            {
                this.tbEndSize.Text = ((Font)AnimatedSetting.EndValue).Size.ToString(); //((Font)XmlPropertySetting.DeserializeValue(Property, AnimatedSetting.EndValue)).Size.ToString();
            }
            if (AnimatedSetting.ReverseStep == null)
            {
                this.checkBoxAutomaticReverse.Checked = true;
            }
        }