private void BtnDelAll_Click(object sender, RoutedEventArgs e) { var result = MsgBox.Show(_mainWindow, "真的要删除全部吗?", _mainWindow.Title, MessageBoxButton.YesNo, MessageBoxImage.Question); if (result == MessageBoxResult.Yes) { DbOperator.ClearRecent(); UpdateList(); } }