Exemple #1
0
 public async Task NewFolderAsync()
 {
     if (await TableCategoryUtility.NewFolderAsync(this.authentication, this.descriptor) is string categoryName)
     {
         var viewModel = this.Items.First(item => item.DisplayName == categoryName);
         this.IsExpanded      = true;
         viewModel.IsSelected = true;
     }
 }
Exemple #2
0
 public async Task NewTableAsync()
 {
     if (await TableCategoryUtility.NewTableAsync(this.authentication, this.descriptor) is string tableName)
     {
         if (this.Owner is ISelector owner)
         {
             var viewModel = this.Items.FirstOrDefault(item => item.DisplayName == tableName);
             owner.SelectedItem = viewModel;
         }
     }
 }
Exemple #3
0
        public async Task MoveAsync()
        {
            if (await TableCategoryUtility.MoveAsync(this.authentication, this.descriptor) == false)
            {
                return;
            }

            if (this.Owner is ISelector)
            {
                this.ExpandAncestors();
            }
        }
Exemple #4
0
        public async Task RenameAsync()
        {
            if (await TableCategoryUtility.RenameAsync(this.authentication, this.descriptor) == false)
            {
                return;
            }

            if (this.Owner is ISelector owner)
            {
                owner.SelectedItem = this;
            }
        }
Exemple #5
0
 public async Task DeleteAsync()
 {
     await TableCategoryUtility.DeleteAsync(this.authentication, this.descriptor);
 }