Esempio n. 1
0
        private void colorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            file_form ff = (file_form)this.ActiveMdiChild;

            ff.MdiParent       = this;
            colorDialog1.Color = ff.getRichTextBox().SelectionColor;
            if (colorDialog1.ShowDialog() == DialogResult.OK)
            {
                ff.getRichTextBox().SelectionColor = colorDialog1.Color;
            }
            ff.Show();
        }
Esempio n. 2
0
        private void findToolStripMenuItem_Click(object sender, EventArgs e)
        {
            find_form frm = new find_form();

            if (frm.ShowDialog(this) == DialogResult.Cancel)
            {
                return;
            }
            file_form form = (file_form)this.ActiveMdiChild;

            form.MdiParent = this;
            int pos = form.getRichTextBox().SelectionStart;

            form.getRichTextBox().Find(frm.FindText, pos, frm.Condition);
        }
Esempio n. 3
0
        private void fontToolStripMenuItem_Click(object sender, EventArgs e)
        {
            file_form ff = (file_form)this.ActiveMdiChild;

            ff.MdiParent          = this;
            fontDialog1.ShowColor = true;
            fontDialog1.Font      = ff.getRichTextBox().SelectionFont;
            fontDialog1.Color     = ff.getRichTextBox().SelectionColor;
            if (fontDialog1.ShowDialog() == DialogResult.OK)
            {
                ff.getRichTextBox().SelectionFont  = fontDialog1.Font;
                ff.getRichTextBox().SelectionColor = fontDialog1.Color;
            }

            /*fontDialog1.Font = ff.richTextBox1.SelectionFont;
             * fontDialog1.Color = ff.richTextBox1.SelectionColor;
             * if (fontDialog1.ShowDialog() == DialogResult.OK)
             * {
             *  ff.richTextBox1.SelectionFont = fontDialog1.Font;
             *  ff.richTextBox1.SelectionColor = fontDialog1.Color;
             * }*/
            ff.Show();
        }