コード例 #1
0
        private void RestoreState(string state)
        {
            PushState();

            var clear = new ClearAction();

            clear.Perform(this, 0, 0);

            LoadLevel(state);

            PopState();
        }
コード例 #2
0
        private void canvas_Clean(object sender, EventArgs e)
        {
            Button button = sender as Button;

            if (button.Name == btnCleanCross.Name)
            {
                ClearAction?.Invoke(CanvasType.Cross);
            }
            if (button.Name == btnCleanCircle.Name)
            {
                ClearAction?.Invoke(CanvasType.Circle);
            }
            if (button.Name == btnCleanBlank.Name)
            {
                ClearAction?.Invoke(CanvasType.Blank);
            }
            if (button.Name == btnCleanTest.Name)
            {
                ClearAction?.Invoke(CanvasType.Test);
            }
        }
コード例 #3
0
 /// <summary>
 /// Adds a clear action to the action queue.
 /// </summary>
 internal void AddClearActionToQueue()
 {
     ClearAction clearAction = new ClearAction();
     this.actionQueue.Enqueue(clearAction);
 }
コード例 #4
0
 /// <inheritdoc />
 public EditorFieldAttribute(ClearAction clearAction)
 {
     ClearAction = clearAction;
 }
コード例 #5
0
        /// <summary>
        /// Adds a clear action to the action queue.
        /// </summary>
        internal void AddClearActionToQueue()
        {
            ClearAction clearAction = new ClearAction();

            this.actionQueue.Enqueue(clearAction);
        }