public TagBoxBuilder SelectAllMode(SelectAllMode value) { base.Options["selectAllMode"] = value; return(this); }
private void ShowJobTree(SelectAllMode mode) { Dictionary<string, List<string>> list = new Dictionary<string, List<string>>(); List<string> jobNames = (List<string>)ConfigUtils.GlobalConfig.Hierarchy.LevelNames(@"app\BITS_JOB_SPEC"); //for backward-compatibility if (jobNames.Count == 0) jobNames = (List<string>) ConfigUtils.GlobalConfig.Hierarchy.LevelNames(@"appgroup\BITS_JOB_SPEC"); IEnumerable<string> categories = GetCategories(jobNames); this.SuspendLayout(); ClearTreeNodes(); foreach (string s in jobNames) { List<string> l = null; string cat = GetCategory(s); if (list.ContainsKey(cat)) l = list[cat]; else l = new List<string>(); if (l.Contains(s) == false) { l.Add(s); } list[cat] = l; } foreach (string cat in categories) { //GroupBarItem item = new GroupBarItem(); TreeNodeAdv node = new TreeNodeAdv(); node.Text = cat; List<string> l = list[cat]; foreach (string ll in l) { TreeNodeAdv node2 = new TreeNodeAdv(); node2.Text = ll; node2.InteractiveCheckBox = true; node2.ShowCheckBox = true; if (mode.Equals(SelectAllMode.Default) && entitlements.Contains(ll)) node2.Checked = true; else if (mode.Equals(SelectAllMode.SelectAll)) node2.Checked = true; else if (mode.Equals(SelectAllMode.SelectNone)) node2.Checked = false; if (node2.Nodes != null && !node.Nodes.Contains(node2)) node.Nodes.Add(node2); } treeViewJobs.Nodes.Add(node); } if (mode.Equals(SelectAllMode.SelectAll) || mode.Equals(SelectAllMode.Default)) treeViewJobs.ExpandAll(); else if (mode.Equals(SelectAllMode.SelectNone)) treeViewJobs.CollapseAll(); this.ResumeLayout(); }
public DataGridSelectionBuilder SelectAllMode(SelectAllMode value) { base.Options["selectAllMode"] = value; return(this); }