Exemplo n.º 1
0
 private void openFile_Click(object sender, EventArgs e)
 {
     try
     {
         OpenFileDialog oD = new OpenFileDialog();
         if (oD.ShowDialog() == DialogResult.OK)
         {
             Editor mdiChild = new Editor();
             mdiChild.MdiParent = this;
             mdiChild.DrawingObjects = WorkWithFile.ReadFromFile(oD.FileName);
             mdiChild.ChangeTitle(oD.FileName);
             mdiChild.Show();
         }
     }
     catch (Exception exp)
     {
         MessageBox.Show("File can't open! " + exp.Message);
     }
 }
Exemplo n.º 2
0
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Editor mdiChild = new Editor();
     mdiChild.MdiParent = this;
     mdiChild.Show();
 }