Exemple #1
0
 private static void presentDocument(frmDocument doc)
 {
     doc.Show();
     doc.Focus();
     doc.WindowState = FormWindowState.Normal;
     doc.WindowState = FormWindowState.Maximized;
 }
Exemple #2
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmDocument doc = new frmDocument();

            doc.MdiParent = this;
            presentDocument(doc);
        }
Exemple #3
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();

            dlg.Title  = "Select Hex file to read";
            dlg.Filter = "Hex files (*.hex)|*.hex|All files (*.*)|*.*";
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                frmDocument doc = new frmDocument();
                doc.MdiParent = this;
                doc.fileName  = dlg.FileName;
                presentDocument(doc);
            }
        }