Exemplo n.º 1
0
        private bool IsConnected()
        {
            var lastCity = Cities.First().Value;

            IsConnected(lastCity);
            return(ConnectedCities.Count == CitiesCount);
        }
Exemplo n.º 2
0
        private void Init()
        {
            var          firstCity = Cities.First(item => item.IsSelected);
            RasterReader reader    = new RasterReader(HighTrainNoFolderPath, firstCity.Name + "_高铁未通车" + ".tif");

            Info     = reader.RasterInfo;
            RasterOp = new RasterOp(reader);
            RasterOp.Reset();
        }
Exemplo n.º 3
0
        public City FindById(int id)
        {
            if (Cities.Count == 0)
            {
                return(null);
            }
            var city = Cities.First(c => c.Id == id);

            AddToHistory(city);
            return(city);
        }
        public AddDistributionVM()
        {
            AddDistributionM = new AddDistributionM();
            Recipients       = new ObservableCollection <Recipient>(AddDistributionM.Recipients);

            DistributionDate = DateTime.Now.Date;

            GetAllCities();
            SelectedCity = Cities.First(x => x.Equals("כל הארץ"));

            AreasMap = new MapUC();
        }
Exemplo n.º 5
0
 public async Task Init()
 {
     try
     {
         Cities           = wfModel.ListCities();
         SelectedCity     = Cities.First();
         Languages        = wfModel.ListLanguages();
         SelectedLanguage = Languages.FirstOrDefault(x => x.Code == ConfigHelper.GetLanguage());
         await LoadWeatherForecast(null);
     }
     catch (Exception ex)
     {
         HandleException(ex);
     }
 }
Exemplo n.º 6
0
        public async Task GetPickerValues()
        {
            var countriesList = await CountryDataStore.GetItemsAsync();

            foreach (Country c in countriesList)
            {
                Countries.Add(c);
            }

            SelectedCountry = Countries.First(x => x.Id == Model.Country.Id);


            var citiesList = await CityDataStore.GetItemsAsync();

            foreach (var item in citiesList)
            {
                Cities.Add(item);
            }

            SelectedCity = Cities.First(x => x.Id == Model.City.Id);


            var seasonsList = await SeasonDataStore.GetItemsAsync();

            foreach (var item in seasonsList)
            {
                Seasons.Add(item);
            }

            SelectedSeason = Seasons.First(x => x.Id == Model.Season.Id);


            var currenciesList = await CurrencyDataStore.GetItemsAsync();

            foreach (var item in currenciesList)
            {
                Currencies.Add(item);
            }

            SelectedCurrency = Currencies.First(x => x.Id == Model.Currency.Id);

            IsBusy = false;
        }