Example #1
0
        public ScriptEditor()
        {
            mScriptEditor = new ScriptEditorSuite();

            InitializeComponent();
            this.mScriptEditingPanel.Controls.Add(mScriptEditor);
            mScriptEditor.HideEditables();
        }
        public AnimationEditorForm()
        {
            InitializeComponent();

            mScriptEditorSuite = new ScriptEditorSuite();
            mTabControl.TabPages[1].Controls.Add(mScriptEditorSuite);

            // Center the form on the screen
            this.StartPosition = FormStartPosition.CenterScreen;

            // Disable the form until a project is created or opened
            mTabControl.Enabled = false;
            mKeyframePanel.Enabled = false;
            mScriptEditorSuite.Enabled = false;

            mWidthComboBox.SelectedIndex = 3;
            mHeightComboBox.SelectedIndex = 3;
            mGridWidth = int.Parse(mWidthComboBox.SelectedItem.ToString());
            mGridHeight = int.Parse(mHeightComboBox.SelectedItem.ToString());

            mSelectionRect = new Microsoft.Xna.Framework.Rectangle(0, 0, 0, 0);

            mTextEntryDialog = new TextEntryDialog();
            mTextEntryDialog.Message = string.Empty;

            mAddKeyframeButton.Enabled = false;
            mRemoveKeyframeButton.Enabled = false;

            mFrameTimer.Interval = FRAME_DURATION_MS;
            mFrameTimer.Tick += new EventHandler(advanceFrame);

            mMultdirChanged = false;
            mFlippingChanged = false;
            mMultidirCheckBox.Enabled = false;
            mDirectionComboBox.Enabled = false;
            mFlippingCheckBox.Enabled = false;
            mSuppressChange = false;

            mMultiSelectLabel.Visible = false;

            mImageView.Panel.MouseClick += new MouseEventHandler(mImageView_MouseClick);
        }