public void Execute(object parameter) { if (System.Windows.MessageBox.Show( "Are you sure?", "Logout", System.Windows.MessageBoxButton.OKCancel) == System.Windows.MessageBoxResult.OK) { bool success = CoreExtensions.DeleteFileFromStorage("user.xml"); string message = success ? "Logout successful." : "Logout failed."; System.Windows.Notification.Show(message, "Logout"); } OnCanExecuteChanged(); }
public void DeleteDraft() { CoreExtensions.DeleteFileFromStorage("reply.xml"); }