Exemple #1
0
        private void mnuNew_Click(object sender, EventArgs e)
        {
            blank frm = new blank();

            frm.DocName   = "Unitled" + ++openDocuments;
            frm.Text      = frm.DocName;
            frm.MdiParent = this;
            frm.Show();
        }
Exemple #2
0
        private void mnuColor_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.MdiParent      = this;
            colorDialog1.Color = frm.richTextBox1.SelectionColor;
            if (colorDialog1.ShowDialog() == DialogResult.OK)
            {
                frm.richTextBox1.SelectionColor = colorDialog1.Color;
            }
            frm.Show();
        }
Exemple #3
0
 private void cmnuSaveAs_Click(object sender, EventArgs e)
 {
     openFileDialog1.Filter = "Text Files(*.txt)|*.txt|All Files(*.*)|*.*";
     if (saveFileDialog1.ShowDialog() == DialogResult.OK)
     {
         blank frm = (blank)this.ActiveMdiChild;
         frm.Save(saveFileDialog1.FileName);
         frm.MdiParent   = this;
         frm.DocName     = saveFileDialog1.FileName;
         frm.Text        = frm.DocName;
         mnuSave.Enabled = true;
         frm.IsSaved     = true;
     }
 }
Exemple #4
0
        private void mnuFont_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.MdiParent         = this;
            fontDialog1.ShowColor = true;
            fontDialog1.Font      = frm.richTextBox1.SelectionFont;
            fontDialog1.Color     = frm.richTextBox1.SelectionColor;
            if (fontDialog1.ShowDialog() == DialogResult.OK)
            {
                frm.richTextBox1.SelectionFont  = fontDialog1.Font;
                frm.richTextBox1.SelectionColor = fontDialog1.Color;
            }
            frm.Show();
        }
Exemple #5
0
        private void mnuOpen_Click(object sender, EventArgs e)
        {
            openFileDialog1.Filter = "Text Files(*.txt)|*.txt|All Files(*.*)|*.*";
            if (openFileDialog1.ShowDialog() == DialogResult.OK)

            {
                blank frm = new blank();
                frm.Open(openFileDialog1.FileName);
                frm.MdiParent = this;
                frm.DocName   = openFileDialog1.FileName;
                frm.Text      = frm.DocName;
                frm.Show();
                mnuSave.Enabled = true;
            }
        }
Exemple #6
0
        private void mnuPaste_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.Paste();
        }
Exemple #7
0
        private void mnuCopy_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.Copy();
        }
Exemple #8
0
        private void mnuSelectAll_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.SelectAll();
        }