Пример #1
0
 private Bridge CreateBridge(Document document)
 {
     MathSystem sys = Project.AddSystem();
     Bridge bridge = new Bridge(sys, document);
     _mathBridges.Add(sys.InstanceId, bridge);
     _netronBridges.Add(document, bridge);
     return bridge;
 }
Пример #2
0
 public Bridge(MathSystem system, Document document)
 {
     _system = system;
     _document = document;
     _signals = new Dictionary<Guid, SignalShape>();
     _buses = new Dictionary<Guid, BusShape>();
     _ports = new Dictionary<Guid, PortShape>();
 }
        public void Load(Document document)
        {
            if(_bridge != null)
                UnloadSystem(_bridge.System);
            Bridge bridge;
            if(!_netronBridges.ContainsKey(document))
                bridge = CreateBridge(document);
            else
                bridge = _netronBridges[document];
            base.LoadSystem(bridge.System);
            _presentation.AttachToDocument(document);
            _bridge = bridge;

            if(ModelChanged != null)
                ModelChanged(this, EventArgs.Empty);
        }
Пример #4
0
 private Bridge CreateBridge(MathSystem system)
 {
     Document doc = new Document();
     Bridge bridge = new Bridge(system, doc);
     _mathBridges.Add(system.InstanceId, bridge);
     _netronBridges.Add(doc, bridge);
     return bridge;
 }
 private Bridge CreateBridge(Document document)
 {
     IMathSystem sys = Binder.GetInstance<IMathSystem>();
     Bridge bridge = new Bridge(sys, document);
     _mathBridges.Add(sys.InstanceId, bridge);
     _netronBridges.Add(document, bridge);
     return bridge;
 }