Esempio n. 1
0
        private void LoadSettings()
        {
            LayoutRichTextBox.Rtf = Program.Settings.InfoText;
            SetPositionButton(Program.Settings.ScreenPosition);
            LayoutRichTextBox.BackColor = Program.Settings.BackgroundColor.ToColor();

            FontComboBox.SelectedIndex     = FontComboBox.FindString("Arial");
            FontSizeComboBox.SelectedIndex = 2;

            SetOutputDepth(Program.Settings.OutputDepth);

            ignoreTaskbarHeightToolStripMenuItem.Checked = Program.Settings.IgnoreTaskBar;

            trySavingRelativePathsToolStripMenuItem.Checked = Program.Settings.SaveRelativeImagePaths;
        }
Esempio n. 2
0
        private void TextBoxSelectionChanged(object sender, EventArgs e)
        {
            if (LayoutRichTextBox.SelectionFont != null)
            {
                BoldToolStripButton.Checked      = LayoutRichTextBox.SelectionFont.Bold;
                ItalicToolStripButton.Checked    = LayoutRichTextBox.SelectionFont.Italic;
                UnderlineToolStripButton.Checked = LayoutRichTextBox.SelectionFont.Underline;
                FontComboBox.SelectedIndex       = FontComboBox.FindString(LayoutRichTextBox.SelectionFont.FontFamily.Name);
                FontSizeComboBox.SelectedIndex   = FontSizeComboBox.FindString(LayoutRichTextBox.SelectionFont.SizeInPoints.ToString());
            }
            else
            {
                BoldToolStripButton.Checked      = false;
                ItalicToolStripButton.Checked    = false;
                UnderlineToolStripButton.Checked = false;
                FontComboBox.Text     = string.Empty;
                FontSizeComboBox.Text = string.Empty;
            }

            SetAlignmentButton(LayoutRichTextBox.SelectionAlignment);
        }