예제 #1
0
        private void BtnDelAll_Click(object sender, RoutedEventArgs e)
        {
            var result = MessageBox.Show(_mainWindow, "真的要删除全部吗?", _mainWindow.Title, MessageBoxButton.YesNo,
                                         MessageBoxImage.Question);

            if (result == MessageBoxResult.Yes)
            {
                _appDbOperator.ClearRecent();
                UpdateList();
            }
        }
예제 #2
0
 public bool TryClearRecent()
 {
     try
     {
         _dbOperator.ClearRecent();
         return(true);
     }
     catch (Exception ex)
     {
         Notification.Push($"Error while clearing recent: {ex.Message}");
         return(false);
     }
 }