private async Task DeleteAsync() { EventLog.LogEvent("deleteAzureAccount", "name: {name}", _client?.UserInfo?.DisplayableId); ConnectedAccount.AzureAccounts.Remove(_connectedAzureAccount); ConnectedAccount.Save(); }
private async Task DeleteAsync() { if (await Dialogs.AskYesNoAsync("Delete Account", $"Are you sure you want to delete '{DisplayName}'? This cannot be undone.")) { ConnectedAccount.RootFolder.DeleteById(_connectedEntity.Id); ConnectedAccount.Save(); } }
private Task SaveAsync() { ConnectedAccount ca = CreateConnectedAccount(); EventLog.LogEvent("saveAzureAccount", "prefix: {prefix}", ca.Prefix); GlobalState.LastConnectedFolder.Children.Add(ca); ConnectedAccount.Save(); return(Task.CompletedTask); }
private async Task RenameAsync() { string newName = await Dialogs.AskStringInputAsync("Rename", "Name", DisplayName); if (!string.IsNullOrEmpty(newName)) { _connectedEntity.DisplayName = newName; ConnectedAccount.Save(); } }
private async Task AddRootFolderAsync() { string name = await Dialogs.AskStringInputAsync("Add folder", "Name"); if (name == null) { return; } EventLog.LogEvent("addRootFolder", "name: {name}", name); ConnectedAccount.RootFolder.Children.Add(new ConnectedFolder { DisplayName = name }); ConnectedAccount.Save(); }