Example #1
0
        public MeteoListPage()
        {
            InitializeComponent();

            GetLocation();

            BindingContext = new MeteoListViewModel(entry);
        }
Example #2
0
        public MeteoListPage()
        {
            InitializeComponent();

            BindingContext = new MeteoListViewModel();

            GetWeathers();

            IAdvancedTimer timer = DependencyService.Get <IAdvancedTimer>();

            timer.initTimer(3000, updateCurrentLocation, true);

            timer.startTimer();
        }
Example #3
0
        private async void OnItemAdded(object sender, EventArgs e)
        {
            var pResult = await UserDialogs.Instance.PromptAsync(new PromptConfig
            {
                InputType = InputType.Name,
                OkText    = "Create",
                Title     = "Add new city"
            });


            if (pResult.Ok && !string.IsNullOrWhiteSpace(pResult.Text))
            {
                await App.DatabaseManager.SaveCity(new Entry {
                    Name = pResult.Text,
                    //ID = 0,
                    Latitude  = 0.0,
                    Longitude = 0.0
                });
            }

            List <Entry> cities = App.DatabaseManager.GetAllCities().Result;

            BindingContext = new MeteoListViewModel(entry);
        }
 public MeteoListPage()
 {
     InitializeComponent();
     BindingContext = new MeteoListViewModel();
 }