private void HousesLoaded()
        {
            Application.Invoke((sender, e) =>
            {
                var houses           = HousesDataLoader.GetHouses();
                _completionListStore = new ListStore(typeof(HouseDTO));

                foreach (var house in houses)
                {
                    _completionListStore.AppendValues(house);
                }

                if (Completion != null)
                {
                    Completion.Model = _completionListStore;

                    if (HasFocus)
                    {
                        Completion.Complete();
                    }

                    CompletionLoaded?.Invoke(null, EventArgs.Empty);
                }
            });
        }
Beispiel #2
0
        private void HousesLoaded()
        {
            Application.Invoke((sender, e) => {
                OsmHouse[] houses   = HousesDataLoader.GetHouses();
                completionListStore = new ListStore(typeof(string), typeof(long), typeof(OsmHouse));

                foreach (var h in houses)
                {
                    completionListStore.AppendValues(h.ComplexNumber, h.Id, h);
                }

                if (Completion != null)
                {
                    Completion.Model = completionListStore;
                    if (HasFocus)
                    {
                        Completion?.Complete();
                    }
                    CompletionLoaded?.Invoke(null, EventArgs.Empty);
                }
            });
        }