Ejemplo n.º 1
0
        async public Task <bool> LoadAsync(IPersistStream stream)
        {
            while (_maps.Count > 0)
            {
                this.RemoveMap((IMap)_maps[0]);
            }

            _focusMapIndex = (int)stream.Load("focusMapIndex", (int)0);

            IMap map;

            while ((map = (await stream.LoadAsync <IMap>("IMap", new gView.Framework.Carto.Map()))) != null)
            {
                this.AddMap(map);
            }

            if (_maps.Count > 0)
            {
                FocusMap = _maps[0];
            }
            else
            {
                FocusMap = null;
            }

            if (this.Application is IGUIApplication)
            {
                stream.Load("Moduls", null, new ModulsPersists(this.Application as IMapApplication));
                stream.Load("Tools", null, new ToolsPersist(this.Application as IGUIApplication));
                stream.Load("Toolbars", null, new ToolbarsPersist(this.Application as IGUIApplication));
            }
            _tableRelations = (TableRelations)stream.Load("TableRelations", new TableRelations(this), new TableRelations(this));

            return(true);
        }
Ejemplo n.º 2
0
		public void Load(IPersistStream stream)
		{
            while (_maps.Count > 0)
            {
                this.RemoveMap((IMap)_maps[0]);
            }

			_focusMapIndex=(int)stream.Load("focusMapIndex",(int)0);

			IMap map;
			while((map=(IMap)stream.Load("IMap",null,new gView.Framework.Carto.Map()))!=null)
			{
				this.AddMap(map);
			}

            if (_maps.Count > 0)
                FocusMap = _maps[0];
            else
                FocusMap = null;

            if (this.Application is IGUIApplication)
            {
                stream.Load("Moduls", null, new ModulsPersists(this.Application as IMapApplication));
                stream.Load("Tools", null, new ToolsPersist(this.Application as IGUIApplication));
                stream.Load("Toolbars", null, new ToolbarsPersist(this.Application as IGUIApplication));
            }
            _tableRelations = (TableRelations)stream.Load("TableRelations", new TableRelations(this), new TableRelations(this));
		}
Ejemplo n.º 3
0
        public MxlDocument()
        {
            _maps           = new List <IMap>();
            _tableRelations = new TableRelations(null);

            if (Current.Engine == null)
            {
                SystemInfo.RegisterDefaultGraphicEnginges();
            }
        }
Ejemplo n.º 4
0
 public MapDocument()
 {
     _maps           = new List <IMap>();
     _tableRelations = new TableRelations(this);
 }
Ejemplo n.º 5
0
 public ServerMapDocument()
 {
     _tableRelations = new TableRelations(this);
 }
Ejemplo n.º 6
0
 public ServerMapDocument(MapServiceManager mapServerService)
 {
     _mapServerService = mapServerService;
     _tableRelations   = new TableRelations(this);
 }