public UCOptionForPresentation(Option option, bool justOneTrueOption, bool answerTime, bool showTrueOption) { this.justOneTrueOption = justOneTrueOption; InitializeComponent(); this.option = option; this.answerTime = answerTime; this.showTrueOption = showTrueOption; FRtbFace.Rtf = option.Face; lblNumber.Text = option.number.ToString(); if (justOneTrueOption) { rbIsTrue.Visible = true; cbIsTrue.Visible = false; } else { rbIsTrue.Visible = false; cbIsTrue.Visible = true; } if (answerTime) { cbIsTrue.Checked = option.Answered; rbIsTrue.Checked = option.Answered; if (showTrueOption) { if (option.IsTrue) { BackColor = BaseCodes.Utilities.Globals.Colors.TrueOption; } AlphaPanel alphaPanel = new AlphaPanel(); alphaPanel.Dock = DockStyle.Fill; this.Controls.Add(alphaPanel); alphaPanel.BringToFront(); } } else { cbIsTrue.Checked = option.IsTrue; rbIsTrue.Checked = option.IsTrue; AlphaPanel alphaPanel = new AlphaPanel(); alphaPanel.Dock = DockStyle.Fill; this.Controls.Add(alphaPanel); alphaPanel.BringToFront(); } // FRtbFace.BackColor = Color.Transparent; }
private void InitializeComponent() { SetStyle(System.Windows.Forms.ControlStyles.SupportsTransparentBackColor, true); components = new System.ComponentModel.Container(); STClientDel = new AlphaUtils.AlphaTextBox.SMDel(DefWndProc); TBUtils = new AlphaUtils.Utilities(STClientDel, this); publicBGSet = false; DrawCaret = false; SelectingText = false; APanel = new AlphaUtils.AlphaTextBox.AlphaPanel(this); BlinkCaretTimer = new System.Timers.Timer(500.0); BlinkCaretTimer.Elapsed += new System.Timers.ElapsedEventHandler(BlinkCaretTimer_Elapsed); BlinkCaretTimer.AutoReset = true; BackColor = System.Drawing.Color.Transparent; base.Controls.Add(APanel); }
private void InitializeComponent() { SetStyle(System.Windows.Forms.ControlStyles.SupportsTransparentBackColor, true); components = new System.ComponentModel.Container(); STClientDel = new AlphaUtils.AlphaRichTextBox.SMDel(DefWndProc); TBUtils = new AlphaUtils.Utilities(STClientDel, this); DrawCaret = true; Updating = false; DrawingCaret = false; Scrolling = false; Ctrl = false; NewLine = false; APanel = new AlphaUtils.AlphaRichTextBox.AlphaPanel(this); TmpSelStart = -1; BlinkCaretTimer = new System.Timers.Timer(500.0); BlinkCaretTimer.Elapsed += new System.Timers.ElapsedEventHandler(BlinkCaretTimer_Elapsed); BlinkCaretTimer.AutoReset = true; BlinkCaretTimer.Enabled = false; SelectedRTInfopublic = new AlphaUtils.RichTextInformationCollection(); base.Controls.Add(APanel); }
private void palAlphaTSMI_Click(object sender, EventArgs e) { AlphaPanel panel = new AlphaPanel(PaletteData.AlphaSettings); panel.ShowDialog(); // the panel will automatically alter the settings when OK is clicked / enter is pressed }