Ejemplo n.º 1
0
        private void cmbType_SelectedIndexChanged(object sender, EventArgs e)
        {
            SaveData(sender, e);

            TActionIntervalFade myAction = (TActionIntervalFade)this.action;

            switch (myAction.type)
            {
            case TActionIntervalFade.ActionType.TO:
                pnlStartAlphaRow.Visible = false;
                pnlEndAlphaRow.Visible   = true;
                break;

            case TActionIntervalFade.ActionType.FROMTO:
                pnlStartAlphaRow.Visible = true;
                pnlEndAlphaRow.Visible   = true;
                break;

            case TActionIntervalFade.ActionType.IN:
                pnlStartAlphaRow.Visible = false;
                pnlEndAlphaRow.Visible   = false;
                break;

            case TActionIntervalFade.ActionType.OUT:
                pnlStartAlphaRow.Visible = false;
                pnlEndAlphaRow.Visible   = false;
                break;
            }
        }
Ejemplo n.º 2
0
        private void SaveData(object sender, EventArgs e)
        {
            if (manualChanged == false)
            {
                TActionIntervalFade myAction = (TActionIntervalFade)this.action;
                myAction.type       = (TActionIntervalFade.ActionType)cmbType.SelectedIndex;
                myAction.duration   = (long)nudDuration.Value;
                myAction.startAlpha = (float)nudStartAlpha.Value;
                myAction.endAlpha   = (float)nudEndAlpha.Value;
                myAction.easingType = (TEasingFunction.EasingType)cmbEasingType.SelectedIndex;
                myAction.easingMode = (TEasingFunction.EasingMode)cmbEasingMode.SelectedIndex;

                base.SaveData();
            }
        }
Ejemplo n.º 3
0
        public override void LoadData()
        {
            // set manualChanged flag
            manualChanged = true;

            // load action data
            TActionIntervalFade myAction = (TActionIntervalFade)this.action;

            cmbType.SelectedIndex       = (int)myAction.type;
            nudDuration.Value           = (decimal)myAction.duration;
            nudStartAlpha.Value         = (decimal)myAction.startAlpha;
            nudEndAlpha.Value           = (decimal)myAction.endAlpha;
            cmbEasingType.SelectedIndex = (int)myAction.easingType;
            cmbEasingMode.SelectedIndex = (int)myAction.easingMode;

            cmbType_SelectedIndexChanged(null, null);

            // clear mnualChanged flag
            manualChanged = false;
        }