Пример #1
0
        public override void Load(string filename, string location, string name, uint flags, ref Guid iidProject, out int canceled)
        {
            base.Load(filename, location, name, flags, ref iidProject, out canceled);
            // WAP ask the designer service for the CodeDomProvider corresponding to the project node.
            this.OleServiceProvider.AddService(typeof(SVSMDCodeDomProvider), new OleServiceProvider.ServiceCreatorCallback(this.CreateServices), false);
            this.OleServiceProvider.AddService(typeof(System.CodeDom.Compiler.CodeDomProvider), new OleServiceProvider.ServiceCreatorCallback(this.CreateServices), false);

            IFoxProLibraryManager libraryManager = Site.GetService(typeof(IFoxProLibraryManager)) as IFoxProLibraryManager;

            if (null != libraryManager)
            {
                libraryManager.RegisterHierarchy(this.InteropSafeHierarchy);
            }

            //If this is a WPFFlavor-ed project, then add a project-level DesignerContext service to provide
            //event handler generation (EventBindingProvider) for the XAML designer.
            this.OleServiceProvider.AddService(typeof(DesignerContext), new OleServiceProvider.ServiceCreatorCallback(this.CreateServices), false);
        }
Пример #2
0
        public override int Close()
        {
            if (null != this.projectDocListenerForMainFileUpdates)
            {
                this.projectDocListenerForMainFileUpdates.Dispose();
                this.projectDocListenerForMainFileUpdates = null;
            }
            if (null != Site)
            {
                IFoxProLibraryManager libraryManager = Site.GetService(typeof(IFoxProLibraryManager)) as IFoxProLibraryManager;
                if (null != libraryManager)
                {
                    libraryManager.UnregisterHierarchy(this.InteropSafeHierarchy);
                }
            }

            return(base.Close());
        }