Exemplo n.º 1
0
 private MAP registerNewMapInMapListReturnMap(int mapId, string mapName)
 {
     MAP newmap = new MAP();
     newmap.MapName = mapName;
     newmap.MapID = mapId;
     newmap.MapState = MapStates.Offering;
     newmap.DateAdded = DateTime.Now.ToString("dd MMM yyyy HH:mm");
     this.Maps.Add(newmap);
     return newmap;
 }
Exemplo n.º 2
0
 public void RegisterNewMapInMapList(int mapId, string mapName)
 {
     MAP newmap = new MAP();
     newmap.MapName = mapName;
     newmap.MapID = mapId;
     newmap.MapState = MapStates.Offering;
     //newmap.MapState = MapStates.INSTALLING;
     newmap.DateAdded = DateTime.Now.ToString("dd MMM yyyy HH:mm");
     this.Maps.Add(newmap);
 }
        public void setSelectedMap(MAP map)
        {
            if(map != null) 
            { 
                // present map's names and counts to XAML view
                foreach (resourseTypes type in Enum.GetValues(typeof(resourseTypes)))
                {
                    this.TBS[type].Text = map.resourcesCount[type].ToString();
                }

                this.MapName.Text = map.MapName;
                this.MapState.Text = map.MapState.ToString();
                this.MapDateAdded.Text = map.DateAdded;
            }
            else // do not existing map cannot have names and counts
            {
                foreach (resourseTypes type in Enum.GetValues(typeof(resourseTypes)))
                {
                    this.TBS[type].Text = "-";
                }

                this.MapName.Text = "-";
                this.MapState.Text = "-";
                this.MapDateAdded.Text = "-";
            }
            this.selectedMap = map;
        }