// Plugin Names Box /// <summary> /// The combo box plugin name_ selected index changed. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The e.</param> /// <remarks></remarks> private void comboBoxPluginName_SelectedIndexChanged(object sender, EventArgs e) { // Reload tag box check marks if (treeViewTags.Nodes.Count <= 0) { return; } Prefs.CustomPluginMask mask = Prefs.CustomPluginMasks[comboBoxPluginName.SelectedIndex]; TreeNode tn = treeViewTags.Nodes[0]; while (tn != null) { if (mask.VisibleTagTypes.Contains(tn.Text)) { tn.Checked = true; } else { tn.Checked = false; } // CreateTree(ifpx.items, tn, path); tn = tn.NextNode; } // Reload selected tag info tn = treeViewTags.SelectedNode; treeViewTags.SelectedNode = null; treeViewTags.SelectedNode = tn; }
/// <summary> /// The tree view tags_ after check. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The e.</param> /// <remarks></remarks> private void treeViewTags_AfterCheck(object sender, TreeViewEventArgs e) { Prefs.CustomPluginMask mask = Prefs.CustomPluginMasks[comboBoxPluginName.SelectedIndex]; if (e.Node.Checked) { if (!mask.VisibleTagTypes.Contains(e.Node.Text)) { mask.VisibleTagTypes.Add(e.Node.Text); } } else { mask.VisibleTagTypes.Remove(e.Node.Text); } tagsChanged = true; }
/// <summary> /// The button 3_ click. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The e.</param> /// <remarks></remarks> private void dupBtn_Click(object sender, EventArgs e) { string name = GetNameDialog.Show( "Select duplicated plugin name", "Select name for the duplicated plugin:", comboBoxPluginName.Text, "&Duplicate"); if (name != null) { Prefs.CustomPluginMask newMask = new Prefs.CustomPluginMask(); newMask.Name = Prefs.CustomPluginMasks[comboBoxPluginName.SelectedIndex].Name; newMask.VisibleTagTypes.AddRange(Prefs.CustomPluginMasks[comboBoxPluginName.SelectedIndex].VisibleTagTypes); Prefs.CustomPluginMasks.Add(newMask); comboBoxPluginName.SelectedIndex = comboBoxPluginName.Items.Add(name); } }