Пример #1
0
        public int GetComponentSelectorPage(ref Guid rguidPage, VSPROPSHEETPAGE[] ppage)
        {
            if (ppage == null)
                throw new ArgumentNullException("ppage");
            if (ppage.Length == 0)
                throw new ArgumentException();

            if (rguidPage == DartProjectConstants.MavenComponentSelectorGuid)
            {
                _mavenComponentSelector = _mavenComponentSelector ?? new PropertyPages.MavenComponentSelector();

                ppage[0] = new VSPROPSHEETPAGE()
                {
                    dwFlags = (uint)default(PropertySheetPageFlags),
                    dwReserved = 0,
                    dwSize = (uint)Marshal.SizeOf(typeof(VSPROPSHEETPAGE)),
                    dwTemplateSize = 0,
                    HINSTANCE = 0,
                    hwndDlg = _mavenComponentSelector.Handle,
                    lParam = IntPtr.Zero,
                    pcRefParent = IntPtr.Zero,
                    pfnCallback = IntPtr.Zero,
                    pfnDlgProc = IntPtr.Zero,
                    pTemplate = IntPtr.Zero,
                    wTemplateId = 0,
                };

                return VSConstants.S_OK;
            }

            return VSConstants.E_INVALIDARG;
        }
Пример #2
0
        public int GetComponentSelectorPage(ref Guid rguidPage, VSPROPSHEETPAGE[] ppage)
        {
            if (ppage == null)
            {
                throw new ArgumentNullException("ppage");
            }
            if (ppage.Length == 0)
            {
                throw new ArgumentException();
            }

            if (rguidPage == DartProjectConstants.MavenComponentSelectorGuid)
            {
                _mavenComponentSelector = _mavenComponentSelector ?? new PropertyPages.MavenComponentSelector();

                ppage[0] = new VSPROPSHEETPAGE()
                {
                    dwFlags        = (uint)default(PropertySheetPageFlags),
                    dwReserved     = 0,
                    dwSize         = (uint)Marshal.SizeOf(typeof(VSPROPSHEETPAGE)),
                    dwTemplateSize = 0,
                    HINSTANCE      = 0,
                    hwndDlg        = _mavenComponentSelector.Handle,
                    lParam         = IntPtr.Zero,
                    pcRefParent    = IntPtr.Zero,
                    pfnCallback    = IntPtr.Zero,
                    pfnDlgProc     = IntPtr.Zero,
                    pTemplate      = IntPtr.Zero,
                    wTemplateId    = 0,
                };

                return(VSConstants.S_OK);
            }

            return(VSConstants.E_INVALIDARG);
        }