public async Task NewFolderAsync() { if (await TypeCategoryUtility.NewFolderAsync(this.authentication, this.descriptor) is string categoryName) { var viewModel = this.Items.First(item => item.DisplayName == categoryName); this.IsExpanded = true; viewModel.IsSelected = true; } }
public async Task NewTypeAsync() { if (await TypeCategoryUtility.NewTypeAsync(this.authentication, this.descriptor) is string typeName) { if (this.Owner is ISelector owner) { var viewModel = this.Items.FirstOrDefault(item => item.DisplayName == typeName); owner.SelectedItem = viewModel; } } }
public async Task RenameAsync() { if (await TypeCategoryUtility.RenameAsync(this.authentication, this.descriptor) == false) { return; } if (this.Owner is ISelector owner) { owner.SelectedItem = this; } }
public async Task MoveAsync() { if (await TypeCategoryUtility.MoveAsync(this.authentication, this.descriptor) == false) { return; } if (this.Owner is ISelector) { this.ExpandAncestors(); } }
public async Task FindAsync() { await TypeCategoryUtility.FindAsync(this.authentication, this.descriptor); }