Пример #1
0
 private async void Button_Tapped(object sender, TappedRoutedEventArgs e)
 {
     SettingDialog setting = new SettingDialog();
     var result = await setting.ShowAsync();
     if (result == ContentDialogResult.Primary)
     {
         DateTime.TryParse(ApplicationData.Current.LocalSettings.Values["Birth"].ToString(), out birth);
     }
 }
Пример #2
0
        private async void Button_Tapped(object sender, TappedRoutedEventArgs e)
        {
            SettingDialog setting = new SettingDialog();
            var           result  = await setting.ShowAsync();

            if (result == ContentDialogResult.Primary)
            {
                DateTime.TryParse(ApplicationData.Current.LocalSettings.Values["Birth"].ToString(), out birth);
            }
        }
Пример #3
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            if (ApplicationData.Current.LocalSettings.Values["Birth"]==null)
            {
                SettingDialog setting = new SettingDialog();
                await setting.ShowAsync();
            }
            DateTime.TryParse(ApplicationData.Current.LocalSettings.Values["Birth"].ToString(), out birth);

            var timer = new DispatcherTimer();
            timer.Interval = new TimeSpan(0, 0, 0, 0, 1);
            timer.Tick += Timer_Tick;
            timer.Start();
        }
Пример #4
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            if (ApplicationData.Current.LocalSettings.Values["Birth"] == null)
            {
                SettingDialog setting = new SettingDialog();
                await setting.ShowAsync();
            }
            DateTime.TryParse(ApplicationData.Current.LocalSettings.Values["Birth"].ToString(), out birth);

            var timer = new DispatcherTimer();

            timer.Interval = new TimeSpan(0, 0, 0, 0, 1);
            timer.Tick    += Timer_Tick;
            timer.Start();
        }