Ejemplo n.º 1
0
        public ListBoxWindow() :
            base(GuiManager.Cursor)
        {
            #region Set "this" properties.
            GuiManager.AddWindow(this);
            SetPositionTL(97.3f, 25.2f);
            ScaleX   = 13.1f;
            ScaleY   = 19.505f;
            mName    = "Keyframes";
            mMoveBar = true;

            MinimumScaleX = ScaleX;
            MinimumScaleY = 7;

            this.Resizable = true;

            this.Resizing += AdjustPositionsAndScales;


            #endregion

            #region List Box

            mInstructionSetListBox            = AddCollapseListBox();
            mInstructionSetListBox.Highlight += new GuiMessage(UpdateAddButtonVisibility);
            mInstructionSetListBox.Highlight += HighlightInstructionSetListBox;

            mInstructionSetListBox.FocusUpdate += InstructionListHotkeyUpdate;
            #endregion

            #region AnimationSequence ListDisplayWindow

            mAnimationSequenceListBox = new ListDisplayWindow(mCursor);
            this.AddWindow(mAnimationSequenceListBox);
            mAnimationSequenceListBox.ListBox.Highlight    += HighlightAnimationSequenceListBox;
            mAnimationSequenceListBox.ListBox.StrongSelect += DoubleClickAnimationSequenceListBox;
            mAnimationSequenceListBox.ListBox.FocusUpdate  += new FocusUpdateDelegate(AnimationSequenceFocusUpdate);
            ListDisplayWindow.SetStringRepresentationMethod(typeof(TimedKeyframeList), GetTimedKeyframeListStringRepresentation);

            #endregion

            #region Add Keyframe List Button

            mAddKeyframeListButton        = AddButton();
            mAddKeyframeListButton.Text   = "Add Animation";
            mAddKeyframeListButton.Click += AddKeyframeListClick; // this will call UpdateVisibleWindows

            #endregion

            #region Add Keyframe Button

            mAddKeyframeButton        = AddButton();
            mAddKeyframeButton.Text   = "Add Keyframe";
            mAddKeyframeButton.Click += AddKeyframe;

            #endregion

            AdjustPositionsAndScales(null);
        }