Beispiel #1
0
        private void biFileNew_Click(object sender, System.EventArgs e)
        {
            // New diagram
            DiagramForm docForm = new DiagramForm();

            docForm.MdiParent = this;
            docForm.Show();
        }
Beispiel #2
0
 private void barItemEditSelectAll_Click(object sender, System.EventArgs e)
 {
     if (this.ActiveMdiChild != null)
     {
         DiagramForm diagramForm = this.ActiveMdiChild as DiagramForm;
         if (diagramForm != null)
         {
             diagramForm.Diagram.Controller.SelectAll();
         }
     }
 }
Beispiel #3
0
 private void biFileOpen_Click(object sender, System.EventArgs e)
 {
     // Open diagram
     if (this.openDiagramDialog.ShowDialog(this) == DialogResult.OK)
     {
         DiagramForm docForm = new DiagramForm();
         docForm.OpenFile(this.openDiagramDialog.FileName);
         docForm.MdiParent = this;
         docForm.Show();
     }
 }
Beispiel #4
0
        private void biFileSaveAs_Click(object sender, System.EventArgs e)
        {
            // Save diagram
            DiagramForm docForm = this.ActiveDiagramForm;

            if (docForm != null)
            {
                if (docForm.HasFileName)
                {
                    this.saveDiagramDialog.FileName = docForm.FileName;
                }
                if (this.saveDiagramDialog.ShowDialog(this) == DialogResult.OK)
                {
                    docForm.SaveAsFile(this.saveDiagramDialog.FileName);
                }
            }
        }