예제 #1
0
 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);
 }
예제 #2
0
        private static TagMenuItem CreateTagMenuItem(string tag)
        {
            TagMenuItem tagMenuItem = new TagMenuItem {
                Tag = TAG, Text = tag
            };

            return(tagMenuItem);
        }
예제 #3
0
        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;
            }
        }
예제 #4
0
        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);
                }
            }
        }
예제 #5
0
 private static TagMenuItem CreateTagMenuItem(String tag)
 {
     TagMenuItem tagMenuItem = new TagMenuItem {Tag = TAG, Text = tag};
     return tagMenuItem;
 }
예제 #6
0
 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);
 }
예제 #7
0
        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;
        }