예제 #1
0
        public void CategoryChanged(object sender, EventArgs e)
        {
            if (tabControlImageTagger.TabPages.Count > 0)
            {
                if (ParentTagForm == null || ParentTagForm.ActiveCategory != WallpaperData.TaggingInfo.GetCategory(tabControlImageTagger.SelectedIndex)) // prevents this from being called when dragging tabs
                {
                    LoadTagContainer(tabControlImageTagger.SelectedIndex);

                    // This can only be called after ActiveCategory has been set
                    ParentTagForm?.UpdateCategoryControls();
                }
            }
        }
예제 #2
0
        public void tagContainerButton_DragDrop(object sender, DragEventArgs e)
        {
            if (selectedButtonPotentialTabPage != null)
            {
                string selectedTag      = TaggingTools.GetButtonTagName(selectedButton);
                string selectedCategory = selectedButtonPotentialTabPage.Text;
                if (MessageBox.Show("Move " + selectedTag + " to " + selectedCategory + "?", "Choose an option", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    ParentTagForm.MoveTag(selectedTag, selectedCategory);
                }
            }

            selectedButton = null;
            selectedButtonPotentialTabPage = null;
        }