public void SetEnableHotSpots(Control c, bool value) { if (c == null) { throw new ArgumentNullException(); } if (!CanExtend(c)) { throw new ArgumentException("Control must be derived from TextBoxBase"); } if (!value) { HotSpotPainter hotSpotPainter; if (_extendees.TryGetValue(c, out hotSpotPainter)) { _extendees.Remove(c); hotSpotPainter.Dispose(); } } else if (!_extendees.ContainsKey(c)) { _extendees[c] = new HotSpotPainter(this, (TextBoxBase)c); } }
public void SetEnableHotSpots(Control c, bool value) { if (c == null) { throw new ArgumentNullException(); } if (!CanExtend(c)) { throw new ArgumentException("Control must be derived from TextBoxBase"); } if (!value) { HotSpotPainter hotSpotPainter; if (_extendees.TryGetValue(c, out hotSpotPainter)) { _extendees.Remove(c); hotSpotPainter.Dispose(); } } else if (!_extendees.ContainsKey(c)) { _extendees[c] = new HotSpotPainter(this, (TextBoxBase) c); } }