private void InitList(ref CheckedPlainListBox list, string name, IResourceList rules) { list = new CheckedPlainListBox(); list.Name = name; list.TabIndex = 1; list.Location = new Point(0, 0); list.Size = new Size(300, 246); list.DoubleClick += list_DoubleClick; list.SelectionChanged += list_SelectionChanged; list.AddDecorator(_decorator); int propId = Core.ResourceStore.PropTypes["Order"].Id; rules.Sort(new SortSettings(propId, true)); list.Resources = rules; foreach (IResource res in rules) { list.SetCheckState(res, res.HasProp("RuleTurnedOff") ? CheckBoxState.Unchecked : CheckBoxState.Checked); } if (rules.Count > 0) { list.SelectSingleItem(rules[0]); } }
private TabPage CreateTab(TabPage page, CheckedPlainListBox list, String name, String tagString, String title) { page.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; page.Controls.Add(list); page.Location = new System.Drawing.Point(4, 22); page.Name = name; page.Size = new System.Drawing.Size(284, 250); page.TabIndex = 0; page.Tag = tagString; page.Text = title; list.Dock = DockStyle.Fill; return(page); }
private void SwitchContext(CheckedPlainListBox listBox, ArrayList added, ArrayList deleted) { _listRules = listBox; AddedRules = added; RemovedRules = deleted; }