protected void Close_Pressed(object o, ButtonPressEventArgs args) { RemoveWindow(mwidget); mwidget = null; max = false; notebook1.CurrentPage = 0; }
public void RemoveWindow(Widget widget) { MDIChildWindow mwidget = null; if (this.mwidget != null && this.mwidget.ContentWidget == widget) { mwidget = this.mwidget; UnMaximizeWindow(); } else { foreach (MDIChildWindow child in _children) { if (child.ContentWidget == widget) { mwidget = child; } } } if (mwidget == null) { return; } fixed1.Remove(mwidget); _children.Remove(mwidget); this.ShowAll(); }
public void AddWindow(Widget widget, string title) { UnMaximizeWindow(); MDIChildWindow child = new MDIChildWindow(fixed1, this, widget, 0, 0, title, 100, 100, 480, 320); _children.Add(child); fixed1.Add(child); child.Show(); child.ResetCursor(); }
public void RemoveWindow(int index) { if (_children.Count > index) { return; } MDIChildWindow mwidget = _children[index]; if (this.mwidget != null && _children[index] == this.mwidget) { UnMaximizeWindow(); } fixed1.Remove(mwidget); _children.Remove(mwidget); this.ShowAll(); }
public void MaximizeWindow(MDIChildWindow mwidget) { UnMaximizeWindow(); fixed1.Remove(mwidget); fixed1.Add(mwidget); fixed1.Move(mwidget, mwidget.curx, mwidget.cury); max = true; this.mwidget = mwidget; RefreshLabel(); mwidget.eventbox_content.Remove(mwidget.ContentWidget); eventbox1.Add(mwidget.ContentWidget); mwidget.ShowAll(); notebook1.CurrentPage = 1; eventbox1.ShowAll(); }