private void EditTags(DataGridViewRow rw) { List <string> Dickeys = new List <string>(tags.Keys); Dickeys.Sort(); List <Image> images = (from x in Dickeys select tags[x]).ToList(); List <string> curtags = rw.Cells[4].Tag as List <string>; // may be null string taglist = curtags != null?string.Join(";", curtags) : ""; System.Diagnostics.Debug.WriteLine("Cur keys" + curtags); Point loc = dataGridView.PointToScreen(dataGridView.GetCellDisplayRectangle(4, rw.Index, false).Location); cfs.Filter(taglist, loc, new Size(250, 600), this.FindForm(), Dickeys, images, tag: rw); }
private void EditTags(DataGridViewRow rw) { List <string> Dickeys = new List <string>(EDDConfig.Instance.CaptainsLogTagImage.Keys); Dickeys.Sort(); List <Tuple <string, string, Image> > options = (from x in Dickeys select new Tuple <string, string, Image>(x.ToString(), x.ToString(), EDDConfig.Instance.CaptainsLogTagImage[x])).ToList(); ExtendedControls.CheckedIconListBoxFilterForm cfs = new ExtendedControls.CheckedIconListBoxFilterForm(); cfs.AllOrNoneBack = false; // we want the whole list, makes it easier. cfs.Closing += TagsChanged; cfs.AddStandardOption(options); List <string> curtags = rw.Cells[4].Tag as List <string>; // may be null string taglist = curtags != null?string.Join(";", curtags) : ""; System.Diagnostics.Debug.WriteLine("Cur keys" + curtags); Point loc = dataGridView.PointToScreen(dataGridView.GetCellDisplayRectangle(4, rw.Index, false).Location); cfs.Filter(taglist, loc, new Size(250, 600), this.FindForm(), tag: rw); }