private void AddUntaggedQuickContextMenu()
 {
     this.unTaggedQuickMenuItem = CreateTagMenuItem(Settings.UNTAGGED_NODENAME);
     this.unTaggedQuickMenuItem.DropDownItemClicked += this.quickContextMenu_ItemClicked;
     this.unTaggedQuickMenuItem.DropDownOpening     += OnTagTrayMenuItemDropDownOpening;
     this.quickContextMenu.Items.Add(this.unTaggedQuickMenuItem);
 }
        private static TagMenuItem CreateTagMenuItem(string tag)
        {
            TagMenuItem tagMenuItem = new TagMenuItem {
                Tag = TAG, Text = tag
            };

            return(tagMenuItem);
        }
        private void CreateUntaggedItem()
        {
            if (untaggedToolStripMenuItem == null)
            {
                this.untaggedToolStripMenuItem = CreateTagMenuItem(Settings.UNTAGGED_NODENAME);
                this.untaggedToolStripMenuItem.DropDownOpening += this.OnTagMenuDropDownOpening;
                this.favoritesToolStripMenuItem.DropDownItems.Add(this.untaggedToolStripMenuItem);
            }

            if (untaggedToolStripMenuItem.Visible == false)
            {
                untaggedToolStripMenuItem.Visible = true;
            }
        }
        private static void OnTagTrayMenuItemDropDownOpening(object sender, EventArgs e)
        {
            TagMenuItem tagMenu = sender as TagMenuItem;

            if (tagMenu.IsEmpty)
            {
                tagMenu.DropDown.Items.Clear();
                List <FavoriteConfigurationElement> tagFavorites = Settings.GetSortedFavoritesByTag(tagMenu.Text, false);
                foreach (FavoriteConfigurationElement favorite in tagFavorites)
                {
                    ToolStripMenuItem item = CreateFavoriteMenuItem(favorite);
                    tagMenu.DropDown.Items.Add(item);
                }
            }
        }
 private static TagMenuItem CreateTagMenuItem(String tag)
 {
     TagMenuItem tagMenuItem = new TagMenuItem {Tag = TAG, Text = tag};
     return tagMenuItem;
 }
 private void AddUntaggedQuickContextMenu()
 {
     this.unTaggedQuickMenuItem = CreateTagMenuItem(Settings.UNTAGGED_NODENAME);
     this.unTaggedQuickMenuItem.DropDownItemClicked += this.quickContextMenu_ItemClicked;
     this.unTaggedQuickMenuItem.DropDownOpening += OnTagTrayMenuItemDropDownOpening;
     this.quickContextMenu.Items.Add(this.unTaggedQuickMenuItem);
 }
        private void CreateUntaggedItem()
        {
            if (untaggedToolStripMenuItem == null)
            {
                this.untaggedToolStripMenuItem = CreateTagMenuItem(Settings.UNTAGGED_NODENAME);
                this.untaggedToolStripMenuItem.DropDownOpening += this.OnTagMenuDropDownOpening;
                this.favoritesToolStripMenuItem.DropDownItems.Add(this.untaggedToolStripMenuItem);
            }

            if (untaggedToolStripMenuItem.Visible == false)
                untaggedToolStripMenuItem.Visible = true;
        }