/// <summary> /// Initializes a new instance of the <see cref="T:SimpleRectangle"/> class. /// </summary> public PortShape(IModel model, CommandReference reference, IFlyweightShape <PortShape> fly) : base(model) { this.sysRef = reference; cIn = new List <YttriumConnector>(); cOut = new List <YttriumConnector>(); cBus = new List <YttriumConnector>(); AssignFly(fly); }
public BusShape(IModel model, CommandReference reference, IFlyweightShape<BusShape> fly) : base(model) { this.sysRef = reference; busConnector = new YttriumConnector(Model, ConnectorType.BusConnector); //new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom), busConnector.Name = "Bus"; busConnector.Parent = this; Connectors.Add(busConnector); AssignFly(fly); }
public BusShape(IModel model, CommandReference reference, IFlyweightShape <BusShape> fly) : base(model) { this.sysRef = reference; busConnector = new YttriumConnector(Model, ConnectorType.BusConnector); //new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom), busConnector.Name = "Bus"; busConnector.Parent = this; Connectors.Add(busConnector); AssignFly(fly); }
public void AssignFly(IFlyweightShape<BusShape> fly) { if(_fly != fly) { _fly = fly; if(_fly != null) { _fly.InitShape(this); _fly.Reposition(this, Point.Empty); } } Invalidate(); }
public void AssignFly(IFlyweightShape <PortShape> fly) { if (_fly != fly) { _fly = fly; if (_fly != null) { _fly.InitShape(this); _fly.Reposition(this, Point.Empty); } } Invalidate(); }
public SignalShape(IModel model, CommandReference reference, IFlyweightShape <SignalShape> fly) : base(model) { this.sysRef = reference; outConnector = new YttriumConnector(Model, ConnectorType.SignalOutputConnector); outConnector.Name = "Output"; outConnector.Parent = this; Connectors.Add(outConnector); inConnector = new YttriumConnector(Model, ConnectorType.SignalInputConnector); inConnector.Name = "Input"; inConnector.Parent = this; Connectors.Add(inConnector); AssignFly(fly); }
public SignalShape(IModel model, CommandReference reference, IFlyweightShape<SignalShape> fly) : base(model) { this.sysRef = reference; outConnector = new YttriumConnector(Model, ConnectorType.SignalOutputConnector); outConnector.Name = "Output"; outConnector.Parent = this; Connectors.Add(outConnector); inConnector = new YttriumConnector(Model, ConnectorType.SignalInputConnector); inConnector.Name = "Input"; inConnector.Parent = this; Connectors.Add(inConnector); AssignFly(fly); }
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"); }
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"); }