예제 #1
0
 private async void AddTodoButton_Click(object sender, RoutedEventArgs e)
 {
     (sender as Button).IsEnabled = false;
     try
     {
         MainPage.Current.TodoList.Add(_sourceFeed);
         AddTodoButton.Visibility    = Visibility.Collapsed;
         RemoveTodoButton.Visibility = Visibility.Visible;
         new PopupToast(AppTools.GetReswLanguage("Tip_AddTodoListSuccess")).ShowPopup();
         await IOTools.AddTodoRead(_sourceFeed);
     }
     catch (Exception ex)
     {
         new PopupToast(ex.Message, AppTools.GetThemeSolidColorBrush(ColorType.ErrorColor)).ShowPopup();
     }
     (sender as Button).IsEnabled = true;
 }