protected override void OnMouseClick(MouseEventArgs e) { if (Frame != null) { switch (State) { case FrameControlState.AwaitingLengthMark1: Frame.LengthMark1 = e.Location; State = FrameControlState.AwaitingLengthMark2; break; case FrameControlState.AwaitingLengthMark2: Frame.LengthMark2 = e.Location; State = FrameControlState.Idle; break; case FrameControlState.AwaitingItemMark: Frame.ItemMark = e.Location; State = FrameControlState.Idle; break; } Invalidate(); } else { State = FrameControlState.Idle; } }
public FrameControl() { State = FrameControlState.Idle; }