示例#1
0
        /// ------------------------------------------------------------------------------------
        private RadioButton AddStatusRadioButton(int row, int tabIndex, Session.Status status)
        {
            var statusRadioButton = new RadioButton
            {
                Name                    = "radioButton_" + status,
                Anchor                  = AnchorStyles.Top | AnchorStyles.Left,
                AutoEllipsis            = true,
                AutoSize                = true,
                Margin                  = new Padding(10, 4, 0, 2),
                Text                    = Session.GetLocalizedStatus(status.ToString()),
                Font                    = Program.DialogFont,
                UseVisualStyleBackColor = true,
                Tag      = status,
                TabIndex = tabIndex,
            };

            var toolTip = GetStatusToolTip(status);

            if (toolTip != null)
            {
                _toolTip.SetToolTip(statusRadioButton, toolTip);
            }

            statusRadioButton.MouseEnter += delegate
            {
                _toolTip.ToolTipTitle = statusRadioButton.Text;
            };

            statusRadioButton.CheckedChanged += HandleStatusRadioButtonCheckedChanged;

            _tableLayoutOuter.Controls.Add(statusRadioButton, 1, row);
            _statusRadioButtons.Add(statusRadioButton);
            return(statusRadioButton);
        }
示例#2
0
        /// ----------------------------------------------------------------------------------------
        private string GetStatusToolTip(Session.Status status)
        {
            if (status == Session.Status.Incoming)
            {
                return(LocalizationManager.GetString(
                           "SessionsView.StatusAndStagesEditor.StatusToolTips.Incoming",
                           "I am gathering the recording and meta\ndata and may or may not take it further."));
            }

            if (status == Session.Status.In_Progress)
            {
                return(LocalizationManager.GetString(
                           "SessionsView.StatusAndStagesEditor.StatusToolTips.In_Progress",
                           "I'm working on it."));
            }

            if (status == Session.Status.Finished)
            {
                return(LocalizationManager.GetString(
                           "SessionsView.StatusAndStagesEditor.StatusToolTips.Finished",
                           "I'm done working on it."));
            }

            if (status == Session.Status.Skipped)
            {
                return(LocalizationManager.GetString(
                           "SessionsView.StatusAndStagesEditor.StatusToolTips.Skipped",
                           "I've decided to not develop\nthis session at this time."));
            }

            return(null);
        }
示例#3
0
        /// ------------------------------------------------------------------------------------
        private PictureBox AddStatusImage(int row, Session.Status status)
        {
            var statusPicBox = new PictureBox
            {
                Name     = "picture_" + status,
                Anchor   = AnchorStyles.Top | AnchorStyles.Left,
                Image    = ResourceImageCache.GetBitmap("Status" + status),
                Margin   = new Padding(5, 4, 0, 2),
                SizeMode = PictureBoxSizeMode.AutoSize,
            };

            statusPicBox.Size = statusPicBox.Image.Size;

            var toolTip = GetStatusToolTip(status);

            if (toolTip != null)
            {
                _toolTip.SetToolTip(statusPicBox, toolTip);
            }

            statusPicBox.MouseEnter += delegate
            {
                _toolTip.ToolTipTitle = Session.GetLocalizedStatus(status.ToString());
            };

            if (row == _tableLayoutOuter.GetRow(_labelStages))
            {
                _tableLayoutOuter.RowStyles.Insert(row, new RowStyle(SizeType.AutoSize));
            }

            _tableLayoutOuter.Controls.Add(statusPicBox, 0, row);
            return(statusPicBox);
        }