Beispiel #1
0
 private void 새파일NToolStripMenuItem_Click(object sender, EventArgs e)
 {
     child           = new NotePadChildForm();
     child.MdiParent = this;
     child.Text      = "NONAME" + nChild++;
     child.Show();
 }
Beispiel #2
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;
            }
        }