Example #1
0
 protected override void OnExecute(object parameter)
 {
     if (parameter is ITypeDescriptor descriptor)
     {
         var itemPaths = this.browser.GetBookmarkItemPaths();
         var dialog    = new AddBookmarkItemViewModel(this.authenticator, descriptor.Name, itemPaths);
         if (dialog.ShowDialog() == true)
         {
             this.browser.AddBookmarkItem(dialog.TargetPath, descriptor);
         }
     }
 }
 protected async override void OnExecute(object parameter)
 {
     if (parameter is ITableDescriptor descriptor)
     {
         var categoryPaths = this.browser.GetBookmarkCategoryPaths();
         var dialog        = new AddBookmarkItemViewModel(this.authenticator, descriptor.Name, categoryPaths);
         if (await dialog.ShowDialogAsync() == true)
         {
             this.browser.AddBookmarkItem(dialog.TargetPath, descriptor);
         }
     }
 }