예제 #1
0
        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");
        }
예제 #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); });
        }
예제 #3
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); });
		}
예제 #4
0
		void DestroyEditorAndSockets ()
		{
			if (proxy != null) {
				proxy.Dispose ();
				proxy = null;
			}

			if (host != null) {
				System.Diagnostics.Trace.WriteLine ("Disposing AspNetEdit's EditorHost");

				designerFrame.Remove (webKitWindow);
				webKitWindow.Dispose ();
				host.Dispose ();
				host = null;

				System.Diagnostics.Trace.WriteLine ("Disposed AspNetEdit's EditorHost");
			}

			if (IdeApp.Workbench.ActiveDocument != null) {
				IdeApp.Workbench.ActiveDocument.DocumentParsed -= document_OnParsed;
			}
		}
예제 #5
0
		public override void Selected ()
		{
			if (blockSelected || !IsInCurrentViewContent ())
				return;

			if (activated)
				throw new Exception ("Editor should be null when document is selected");

			var doc = IdeApp.Workbench.ActiveDocument.ParsedDocument as AspNetParsedDocument;
			if (doc != null) {
				proxy = new MonoDevelopProxy (viewContent.Project, doc.Info.InheritedClass);
				System.Diagnostics.Trace.WriteLine ("Creating AspNetEdit EditorHost");
				host = new EditorHost (proxy);
				host.Initialise ();
				System.Diagnostics.Trace.WriteLine ("Created AspNetEdit EditorHost");
				activated = true;

				// Loading the GUI of the Designer
				LoadGui ();

				// Loading the doc structure in the DocumentOutlinePad
				BuildTreeStore (doc.XDocument);
				// subscribing to changes in the DOM
				IdeApp.Workbench.ActiveDocument.DocumentParsed += document_OnParsed;
			}
		}
예제 #6
0
		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");
		}