protected override void InitialiseToolStrip()
        {
            base.InitialiseToolStrip();
            selectSession = new ToolStripDropDownButton("Session");
            IndexedToolStripButton temp;

            foreach (var session in (Session[])Enum.GetValues(typeof(Session)))
            {
                temp                = new IndexedToolStripButton((int)session);
                temp.Text           = Convert.ToString(session);
                temp.ButtonClicked += SessionToolbarChanged;
                selectSession.DropDownItems.Add(temp);
            }
            thisToolStripDropDown.DropDownItems.Add(selectSession);
        }
示例#2
0
        private void InitialiseToolStrip()
        {
            thisToolStripDropDown = new ToolStripDropDownButton("Results");

            confirmDropDown        = new ToolStripButton("Confirm");
            confirmDropDown.Click += confirmDropDown_Click;

            rejectDropDown        = new ToolStripButton("Reject");
            rejectDropDown.Click += rejectDropDown_Click;

            showChanges        = new ToolStripButton("Show Changes");
            showChanges.Click += showChanges_Click;

            hideChanges        = new ToolStripButton("Hide Changes");
            hideChanges.Click += hideChanges_Click;

            displayBy                    = new ToolStripDropDownButton("Display By");
            selectSession                = new ToolStripDropDownButton("Select Session");
            displayBy.DropDown.Width     = 200;
            selectSession.DropDown.Width = 200;

            IndexedToolStripButton button;

            foreach (var displayType in (ResultDisplayType[])Enum.GetValues(typeof(ResultDisplayType)))
            {
                button                = new IndexedToolStripButton((int)displayType);
                button.Text           = Convert.ToString(displayType);
                button.CheckOnClick   = false;
                button.ButtonClicked += displayType_ButtonClicked;
                displayBy.DropDownItems.Add(button);
            }

            foreach (var session in (Session[])Enum.GetValues(typeof(Session)))
            {
                button                = new IndexedToolStripButton((int)session);
                button.Text           = Convert.ToString(session);
                button.CheckOnClick   = false;
                button.ButtonClicked += selectSession_ButtonClicked;
                selectSession.DropDownItems.Add(button);
            }

            thisToolStripDropDown.DropDownItems.Add(confirmDropDown);
            thisToolStripDropDown.DropDownItems.Add(rejectDropDown);
            thisToolStripDropDown.DropDownItems.Add(showChanges);
            thisToolStripDropDown.DropDownItems.Add(hideChanges);
            thisToolStripDropDown.DropDownItems.Add(displayBy);
            thisToolStripDropDown.DropDownItems.Add(selectSession);
        }
示例#3
0
        private void InitialiseContextMenu()
        {
            thisContextMenu = new ContextMenuStrip();

            IndexedToolStripButton button;

            foreach (var finishState in (FinishingState[])Enum.GetValues(typeof(FinishingState)))
            {
                button = new IndexedToolStripButton((int)finishState)
                {
                    Text = Convert.ToString(finishState),
                };
                button.ButtonClicked += button_ButtonClicked;
                thisContextMenu.Items.Add(button);
            }
        }