示例#1
0
        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.Save(frm.DocName);
            frm.IsSaved = true;
        }
示例#2
0
        private void tbSave_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.Save(frm.DocName);
            frm.IsSaved = true;
        }
示例#3
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            blank frm = new blank(); //Создаём новый экземпляр формы frm

            frm.DocName   = "Untitled" + ++openDocuments;
            frm.Text      = frm.DocName;
            frm.MdiParent = this; //Указываем, что родительским контейнером нового экземпляра будет эта, глваная форма
            frm.Show();           //Вызываем форму
        }
示例#4
0
        private void colorToolStripMenuItem_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();
        }
示例#5
0
 private void openToolStripMenuItem_Click(object sender, EventArgs e)
 {
     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();
     }
     saveToolStripMenuItem.Enabled = true;
 }
示例#6
0
        private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                frm.Save(saveFileDialog1.FileName);
                frm.MdiParent = this;
                frm.DocName   = saveFileDialog1.FileName;
                frm.Text      = frm.DocName;
            }
            saveToolStripMenuItem.Enabled = true;
            frm.IsSaved = true;
        }
示例#7
0
        private void findToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FindForm frm = new FindForm();

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

            form.MdiParent = this;
            int start = form.richTextBox1.SelectionStart;

            form.richTextBox1.Find(frm.FindText, start, frm.FindCondition);
        }
示例#8
0
        private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.SelectAll();
        }
示例#9
0
        private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.Delete();
        }
示例#10
0
        private void copyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.Copy();
        }
示例#11
0
        private void tbPaste_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.Paste();
        }
示例#12
0
        private void tbCopy_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.Copy();
        }
示例#13
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.Copy();
        }