public void FilterButton(string db, Control ctr, Color back, Color fore, Form parent, List<string> list ) { if (cc == null) { dbstring = db; cc = new ExtendedControls.CheckedListControlCustom(); cc.Items.Add("All"); cc.Items.Add("None"); if (selectedlist != null) cc.Items.Add(selectedlistname); cc.Items.AddRange(list.ToArray()); cc.SetChecked(SQLiteDBClass.GetSettingString(dbstring, "All")); SetFilterSet(); cc.FormClosed += FilterClosed; cc.CheckedChanged += FilterCheckChanged; cc.PositionBelow(ctr, new Size(ctr.Width*2, 400)); cc.SetColour(back,fore); cc.Show(parent); } else cc.Close(); }
public void FilterButton(string db, Point p, Size s, Color back, Color fore, Form parent, List <string> list) { if (cc == null) { dbstring = db; cc = new ExtendedControls.CheckedListControlCustom(); cc.Items.Add("All"); cc.Items.Add("None"); cc.Items.AddRange(list.ToArray()); cc.SetChecked(SQLiteDBClass.GetSettingString(dbstring, "All")); SetFilterSet(); cc.FormClosed += FilterClosed; cc.CheckedChanged += FilterCheckChanged; cc.PositionSize(p, s); cc.SetColour(back, fore); cc.Show(parent); } else { cc.Close(); } }
public void FilterButton(string db, Control ctr, Color back, Color fore, Form parent, List <string> list) { if (cc == null) { dbstring = db; cc = new ExtendedControls.CheckedListControlCustom(); cc.Items.Add("All"); cc.Items.Add("None"); if (selectedlist != null) { cc.Items.Add(selectedlistname); } cc.Items.AddRange(list.ToArray()); cc.SetChecked(SQLiteDBClass.GetSettingString(dbstring, "All")); SetFilterSet(); cc.FormClosed += FilterClosed; cc.CheckedChanged += FilterCheckChanged; cc.PositionBelow(ctr, new Size(ctr.Width * 2, 400)); cc.SetColour(back, fore); cc.Show(parent); } else { cc.Close(); } }