예제 #1
0
        /// <summary>
        /// The environment calls this to notify us that we should clean up our resources.
        /// </summary>
        void IPropertyPage.Deactivate()
        {
            if (this.PropertyPagePanel != null)
            {
                this.PropertyPagePanel.Dispose();
                this.PropertyPagePanel = null;
            }

            this.active = false;
        }
예제 #2
0
        /// <summary>
        /// The environment calls this to get the parameters to describe the property page.
        /// </summary>
        /// <param name="pageInfos">The parameters are returned in this one-sized array.</param>
        void IPropertyPage.GetPageInfo(PROPPAGEINFO[] pageInfos)
        {
            WixHelperMethods.VerifyNonNullArgument(pageInfos, "pageInfos");

            if (this.PropertyPagePanel == null)
            {
                this.PropertyPagePanel = this.CreatePropertyPagePanel();
            }

            PROPPAGEINFO info = new PROPPAGEINFO();

            info.cb = (uint)Marshal.SizeOf(typeof(PROPPAGEINFO));
            info.dwHelpContext = 0;
            info.pszDocString = null;
            info.pszHelpFile = null;
            info.pszTitle = this.PageName;
            info.SIZE.cx = this.PropertyPagePanel.Width;
            info.SIZE.cy = this.PropertyPagePanel.Height;
            pageInfos[0] = info;
            this.propPageInfo = info;
        }
예제 #3
0
        // =========================================================================================
        // IPropertyPage Members
        // =========================================================================================
        /// <summary>
        /// Called when the environment wants us to create our property page.
        /// </summary>
        /// <param name="hwndParent">The HWND of the parent window.</param>
        /// <param name="rects">The bounds of the area that we should fill.</param>
        /// <param name="modal">Indicates whether the dialog box is shown modally or not.</param>
        void IPropertyPage.Activate(IntPtr hwndParent, RECT[] rects, int modal)
        {
            // create the panel control
            this.PropertyPagePanel = this.CreatePropertyPagePanel();
            this.PropertyPagePanel.HookupEvents();

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

            this.PropertyPagePanel.HelpRequested += new HelpEventHandler(this.PropertyPagePanel_HelpRequested);

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

            // set our initial size
            this.ResizeContents(rects[0]);

            this.PropertyPagePanel.BindProperties();
            this.active = true;
            this.IsDirty = false;
        }