void AttachWindow (GuiBuilderWindow window)
		{
			gproject = window.Project;
			GtkDesignInfo info = GtkDesignInfo.FromProject (gproject.Project);
			gproject.SteticProject.ImagesRootPath = FileService.AbsoluteToRelativePath (info.GtkGuiFolder, gproject.Project.BaseDirectory);
			gproject.UpdateLibraries ();
			LoadDesigner ();
		}
Beispiel #2
0
		public WindowsFolder (Project project)
		{
			this.project = project;
			GtkDesignInfo info = GtkDesignInfo.FromProject (project);
			
			gproject = info.GuiBuilderProject;
			gproject.Changed += OnUpdateFiles;
		}
		internal GuiBuilderWindow (GuiBuilderProject fproject, Stetic.Project gproject, Stetic.WidgetInfo rootWidget)
		{
			this.fproject = fproject;
			this.rootWidget = rootWidget;
			this.gproject = gproject;
			name = rootWidget.Name;
			gproject.ProjectReloaded += OnProjectReloaded;
			rootWidget.Changed += OnChanged;
		}
Beispiel #4
0
		public CodeBinder (Project project, ITextFileProvider textFileProvider, Stetic.Component targetObject)
		{
			this.project = project;
			this.textFileProvider = textFileProvider;

			gproject = GtkDesignInfo.FromProject (project).GuiBuilderProject;

			TargetObject = targetObject;
		}
        void AttachWindow(GuiBuilderWindow window)
        {
            gproject = window.Project;
            GtkDesignInfo info = GtkDesignInfo.FromProject(gproject.Project);

            gproject.SteticProject.ImagesRootPath = FileService.AbsoluteToRelativePath(info.GtkGuiFolder, gproject.Project.BaseDirectory);
            gproject.UpdateLibraries();
            LoadDesigner();
        }
Beispiel #6
0
 internal GuiBuilderWindow(GuiBuilderProject fproject, Stetic.Project gproject, Stetic.WidgetInfo rootWidget)
 {
     this.fproject             = fproject;
     this.rootWidget           = rootWidget;
     this.gproject             = gproject;
     name                      = rootWidget.Name;
     gproject.ProjectReloaded += OnProjectReloaded;
     rootWidget.Changed       += OnChanged;
 }
Beispiel #7
0
        public CodeBinder(MonoDevelop.Projects.Project project, ITextFileProvider textFileProvider, Stetic.Component targetObject)
        {
            this.project          = project;
            this.textFileProvider = textFileProvider;

            gproject = GtkDesignInfo.FromProject(project).GuiBuilderProject;

            TargetObject = targetObject;
        }
Beispiel #8
0
        internal static string BindToClass(Project project, Stetic.ActionGroupInfo group)
        {
            GuiBuilderProject gproject = GtkDesignInfo.FromProject(project).GuiBuilderProject;
            string            file     = gproject.GetSourceCodeFile(group);

            if (file != null)
            {
                return(file);
            }

            // Find the classes that could be bound to this design

            ArrayList list = new ArrayList();
            var       ctx  = gproject.GetParserContext();

            foreach (var cls in ctx.MainAssembly.GetAllTypeDefinitions())
            {
                if (IsValidClass(cls))
                {
                    list.Add(cls.FullName);
                }
            }

            // Ask what to do

            using (BindDesignDialog dialog = new BindDesignDialog(group.Name, list, project.BaseDirectory))
            {
                if (!dialog.Run())
                {
                    return(null);
                }

                if (dialog.CreateNew)
                {
                    CreateClass(project, (Stetic.ActionGroupComponent)group.Component, dialog.ClassName, dialog.Namespace, dialog.Folder);
                }

                string fullName = dialog.Namespace.Length > 0 ? dialog.Namespace + "." + dialog.ClassName : dialog.ClassName;
                group.Name = fullName;
            }
            return(gproject.GetSourceCodeFile(group));
        }
        public static async Task <ActionGroupView> OpenActionGroup(Project project, Stetic.ActionGroupInfo group)
        {
            GuiBuilderProject p    = GtkDesignInfo.FromProject(project).GuiBuilderProject;
            string            file = p != null?p.GetSourceCodeFile(group) : null;

            if (file == null)
            {
                file = ActionGroupDisplayBinding.BindToClass(project, group);
            }

            Document doc = await IdeApp.Workbench.OpenDocument(file, null, true);

            if (doc != null)
            {
                ActionGroupView view = doc.GetContent <ActionGroupView> ();
                if (view != null)
                {
                    view.ShowDesignerView();
                    return(view);
                }
            }
            return(null);
        }
		public void Dispose ()
		{
			if (resourceProvider != null)
				System.Runtime.Remoting.RemotingServices.Disconnect (resourceProvider);
			resourceProvider = null;
			if (builderProject != null)
				builderProject.Dispose ();
			builderProject = null;
			if (referenceManager != null)
				referenceManager.Dispose ();
			referenceManager = null;
			Project = null;
		}
Beispiel #11
0
 public ActionGroupView(IViewContent content, Stetic.ActionGroupInfo group, GuiBuilderProject project) : base(content)
 {
     groupName    = group.Name;
     this.project = project;
     LoadDesigner();
 }
		public ActionGroupView (IViewContent content, Stetic.ActionGroupInfo group, GuiBuilderProject project): base (content)
		{
			groupName = group.Name;
			this.project = project;
			LoadDesigner ();
		}
		public DesignerPage (GuiBuilderProject gproject)
		{
			this.gproject = gproject;
		}
 public DesignerPage(GuiBuilderProject gproject)
 {
     this.gproject = gproject;
 }
Beispiel #15
0
 public ActionGroupView(Stetic.ActionGroupInfo group, GuiBuilderProject project)
 {
     groupName    = group.Name;
     this.project = project;
     LoadDesigner();
 }