示例#1
0
        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;
            }
        }
示例#2
0
 public FrameControl()
 {
     State = FrameControlState.Idle;
 }