void LoadGui(MonoDevelopProxy proxy, string document, string fileName)
        {
            System.Diagnostics.Trace.WriteLine("Creating AspNetEdit EditorHost");
            host = new EditorHost(proxy);
            host.Initialise(document, fileName);
            System.Diagnostics.Trace.WriteLine("Created AspNetEdit EditorHost");

            System.Diagnostics.Trace.WriteLine("Building AspNetEdit GUI");
            Gtk.VBox outerBox = new Gtk.VBox();

            geckoFrame        = new Frame();
            geckoFrame.Shadow = ShadowType.In;
            geckoFrame.Add(host.DesignerView);
            outerBox.PackEnd(geckoFrame, true, true, 0);

            Toolbar tb = BuildToolbar();

            outerBox.PackStart(tb, false, false, 0);

            outerBox.ShowAll();
            base.DesignerWidget = outerBox;

            //grid picks up some services from the designer host
            propertyGrid = new PropertyGrid(host.Services);
            propertyGrid.ShowAll();
            base.PropertyGridWidget = propertyGrid;
            System.Diagnostics.Trace.WriteLine("Built AspNetEdit GUI");
        }
Example #2
0
        public void Initialise(MonoDevelopProxy proxy, Frame designerFrame)
        {
            System.Diagnostics.Trace.WriteLine("Creating AspNetEdit EditorHost");
            host = new EditorHost(proxy);
            host.Initialise();
            System.Diagnostics.Trace.WriteLine("Created AspNetEdit EditorHost");

            //StartGuiThread ();
            Gtk.Application.Invoke(delegate { LoadGui(designerFrame); });
        }
Example #3
0
        public EditorHost(MonoDevelopProxy proxy)
        {
            this.proxy = proxy;

            //set up the services
            services = new ServiceContainer();
            services.AddService(typeof(INameCreationService), new NameCreationService());
            services.AddService(typeof(ISelectionService), new SelectionService());
            services.AddService(typeof(ITypeResolutionService), new TypeResolutionService());
            services.AddService(typeof(IEventBindingService), new AspNetEdit.Editor.ComponentModel.EventBindingService(proxy));
            ExtenderListService extListServ = new ExtenderListService();

            services.AddService(typeof(IExtenderListService), extListServ);
            services.AddService(typeof(IExtenderProviderService), extListServ);
            services.AddService(typeof(ITypeDescriptorFilterService), new TypeDescriptorFilterService());
            //services.AddService (typeof (IToolboxService), toolboxService);

            System.Diagnostics.Trace.WriteLine("Creating DesignerHost");
            host = new DesignerHost(services);
            System.Diagnostics.Trace.WriteLine("Created DesignerHost");
        }
Example #4
0
        public EditorHost(MonoDevelopProxy proxy)
        {
            this.proxy = proxy;

            //set up the services
            services = new ServiceContainer();
            services.AddService(typeof(INameCreationService), new NameCreationService());
            services.AddService(typeof(ISelectionService), new SelectionService());
            services.AddService(typeof(ITypeResolutionService), new TypeResolutionService());
            services.AddService(
                typeof(IEventBindingService),
                new AspNetEdit.Editor.ComponentModel.EventBindingService(proxy)
                );
            ExtenderListService extListServ = new ExtenderListService();

            services.AddService(typeof(IExtenderListService), extListServ);
            services.AddService(typeof(IExtenderProviderService), extListServ);
            services.AddService(typeof(ITypeDescriptorFilterService), new TypeDescriptorFilterService());
            services.AddService(typeof(IMenuCommandService), new AspNetEdit.Editor.ComponentModel.MenuCommandService());
            //services.AddService (typeof (IToolboxService), toolboxService);

            var project      = MonoDevelop.Ide.IdeApp.Workbench.ActiveDocument.Project as AspNetAppProject;
            var aspParsedDoc = MonoDevelop.Ide.IdeApp.Workbench.ActiveDocument.ParsedDocument as AspNetParsedDocument;

            if (project != null && aspParsedDoc != null)
            {
                WebFormReferenceManager refMan = new WebFormReferenceManager(project);
                refMan.Doc = aspParsedDoc;
                services.AddService(typeof(WebFormReferenceManager), refMan);
            }

            System.Diagnostics.Trace.WriteLine("Creating DesignerHost");
            designerHost = new DesignerHost(services, this);
            System.Diagnostics.Trace.WriteLine("Created DesignerHost");
            designerHost.DocumentChanged += new DesignerHost.DocumentChangedEventHandler(OnDocumentChanged);
        }
 public void Initialise(MonoDevelopProxy proxy, string document, string fileName)
 {
     StartGuiThread();
     Gtk.Application.Invoke(delegate { LoadGui(proxy, document, fileName); });
 }