示例#1
0
        private async Task DeleteAsync()
        {
            EventLog.LogEvent("deleteAzureAccount", "name: {name}", _client?.UserInfo?.DisplayableId);

            ConnectedAccount.AzureAccounts.Remove(_connectedAzureAccount);
            ConnectedAccount.Save();
        }
示例#2
0
 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();
     }
 }
示例#3
0
        private Task SaveAsync()
        {
            ConnectedAccount ca = CreateConnectedAccount();

            EventLog.LogEvent("saveAzureAccount", "prefix: {prefix}", ca.Prefix);

            GlobalState.LastConnectedFolder.Children.Add(ca);
            ConnectedAccount.Save();
            return(Task.CompletedTask);
        }
示例#4
0
        private async Task RenameAsync()
        {
            string newName = await Dialogs.AskStringInputAsync("Rename", "Name", DisplayName);

            if (!string.IsNullOrEmpty(newName))
            {
                _connectedEntity.DisplayName = newName;
                ConnectedAccount.Save();
            }
        }
示例#5
0
        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();
        }