private void RestoreState(string state) { PushState(); var clear = new ClearAction(); clear.Perform(this, 0, 0); LoadLevel(state); PopState(); }
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); } }
/// <summary> /// Adds a clear action to the action queue. /// </summary> internal void AddClearActionToQueue() { ClearAction clearAction = new ClearAction(); this.actionQueue.Enqueue(clearAction); }
/// <inheritdoc /> public EditorFieldAttribute(ClearAction clearAction) { ClearAction = clearAction; }