public void LoadView(STViewsInfo viewInfo, ViewMode mode) { if (View == null) { View = new ABCView(); View.Load(viewInfo, mode); } else { Control ctrlParent = View.Parent; View.Parent = null; View = new ABCView(); View.Load(viewInfo, mode); View.Parent = ctrlParent; View.Dock = DockStyle.Fill; ctrlParent.ClientSize = View.Size; } InitializeEvents(); }
public void LoadView(XmlDocument doc, ViewMode mode) { View = new ABCView(); View.Load(doc, mode); InitializeEvents(); }