Ejemplo n.º 1
0
        private async void DeleteVaultCommandAction(Object parameter)
        {
            App.AppLogger.Logger.Log(devoctomy.DFramework.Logging.Interfaces.LoggerMessageType.VerboseHigh | devoctomy.DFramework.Logging.Interfaces.LoggerMessageType.Information, "Delete Vault command invoked.");

            VaultIndex vaultIndex = (VaultIndex)parameter;

            if (vaultIndex.IsInLocalVaultStore)
            {
                Boolean?deleted = VaultIndexFile.Instance.DeleteFromVault(vaultIndex);
                if (deleted.HasValue)
                {
                    Vaults.Remove(vaultIndex);
                    if (!deleted.Value)
                    {
                        await App.Controller.MainPageInstance.DisplayAlert("Delete Vault",
                                                                           "Successfully removed the vault from cachy, but failed to delete the vault file from the local vault store.",
                                                                           "OK");
                    }
                }
                else
                {
                    await App.Controller.MainPageInstance.DisplayAlert("Delete Vault",
                                                                       "Failed to remove the vault from cachy.",
                                                                       "OK");
                }
                NotifyPropertyChanged("IsEmpty");
                NotifyPropertyChanged("ShowVaultListTip");
            }
            else
            {
                await App.Controller.MainPageInstance.DisplayAlert("Delete Vault",
                                                                   "Only vaults that are stored in the local vault store can be deleted, you must remove this vault instead.",
                                                                   "OK");
            }
        }
Ejemplo n.º 2
0
        private void RemoveVaultCommandAction(Object parameter)
        {
            App.AppLogger.Logger.Log(devoctomy.DFramework.Logging.Interfaces.LoggerMessageType.VerboseHigh | devoctomy.DFramework.Logging.Interfaces.LoggerMessageType.Information, "Remove Vault command invoked.");

            VaultIndex vaultIndex = (VaultIndex)parameter;

            if (VaultIndexFile.Instance.RemoveFromVault(vaultIndex))
            {
                Vaults.Remove(vaultIndex);
                NotifyPropertyChanged("IsEmpty");
                NotifyPropertyChanged("ShowVaultListTip");
            }
        }
Ejemplo n.º 3
0
        private void RemoveVault()
        {
            ClearVault();

            Vaults.Remove(this);
        }