public void ReleaseDrawing <T>() where T : IJigable { T item = (T)DrawHelper; MouseMove_Drawing -= item.NotifyMouseMove; MouseUp_Drawing -= item.NotifyMouseUp; MouseDown_Drawing -= item.NotifyMouseDown; DrawOverlay_Jigging -= item.OnJigging; DrawHelper = null; IsDrawingEnable = false; this._isPickingEnable = true; }
public void SetDrawing <T>() where T : IJigable, new() { this._isPickingEnable = false; T item = new T(); MouseMove_Drawing += item.NotifyMouseMove; MouseUp_Drawing += item.NotifyMouseUp; MouseDown_Drawing += item.NotifyMouseDown; DrawOverlay_Jigging += item.OnJigging; DrawHelper = item; IsDrawingEnable = true; }