Exemple #1
0
        public void Update(IActionContext context, ref ActionPresentation presentation)
        {
            if (context.Kind == ActionContextKind.Keyboard && Core.TabManager.CurrentTabId != "Web")
            {
                presentation.Visible = false;
                return;
            }

            if (context.Kind == ActionContextKind.MainMenu || context.Kind == ActionContextKind.Keyboard ||
                (context.CurrentUrl != null && context.CurrentUrl.Length > 0))
            {
                return;
            }
            if (context.Kind == ActionContextKind.ContextMenu && context.Instance != FavoritesPlugin._favoritesTreePane)
            {
                presentation.Visible = false;
                return;
            }

            int count = context.SelectedResources.Count;

            if (presentation.Visible = count < 2)
            {
                if (count == 1)
                {
                    FavoritesTools.IActionUpdateWeblinksOrFolders(
                        context, ref presentation, FavoritesTools.ActionType.Create);
                }
            }
            presentation.Enabled = presentation.Visible;
            presentation.Visible = true;
        }
Exemple #2
0
 public void Update(IActionContext context, ref ActionPresentation presentation)
 {
     FavoritesTools.IActionUpdateWeblinksOrFolders(
         context, ref presentation, FavoritesTools.ActionType.Edit);
     if (presentation.Visible &&
         context.SelectedResources.Count == 1 && context.SelectedResources[0].Type == "Folder")
     {
         IResourceList recursiveFavorites = Core.ResourceStore.EmptyResourceList;
         FavoritesPropertiesForm.RecursivelyUpdateResourceList(
             ref recursiveFavorites, context.SelectedResources[0], true);
         presentation.Visible = recursiveFavorites.Count > 0;
     }
 }
Exemple #3
0
 public void Update(IActionContext context, ref ActionPresentation presentation)
 {
     if (context.Instance != FavoritesPlugin._favoritesTreePane)
     {
         presentation.Visible = false;
     }
     else
     {
         int count = context.SelectedResources.Count;
         if (presentation.Visible = count < 2)
         {
             if (count == 1)
             {
                 FavoritesTools.IActionUpdateWeblinksOrFolders(
                     context, ref presentation, FavoritesTools.ActionType.Create);
             }
         }
         presentation.Enabled = presentation.Visible;
         presentation.Visible = true;
     }
 }
Exemple #4
0
 public void Update(IActionContext context, ref ActionPresentation presentation)
 {
     FavoritesTools.IActionUpdateWeblinksOrFolders(
         context, ref presentation, FavoritesTools.ActionType.Delete);
 }