Exemplo n.º 1
0
 public DoorsDisplay3D(DoorManager manager)
 {
     _manager = manager;
     UpdateAll();
     _manager.Doors.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Doors_CollectionChanged);
     SubscribeToDoors();
 }
Exemplo n.º 2
0
        public void LoadZone(string zone,int version=0)
        {
            _zone = zone;
            _version = version;

            if (_dmanager != null)
            {
                _dmanager.DoorDataLoaded -= _dmanager_DoorDataLoaded;
            }

            if (_connection != null && _connection.State == System.Data.ConnectionState.Open)
            {
                _dmanager = new DoorManagerDatabase(_zone, _version, _connection, TypeQueryConfig);
            }
            else
            {
                _dmanager = new DoorManagerLocal(_zone, _version, TypeQueryConfig);
            }

            _dmanager.DoorDataLoaded += new DoorDataLoadedHandler(_dmanager_DoorDataLoaded);

            if (_doors3d != null)
            {
                _doors3d.Dispose();
            }

            _doors3d = new DoorsDisplay3D(_dmanager);
            if (_viewClipping != null)
            {
                _doors3d.Clipping = _viewClipping;
            }
            _doors3d.ObjectsWLD = _wld;

            Model3D = new ModelVisual3D()
            {
                Content = _doors3d.Model,
                Transform = Transform3D
            };

            NotifyPropertyChanged("Zone");
        }