Example #1
0
        void tentry_Click(object sender, EventArgs e)
        {
            ModelDesignerWindow mdlWin = new ModelDesignerWindow();

            mdlWin.OpenFileByPath(System.IO.Path.Combine("./core/samples/", ((ToolStripItem)sender).Text), true);
            AppGlobals.ShowWin(mdlWin, WeifenLuo.WinFormsUI.Docking.DockState.Document);
        }
Example #2
0
 private void mainForm_Load(object sender, EventArgs e)
 {
     if (System.IO.Directory.Exists("./core/samples"))
     {
         string[] files = System.IO.Directory.GetFiles("./core/samples", "*.emdl", System.IO.SearchOption.AllDirectories);
         foreach (var file in files)
         {
             System.IO.FileInfo fi = new System.IO.FileInfo(file);
             var tentry            = samplesToolStripMenuItem.DropDownItems.Add(fi.Name);
             tentry.Click += tentry_Click;
         }
     }
     if (AppGlobals.args.Count() > 0)
     {
         for (int i = 0; i < AppGlobals.args.Count(); i++)
         {
             string arg = AppGlobals.args[i];
             if (System.IO.File.Exists(arg))
             {
                 ModelDesignerWindow designerWin = new ModelDesignerWindow();
                 designerWin.Show(masterDockPanel, WeifenLuo.WinFormsUI.Docking.DockState.Document);
                 designerWin.OpenFileByPath(arg);
             }
         }
     }
     AppGlobals.ShowGenericResults();
 }
Example #3
0
 private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.ActiveMdiChild.GetType() == typeof(ModelDesignerWindow))
     {
         ModelDesignerWindow designerWin = (ModelDesignerWindow)this.ActiveMdiChild;
         designerWin.Save();
     }
 }
Example #4
0
        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            ModelDesignerWindow designerWin;

            if (this.ActiveMdiChild != null && this.ActiveMdiChild.GetType() == typeof(ModelDesignerWindow))
            {
                designerWin = (ModelDesignerWindow)this.ActiveMdiChild;
                if (designerWin.modelDocEditor.Document.ElementCount() == 0)
                {
                    designerWin.Open();
                    return;
                }
            }
            designerWin = new ModelDesignerWindow();
            designerWin.Show(masterDockPanel, WeifenLuo.WinFormsUI.Docking.DockState.Document);
            designerWin.Open();
            designerWin.Invalidate();
        }
Example #5
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ModelDesignerWindow win = new ModelDesignerWindow();

            win.Show(masterDockPanel, WeifenLuo.WinFormsUI.Docking.DockState.Document);
        }