public void SetIconSelection(ComponentIcon icon) { foreach (Control c in Controls) { ComponentIcon ic = c as ComponentIcon; if (ic != null) { if (ic == icon) { if (!ic.IsSelected) { ic.IsSelected = true; ic.Invalidate(); _viewer.SetIconSelection(ic); } } else { if (ic.IsSelected) { ic.IsSelected = false; ic.Invalidate(); } } } } }
public void ClearIconSelection() { foreach (Control c in Controls) { ComponentIcon ic = c as ComponentIcon; if (ic != null) { if (ic.IsSelected) { ic.IsSelected = false; ic.Invalidate(); } } } }