Example #1
0
 private void 새파일NToolStripMenuItem_Click(object sender, EventArgs e)
 {
     child           = new NotePadChildForm();
     child.MdiParent = this;
     child.Text      = "NONAME" + nChild++;
     child.Show();
 }
Example #2
0
        private void 저장SToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                child = (NotePadChildForm)(this.ActiveMdiChild);
                string       fname  = this.Text;
                StreamWriter writer = new StreamWriter(fname);

                writer.Write(child.getTextBox().Text);

                writer.Close();
            }
        }
Example #3
0
        private void 열기OToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                Stream       strm   = openFileDialog1.OpenFile();
                StreamReader reader = new StreamReader(strm);

                child           = new NotePadChildForm();
                child.MdiParent = this;
                child.Text      = "NONAME" + nChild++;
                child.Show();

                child.getTextBox().Text = reader.ReadToEnd();
                reader.Close();
                strm.Close();

                this.Text = openFileDialog1.FileName;
            }
        }
Example #4
0
 private void Undo_Click(object sender, EventArgs e)
 {
     child = (NotePadChildForm)(this.ActiveMdiChild);
     child.getTextBox().Undo();
 }