internal void Show() { foreach (IReflectorDirectionShow director in core_common.directors) { director.PageChanged(); } menu_item.Checked = true; foreach (ControlTracker c in this) { IReflectorWidget widget = c.o as IReflectorWidget; IReflectorDirectionShow direction = c.o as IReflectorDirectionShow; IReflectorWindow irw = c.o as IReflectorWindow; if (direction != null) { direction.Shown(); } if (irw != null) { // we might not have moved... but, better safe than sorry. irw.Move(); } if (widget != null) { if (widget.CanShow) { c.c.Visible = true; } } else { widget = c.c as IReflectorWidget; if (widget != null) { if (widget.CanShow) { // if no widget interface, assume it's visible. c.c.Visible = true; } } else { //if( direction != null ) { //direction.Shown(); } c.c.Visible = true; } } } }
internal void Canvas_LocationChanged(object sender, EventArgs e) { if (this.current_page != null) { foreach (ControlTracker c in this.current_page) { IReflectorWindow irw = c.o as IReflectorWindow; if (irw != null) { irw.Move(); } } } }
internal void Resize() { foreach (ControlTracker c in this) { Rectangle where = //this.GetScaledBounds( new Rectangle(PARTX(c.grid_rect.X), PARTY(c.grid_rect.Y) , PARTW(c.grid_rect.X, c.grid_rect.Width), PARTH(c.grid_rect.Y, c.grid_rect.Height)) ; c.c.Location = where.Location; c.c.Size = where.Size; IReflectorWindow irw = c.o as IReflectorWindow; if (irw != null) { irw.Move(); } } }