Exemplo n.º 1
0
        void IPropertyPage.Deactivate()
        {
            if (PropertyPagePanel != null)
            {
                PropertyPagePanel.Dispose();
                PropertyPagePanel = null;
            }

            _active = false;
        }
Exemplo n.º 2
0
        void IPropertyPage.GetPageInfo(PROPPAGEINFO[] pPageInfo)
        {
            if (pPageInfo == null)
                throw new ArgumentNullException("pPageInfo");

            if (PropertyPagePanel == null)
                PropertyPagePanel = CreatePropertyPagePanel();

            PROPPAGEINFO info = new PROPPAGEINFO()
            {
                cb = (uint)Marshal.SizeOf(typeof(PROPPAGEINFO)),
                dwHelpContext = 0,
                pszDocString = null,
                pszHelpFile = null,
                pszTitle = PageName,
                SIZE =
                {
                    cx = PropertyPagePanel.Width,
                    cy = PropertyPagePanel.Height
                }
            };

            pPageInfo[0] = info;
        }
Exemplo n.º 3
0
        void IPropertyPage.Activate(IntPtr hWndParent, RECT[] pRect, int bModal)
        {
            // create the panel control
            if (PropertyPagePanel == null)
                PropertyPagePanel = CreatePropertyPagePanel();

            // we need to create the control so the handle is valid
            PropertyPagePanel.CreateControl();

            // set our parent
            NativeMethods.SetParent(PropertyPagePanel.Handle, hWndParent);

            // set our initial size
            ResizeContents(pRect[0]);

            _active = true;
            _initializing = true;
            BindProperties();
            _initializing = false;
            IsDirty = false;
        }