/// <summary> /// 空桌面布局 /// </summary> /// private Desktop() { this.clickComponent = new LComponent[1]; this.contentPane = new LPanel(0, 0, 1, 1); this.input = null; this.SetDesktop(this.contentPane); }
/// <summary> /// 构造一个可用桌面 /// </summary> /// /// <param name="input"></param> /// <param name="width"></param> /// <param name="height"></param> public Desktop(LInput input, int width, int height) { this.clickComponent = new LComponent[1]; this.contentPane = new LPanel(0, 0, width, height); this.input = input; this.SetDesktop(this.contentPane); }
public virtual void Dispose() { this.isClose = true; this.desktop.SetComponentStat(this, false); if (this.parent != null) { this.parent.Remove(this); } this.desktop = Desktop.EMPTY_DESKTOP; this.input = null; this.parent = null; if (imageUI != null) { for (int i = 0; i < imageUI.Length; i++) { imageUI[i].Destroy(); imageUI[i] = null; } this.imageUI = null; } if (background != null) { this.background.Destroy(); this.background = null; } this.selected = false; this.visible = false; }
private LComponent FindComponent(int x, int y) { if (this.modal != null && !this.modal.IsContainer()) { return(null); } LContainer panel = (this.modal == null) ? this.contentPane : ((LContainer)this.modal); LComponent comp = panel.FindComponent(x, y); return(comp); }
internal void ValidateContainer(LContainer container) { LComponent[] components = container.GetComponents(); int size = container.GetComponentCount(); for (int i = 0; i < size; i++) { if (components[i].IsContainer()) { this.ValidateContainer((LContainer)components[i]); } } }
private int RemoveComponent(LContainer container, LComponent comp) { int removed = container.Remove(comp); LComponent[] components = container.GetComponents(); int i = 0; while (removed == -1 && i < components.Length - 1) { if (components[i].IsContainer()) { removed = this .RemoveComponent((LContainer)components[i], comp); } i++; } return(removed); }
public void SetContentPane(LContainer pane) { pane.SetBounds(0, 0, this.GetWidth(), this.GetHeight()); this.contentPane = pane; this.SetDesktop(this.contentPane); }
private Desktop() { this.contentPane = new LPanel(0, 0, 1, 1); this.input = null; this.SetDesktop(this.contentPane); }
internal void SetContainer(LContainer container) { this.parent = container; this.ValidatePosition(); }