Ejemplo n.º 1
0
        private void AppCommandOpen_Executed(object sender, EventArgs e)
        {
            // Close Application Menu
            buttonFile.Expanded = false;

            openFileDialog1.FileName = "";
            openFileDialog1.ShowDialog();
            if (openFileDialog1.FileName == "")
                return;
            frmDocument doc = new frmDocument();
            doc.Text = openFileDialog1.FileName;
            doc.MdiParent = this;
            doc.Show();
            doc.OpenFile(openFileDialog1.FileName);
        }
Ejemplo n.º 2
0
        private void AppCommandNew_Executed(object sender, EventArgs e)
        {
            // Close Application Menu
            buttonFile.Expanded = false;

            frmDocument doc = new frmDocument();
            doc.Text = "New Document " + (this.MdiChildren.Length + 1);
            doc.MdiParent = this;
            doc.WindowState = FormWindowState.Maximized;
            doc.Show();
            doc.Update();
        }