Ejemplo n.º 1
0
        public void GetCoordinates(out decimal?longitude, out decimal?latitude)
        {
            longitude = null;
            latitude  = null;
            var osmRow = completionListStore == null ? null : completionListStore.Cast <object[]>().FirstOrDefault(row => (string)row[0] == House);

            if (osmRow == null)
            {
                return;
            }

            var osmhouse = (OsmHouse)osmRow[2];

            longitude = osmhouse.X;
            latitude  = osmhouse.Y;
        }
Ejemplo n.º 2
0
        protected override void OnChanged()
        {
            if (completionListStore != null)
            {
                var houserow = completionListStore.Cast <object[]>().FirstOrDefault(row => (string)row[0] == Text);
                if (houserow != null)
                {
                    OsmHouse = houserow[2] as OsmHouse;
                }
            }

            Binding.FireChange(w => w.House, w => w.Text, w => w.OsmCompletion, w => w.Latitude, w => w.Longitude);
            base.OnChanged();
        }
Ejemplo n.º 3
0
        protected override bool OnFocusOutEvent(EventFocus evnt)
        {
            var houseRow = _completionListStore?.Cast <object[]>().FirstOrDefault(row => ((HouseDTO)row[0]).ComplexNumber == BuildingName);

            if (houseRow == null)
            {
                FiasGuid  = null;
                FiasHouse = null;
            }
            else
            {
                var house = ((HouseDTO)houseRow[0]);
                FiasGuid  = house.FiasGuid;
                FiasHouse = house;
            }

            Binding.FireChange(w => w.BuildingName);

            return(base.OnFocusOutEvent(evnt));
        }
Ejemplo n.º 4
0
 public IEnumerable <Scheme> GetSchemeList()
 {
     // Welcome to the hell that is ListStores and LINQ
     return(schemes.Cast <object[]>().Select(x => x[0]).Cast <Scheme>());
 }