Exemplo n.º 1
0
        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();
            }
        }
Exemplo n.º 2
0
 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);
     }
 }