Пример #1
0
 private void addCacheContainer(int id, string name)
 {
     Data.GeocacheContainer attr = new Data.GeocacheContainer();
     attr.ID   = id;
     attr.Name = name;
     GeocacheContainers.Add(attr);
 }
Пример #2
0
        public static GAPPSF.Core.Data.GeocacheContainer GetGeocacheContainer(string container)
        {
            GAPPSF.Core.Data.GeocacheContainer result = null;

            container = container.ToLower();
            result    = (from gt in ApplicationData.Instance.GeocacheContainers
                         where gt.Name.ToLower() == container
                         select gt).FirstOrDefault();
            if (result == null)
            {
                //take special ID
                result = GetGeocacheContainer(0);
            }
            return(result);
        }
Пример #3
0
        public static GAPPSF.Core.Data.GeocacheContainer GetGeocacheContainer(int containerId)
        {
            GAPPSF.Core.Data.GeocacheContainer result = null;

            result = (from gt in ApplicationData.Instance.GeocacheContainers
                      where gt.ID == containerId
                      select gt).FirstOrDefault();
            if (result == null)
            {
                //take special ID
                result = (from gt in ApplicationData.Instance.GeocacheContainers
                          where gt.ID == 0
                          select gt).FirstOrDefault();
            }
            return(result);
        }