public bool AddLayout(Layout layout) { if (this.layouts.Contains(layout)) return false; layout.Size = new Size(Width, Height); layout.GetVisualTree().ForEach(element => this.sceneManager.AddSprite(element)); this.layouts.Add(layout); return true; }
public bool RemoveLayout(Layout layout) { if (!this.layouts.Contains(layout)) return false; layout.GetVisualTree().ForEach(element => this.sceneManager.RemoveSprite(element)); return this.layouts.Remove(layout); }