Exemple #1
0
        /// <summary>
        /// Called when the selected index has changed.  If it's anything but 0, create the appropriate
        /// action
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mActionTypesComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Otter.UI.Actions.Action newAction = null;
            switch (mActionTypesComboBox.SelectedIndex)
            {
            // Do nothing
            case 0:
            {
                return;
            }

            // Send Message
            case 1:
            {
                newAction = new Otter.UI.Actions.MessageAction();
                break;
            }

            // Play Sound
            case 2:
            {
                newAction = new Otter.UI.Actions.SoundAction();
                break;
            }
            }

            newAction.Scene = mScene;
            mActions.Add(newAction);

            Actions = mActions;
            mActionTypesComboBox.SelectedIndex = 0;
        }
Exemple #2
0
        /// <summary>
        /// Called when the selected index has changed.  If it's anything but 0, create the appropriate
        /// action
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mActionTypesComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Otter.UI.Actions.Action newAction = null;
            switch (mActionTypesComboBox.SelectedIndex)
            {
                // Do nothing
                case 0:
                    {
                        return;
                    }
                // Send Message
                case 1:
                    {
                        newAction = new Otter.UI.Actions.MessageAction();
                        break;
                    }
                // Play Sound
                case 2:
                    {
                        newAction = new Otter.UI.Actions.SoundAction();
                        break;
                    }
            }

            newAction.Scene = mScene;
            mActions.Add(newAction);

            Actions = mActions;
            mActionTypesComboBox.SelectedIndex = 0;
        }