Exemple #1
0
        public async void ToggleQuote(object sender, RoutedEventArgs e)
        {
            var toggleSwitch = (ToggleSwitch)sender;

            if (IsDisplayQuote != toggleSwitch.IsOn)
            {
                await StartVm.UpdateListTask();
            }
        }
Exemple #2
0
        public async void ToggleTemperature(object sender, RoutedEventArgs e)
        {
            var toggleSwitch = (ToggleSwitch)sender;

            if (IsFahrenheit != toggleSwitch.IsOn)
            {
                await StartVm.UpdateListTask();
            }
        }
Exemple #3
0
        public async void ToggleOfflineQuote(object sender, RoutedEventArgs e)
        {
            var toggleSwitch = (ToggleSwitch)sender;

            if (SettingManager.GetOfflineQuote() != null && IsOfflineQuote != toggleSwitch.IsOn)
            {
                await StartVm.UpdateListTask();
            }
        }
Exemple #4
0
        public async void ToggleWeather(object sender, RoutedEventArgs e)
        {
            var toggleSwitch = (ToggleSwitch)sender;

            if (IsShowWeather != toggleSwitch.IsOn)
            {
                await StartVm.UpdateListTask();
            }
        }
Exemple #5
0
        public async void AutoSuggestBox_OnQuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
        {
            if (IsFixedLocation && sender.Text != "")
            {
                IsNormalMode     = true;
                FixedGeoLocation = await _googleMapApi.GetGpsFromAddressTask(sender.Text);

                SettingManager.SetUserLocation(sender.Text);
                await StartVm.UpdateListTask();
            }
        }
Exemple #6
0
        public async void SaveOfflineQuote()
        {
            if (string.IsNullOrEmpty(OfflineQuote))
            {
                var dialog = new MessageDialog("You need to fill all informations");
                await dialog.ShowAsync();
            }
            else
            {
                SettingManager.SetOfflineQuote(OfflineQuote + "|" + OfflineAuthor);

                await StartVm.UpdateListTask();
            }
        }
        public async void SaveNote()
        {
            if (string.IsNullOrEmpty(Note))
            {
                var dialog = new MessageDialog("You need to write your note");
                await dialog.ShowAsync();
            }
            else
            {
                SettingManager.SetNote(Note);

                await StartVm.UpdateListTask();
            }
        }
Exemple #8
0
        public async void PositionComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var comboBox = (ComboBox)sender;

            SelectedPosition = (ImageSourceItem)comboBox.SelectedItem;

            var number = PositionHelper.GetElementPosition("Q");

            if (SelectedPosition != null)
            {
                if (SelectedPosition.Number != number)
                {
                    PositionHelper.SetElementPosition("Q", SelectedPosition.Number);
                    await StartVm.UpdateListTask();
                }
            }
        }
Exemple #9
0
        public async void ToggleFixedLocation(object sender, RoutedEventArgs e)
        {
            var toggleSwitch = (ToggleSwitch)sender;

            if (IsFixedLocation != toggleSwitch.IsOn)
            {
                //Get user location if FixedLocation Mode is OFF & haven't gotten location yet
                if (IsFixedLocation)
                {
                    if (GeoLocation == null || !GeoLocation.Results.Any())
                    {
                        await GetGeoLocation();
                    }
                }
                await StartVm.UpdateListTask();
            }
        }