/// <summary> /// The default constructor /// </summary> /// <param name="mangr">The parent window manager.</param> public Taskbar(WindowManager mangr) { this.Windows = new Window[0]; this.Manager = mangr; this.Bounds = new BoundingBox(0, mangr.Size.X, mangr.Size.Y, mangr.Size.Y - TaskBarHeight); this.Buffer = new Image(mangr.Size.X, WindowManager.TaskBarHeight + 1); this.Buffer.Clear(TaskbarClearColor); this.WindowButtonBounds = new BoundingBox[0]; this.TaskbarLocation = new Vec2(0, Manager.Size.Y - TaskBarHeight); }
/// <summary> /// Disposes of all of the resources used by this window. /// </summary> public void Dispose() { this.Bounds = null; this.CloseButtonBounds = null; this.ContentBounds = null; this.ContentBuffer = null; foreach (Control c in Controls) { c.DoBeforeDispose(); c.Dispose(); c.DoAfterDispose(); } this.Controls = null; this.HeaderBounds = null; this.HeaderBuffer = null; this.MaxButtonBounds = null; this.MinButtonBounds = null; this.Parent = null; this.WindowBuffer = null; this.Name = null; }