protected override void MouseDown(System.Windows.Forms.MouseEventArgs e) { if (SelectedComponent != null) { if (SelectedComponent.HitTest(e.X, e.Y)) { if ((Control.ModifierKeys & Keys.Shift) != Keys.None) { SaveInstance(); LoadInstance(); BaseComponent addedCmp = SelectedComponent; if (addedCmp.HitTest(e.X, e.Y)) { OnSelect(addedCmp); addedCmp.MouseDown(e); } return; } else { SelectedComponent.MouseDown(e); return; } } else { OnSelect(null); } } foreach (BaseComponent x in Model.Items) { x.MouseState = Entities.MouseState.None; x.IsSelected = false; if (x.HitTest(e.X, e.Y)) { OnSelect(x); x.MouseDown(e); break; } } this.View.Invalidate(); }