Beispiel #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;
     }
 }
Beispiel #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;
         }
     }
 }
Beispiel #3
0
        public async Task MoveAsync()
        {
            if (await TableCategoryUtility.MoveAsync(this.authentication, this.descriptor) == false)
            {
                return;
            }

            if (this.Owner is ISelector)
            {
                this.ExpandAncestors();
            }
        }
Beispiel #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;
            }
        }
Beispiel #5
0
 public async Task DeleteAsync()
 {
     await TableCategoryUtility.DeleteAsync(this.authentication, this.descriptor);
 }