예제 #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();
        }
예제 #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();
        }
예제 #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;
     }
 }
예제 #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();
        }
예제 #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;
            }
        }
예제 #6
0
        private void mnuPaste_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

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

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

            frm.SelectAll();
        }