public virtual void Deactivate() { if (null != this.page) { this.page.Control.Dispose(); this.page = null; } this.active = false; }
public virtual void Activate(IntPtr parent, RECT[] pRect, int bModal) { if(this.page == null) { if (pRect == null) { throw new ArgumentNullException("pRect"); } this.page = CreatePropertyPage(); this.page.Control.Size = new Size(pRect[0].right - pRect[0].left, pRect[0].bottom - pRect[0].top); this.page.Control.Visible = false; this.page.Control.Size = new Size(550, 300); this.page.Control.CreateControl(); NativeMethods.SetParent(this.page.Control.Handle, parent); } if(this.page != null) { this.active = true; UpdateObjects(); } }
// The IPropertyPage methods are inspired by the MPF SettingsPage #region IPropertyPage methods. public virtual void Activate(IntPtr parent, RECT[] pRect, int bModal) { if (this.page == null) { if (pRect == null) { throw new ArgumentNullException("pRect"); } this.page = CreatePropertyPage(); this.page.Control.Size = new Size(pRect[0].right - pRect[0].left, pRect[0].bottom - pRect[0].top); this.page.Control.Visible = false; this.page.Control.Size = new Size(550, 300); this.page.Control.CreateControl(); NativeMethods.SetParent(this.page.Control.Handle, parent); } if (this.page != null) { this.active = true; UpdateObjects(); } }
public virtual void Deactivate() { if(null != this.page) { this.page.Control.Dispose(); this.page = null; } this.active = false; }