public void AddWindow(BaseFrame window) { List<BaseFrame> windows = new List<BaseFrame>(this.windows); windows.Add(window); this.windows = windows.ToArray(); if (focusedControl == null) focusedControl = window; }
public void RemoveWindow(BaseFrame window) { List<BaseFrame> windows = new List<BaseFrame>(this.windows); windows.Remove(window); this.windows = windows.ToArray(); if (focusedControl != window) return; if (this.windows.Length == 0) focusedControl = null; focusedControl = this.windows[0]; }
public void SetTopMostWindow(BaseFrame window) { List<BaseFrame> windows = new List<BaseFrame>(this.windows); if (windows.Remove(window)) windows.Insert(0, window); this.windows = windows.ToArray(); }