public void SetView(ViewEx view) { var old_view = GetView(); if (old_view == view) { return; } if (old_view != null) { Controls.Clear(); old_view.Dispose(); } if (view != null) { _LockSize = ClientSize = view.Size; view.Dock = DockStyle.Fill; Controls.Add(view); } CopyStyle(view); }
protected void CopyStyle(ViewEx view) { Text = view.Text; }
public WindowEx(ViewEx view) { SetView(view); StartPosition = FormStartPosition.CenterScreen; }