private void loadFilters(FilterInfo info) { FilterPreview preview = new FilterPreview(); if (info.Image != null) { preview.Image = info.Image; } else { preview.Image = Resources.Preview; } preview.Location = new Point(0, loadedFilters * 92); preview.Size = new Size(120, 90); preview.Filter = info.Filter; preview.onClick = filterTab_Click; filterControls.Add(preview); filterPanel.Controls.Add(preview); loadedFilters++; if (filters.Count > 0) { filters.RemoveAt(0); loadFilters(); } }
private void filterTab_Click(FilterPreview filterControl) { foreach(FilterPreview control in filterControls){ if (control.Selected) { control.Selected = false; control.Invalidate(); } } filterControl.Selected = true; }
private void filterTab_Click(FilterPreview filterControl) { foreach (FilterPreview control in filterControls) { if (control.Selected) { control.Selected = false; control.Invalidate(); } } filterControl.Selected = true; }