コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: yezi34880/Time
 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
ファイル: MainPage.xaml.cs プロジェクト: yezi34880/Time
        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();
        }