コード例 #1
0
 public NetronController(Project project, DiagramControl netronDiagram)
     : base(project)
 {
     _presentation = netronDiagram;
     _mathBridges = new Dictionary<Guid, Bridge>();
     _netronBridges = new Dictionary<Document, Bridge>();
     Init();
     _presentation.OnEntityAdded += NetronEntityAddedHandler;
     _presentation.OnEntityRemoved += NetronEntityRemovedHandler;
 }
コード例 #2
0
        public NetronController(DiagramControl netronDiagram)
            : base()
        {
            _presentation = netronDiagram;
            _mathBridges = new Dictionary<Guid, Bridge>();
            _netronBridges = new Dictionary<Document, Bridge>();
            _presentation.OnEntityAdded += NetronEntityAddedHandler;
            _presentation.OnEntityRemoved += NetronEntityRemovedHandler;

            _signalFlies = new Dictionary<MathIdentifier, IFlyweightShape<SignalShape>>();
            _busFlies = new Dictionary<MathIdentifier, IFlyweightShape<BusShape>>();
            _portFlies = new Dictionary<MathIdentifier, IFlyweightShape<PortShape>>();
            _defaultSignalFly = new DefaultSignalShape();
            _defaultBusFly = new DefaultBusShape();
            _defaultPortFly = new DefaultPortShape();
            _portFlies.Add(new MathIdentifier("Transition", "PetriNet"), new PetriNetPortShape());

            Service<MathNet.Symbolics.Library.IPackageLoader>.Instance.LoadPackage("PetriNet");
        }
コード例 #3
0
 /// <summary>
 /// Inits with the specified parent.
 /// </summary>
 /// <param name="parent">The parent.</param>
 public static void Init(DiagramControl parent)
 {
     diagramControl = parent;
     parent.Controls.Add(Editor);
     Editor.Visible = false;
 }
コード例 #4
0
 /// <summary>
 /// Inits with the specified parent.
 /// </summary>
 /// <param name="parent">The parent.</param>
 public static void Init(DiagramControl parent)
 {
     diagramControl = parent;
     parent.Controls.Add(Editor);
     Editor.Visible = false;
 }
コード例 #5
0
 /// <summary>
 /// Creates the diagram canvas.
 /// </summary>
 private static void CreateDiagramCanvas()
 {
     DiagramForm frm = new DiagramForm();
     mDiagram = frm.DiagramControl;
     frm.Show(DockPanel, Properties.Settings.Default.DiagramDockState);
     Tabs.Diagram = frm;
 }