public async Task SaveDatabaseCopyAs() { var newDatabasePath = await _databaseInteractions.SaveDatabaseCopyAs(SelectedDatabase); if (newDatabasePath.HasValue) { NotificationInteraction.Default() .HasMessage($"Database copy saved in:\n{newDatabasePath.Value.ShrinkPath(128)}") .Dismiss().WithButton("Open", async button => { await _databaseInteractions.OpenDatabase(newDatabasePath.Value).ConfigureAwait(false); }) .WithButton("Reveal in Explorer", button => { _applicationInteraction.RevealInExplorer(newDatabasePath.Value); }) .Dismiss().WithButton("Close", button => { }) .Queue(); } }
private bool CheckFormCorrect() { try { if (String.IsNullOrWhiteSpace(_SalarySlipName)) { throw new Exception(Localization.Messages.MSG_NAME_NOT_CHOOSEN); } if (String.IsNullOrWhiteSpace(ChoosenFile)) { throw new Exception(Localization.Messages.MSG_FILE_NOT_CHOOSEN); } return(true); } catch (Exception Ex) { NotificationInteraction.Raise(new Notification() { Title = Localization.Strings.SALARY_SLIP_ADD_EXC_TITLE, Content = Ex.Message }); return(false); } }