Beispiel #1
0
 static SelectedBoxState()
 {
     if (Instance == null)
     {
         Instance = new SelectedBoxState();
     }
 }
Beispiel #2
0
 static UnselectedBoxState()
 {
     if (Instance == null)
     {
         Instance = new UnselectedBoxState();
     }
 }
Beispiel #3
0
        public Bitmap ChangeState(EditorImage img)
        {
            if (mState is UnselectedBoxState)
            {
                mState     = SelectedBoxState.Instance;
                IsSelected = true;
            }
            else
            {
                mState     = UnselectedBoxState.Instance;
                IsSelected = false;
            }

            StateChanged?.Invoke(this, new EditorBoxStateChangedEventArgs(mState));

            return(Render(mState.Render(img.Render(), this)));
        }
Beispiel #4
0
 public EditorBox(DataBox box)
     : base(box)
 {
     Rectangle = new Rectangle(box.Left, box.Top, box.Width, box.Height);
     mState    = UnselectedBoxState.Instance;
 }
Beispiel #5
0
 public EditorBoxStateChangedEventArgs(EditorBoxState state)
 {
     State = state;
 }