Esempio n. 1
0
        public void Evaluate(int SpreadMax)
        {
            if (this.FInEngine.PluginIO.IsConnected)
            {
                this.FOutIsSet.SliceCount = this.FInVarName.SliceCount;

                for (int i = 0; i < this.FInVarName.SliceCount; i++)
                {
                    if (this.FInSetCategory[i] || this.FInSetAll[i] || this.FInSetDefault[i] ||
                        this.FInSetMinimum[i] || this.FInSetMaximum[i] ||
                        this.FInSetTweenMode[i] || this.FInSetEaseMode[i] ||
                        this.FInSetTOMode[i] || this.FInSetAllowFeedback[i])
                    {
                        TodoVariable var = this.FInEngine[0].GetVariableByName(this.FInVarName[i]);

                        if (this.FInSetCategory[i] || this.FInSetAll[i])
                        {
                            var.Category = this.FInCategory[i];
                        }
                        if (this.FInSetDefault[i] || this.FInSetAll[i])
                        {
                            var.Default = this.FInDefault[i];
                        }
                        if (this.FInSetMinimum[i] || this.FInSetAll[i])
                        {
                            var.Mapper.MinValue = this.FInMinimum[i];
                        }
                        if (this.FInSetMaximum[i] || this.FInSetAll[i])
                        {
                            var.Mapper.MaxValue = this.FInMaximum[i];
                        }
                        if (this.FInSetTweenMode[i] || this.FInSetAll[i])
                        {
                            var.Mapper.TweenMode = this.FInTweenMode[i];
                        }
                        if (this.FInSetEaseMode[i] || this.FInSetAll[i])
                        {
                            var.Mapper.EaseMode = this.FInEaseMode[i];
                        }
                        if (this.FInSetTOMode[i] || this.FInSetAll[i])
                        {
                            var.TakeOverMode = this.FInTakeOverMode[i];
                        }
                        if (this.FInSetAllowFeedback[i] || this.FInSetAll[i])
                        {
                            var.AllowFeedBack = this.FInAllowFeedBack[i];
                        }


                        var.MarkForUpdate(false);
                    }
                }
            }
            else
            {
                this.FOutIsSet.SliceCount = 0;
            }
        }
Esempio n. 2
0
        void lvVariables_SubItemEndEditing(object sender, ListViewEx.SubItemEndEditingEventArgs e)
        {
            TodoVariable    tv     = this.engine.GetVariableByName(e.Item.SubItems[1].Text);
            TodoTweenMapper mapper = tv.Mapper;

            if (e.SubItem == 0)
            {
                tv.Category = e.DisplayText;
            }
            if (e.SubItem == 2)
            {
                try { tv.Default = Convert.ToDouble(e.DisplayText); } catch { e.Cancel = true; }
            }
            if (e.SubItem == 3)
            {
                try { mapper.MinValue = Convert.ToDouble(e.DisplayText); } catch { e.Cancel = true; }
            }
            if (e.SubItem == 4)
            {
                try { mapper.MaxValue = Convert.ToDouble(e.DisplayText); } catch { e.Cancel = true; }
            }
            if (e.SubItem == 5)
            {
                tv.Mapper.Reverse = BoolExtension.ParseEnglish(e.DisplayText);
            }
            if (e.SubItem == 6)
            {
                mapper.TweenMode = (eTweenMode)Enum.Parse(typeof(eTweenMode), e.DisplayText);
            }
            if (e.SubItem == 7)
            {
                mapper.EaseMode = (eTweenEaseMode)Enum.Parse(typeof(eTweenEaseMode), e.DisplayText);
            }
            if (e.SubItem == 8)
            {
                tv.TakeOverMode = (eTodoGlobalTakeOverMode)Enum.Parse(typeof(eTodoGlobalTakeOverMode), e.DisplayText);
            }
            if (e.SubItem == 9)
            {
                tv.AllowFeedBack = BoolExtension.ParseEnglish(e.DisplayText);
            }
            tv.MarkForUpdate(true);
        }