Ejemplo n.º 1
0
        public void ApplyInterpolateToState(object firstStateUncasted, object secondStateUncasted, float time, InterpolationType interpolationType, Easing easing)
        {
            // We gotta find the type that this is:
            string categoryName = "Uncategorized";

            StateSave firstState  = (StateSave)firstStateUncasted;
            StateSave secondState = (StateSave)secondStateUncasted;


            Type type = firstState.GetType();

            categoryName = type.Name;

            foreach (var uncastedControl in this.StatePanel.Controls)
            {
                if (uncastedControl is StateCategoryControl)
                {
                    StateCategoryControl control = uncastedControl as StateCategoryControl;

                    if (control.ContainsState(firstState) && control.ContainsState(secondState))
                    {
                        control.ApplyInterpolateToState(firstState, secondState, time, interpolationType, easing);
                        break;
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void AddComboBoxIfStatesExist(string name, List <StateSave> states)
        {
            if (states.Count != 0)
            {
                StatePanel.SuspendLayout();

                StateCategoryControl scc = new StateCategoryControl();
                this.StatePanel.Controls.Add(scc);
                scc.Initialize(name, states);
                StatePanel.ResumeLayout();
                StatePanel.PerformLayout();

                scc.ItemSelect += new EventHandler(RefreshStates);
            }
        }
Ejemplo n.º 3
0
        private void AddComboBoxIfStatesExist(string name, List<StateSave> states)
        {
            if (states.Count != 0)
            {
                StatePanel.SuspendLayout();

                StateCategoryControl scc = new StateCategoryControl();
                this.StatePanel.Controls.Add(scc);
                scc.Initialize(name, states);
                StatePanel.ResumeLayout();
                StatePanel.PerformLayout();

                scc.ItemSelect += new EventHandler(RefreshStates);
            }
        }