当前位置: 首页>>代码示例>>C#>>正文


C# Projects.SolutionFolderItem类代码示例

本文整理汇总了C#中MonoDevelop.Projects.SolutionFolderItem的典型用法代码示例。如果您正苦于以下问题:C# SolutionFolderItem类的具体用法?C# SolutionFolderItem怎么用?C# SolutionFolderItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SolutionFolderItem类属于MonoDevelop.Projects命名空间,在下文中一共展示了SolutionFolderItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Fill

		public void Fill (PackageBuilder builder, SolutionFolderItem selection)
		{
			store.Clear ();
			
			this.builder = builder;
			if (selection is SolutionFolder) {
				foreach (SolutionFolderItem e in ((SolutionFolder)selection).GetAllItems ()) {
					if (builder.CanBuild (e))
						selectedEntries [e] = e;
				}
			}
			else if (selection != null) {
				selectedEntries [selection] = selection;
			}
			
			if (selection != null)
				solution = selection.ParentSolution;
			else {
				solution = IdeApp.ProjectOperations.CurrentSelectedSolution;
				if (solution == null) {
					solution = IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem.GetAllItems<Solution> ().FirstOrDefault();
					if (solution == null)
						return;
				}
			}
			AddEntry (TreeIter.Zero, solution.RootFolder);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:27,代码来源:EntrySelectionTree.cs

示例2: GetDeployFiles

		public override DeployFileCollection GetDeployFiles (DeployContext ctx, SolutionFolderItem entry, ConfigurationSelector configuration)
		{
			if (entry is IDeployable)
				return new DeployFileCollection (((IDeployable)entry).GetDeployFiles (configuration));
			
			return base.GetDeployFiles (ctx, entry, configuration);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:DefaultDeployServiceExtension.cs

示例3: CanDeploy

		public bool CanDeploy (SolutionFolderItem entry, MakefileType type)
		{
			Project project = entry as Project;
			if ( project == null ) return false;
			if ( FindSetupForProject ( project ) == null ) return false;
			return true;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:SimpleProjectMakefileHandler.cs

示例4: DeployDialog

		public DeployDialog (SolutionFolderItem defaultEntry, bool createBuilderOnly)
		{
			this.Build();
			notebook.ShowTabs = false;
			this.defaultEntry = defaultEntry;
			
			if (createBuilderOnly) {
				vboxSaveProject.Hide ();
				checkSave.Active = true;
				checkSave.Hide ();
				saveSeparator.Hide ();
			}
			else {
				pageSave.Hide ();
				FillProjectSelectors ();
			}
			
			store = new ListStore (typeof(Xwt.Drawing.Image), typeof(string), typeof(object));
			targetsTree.Model = store;
			
			targetsTree.HeadersVisible = false;
			CellRendererImage cr = new CellRendererImage();
			cr.Yalign = 0;
			targetsTree.AppendColumn ("", cr, "image", 0);
			targetsTree.AppendColumn ("", new Gtk.CellRendererText(), "markup", 1);
			
			targetsTree.Selection.Changed += delegate (object s, EventArgs a) {
				UpdateButtons ();
			};
			
			FillBuilders ();
			
			UpdateButtons ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:34,代码来源:DeployDialog.cs

示例5: AddEntry

		void AddEntry (TreeIter iter, SolutionFolderItem entry)
		{
			string icon;
			if (entry.ParentFolder == null)
				icon = MonoDevelop.Ide.Gui.Stock.Solution;
			else if (entry is SolutionFolder)
				icon = MonoDevelop.Ide.Gui.Stock.SolutionFolderClosed;
			else if (entry is Project)
				icon = ((Project)entry).StockIcon;
			else
				icon = MonoDevelop.Ide.Gui.Stock.Project;
			
			bool visible = builder.CanBuild (entry);
			bool selected = selectedEntries.ContainsKey (entry);
			
			if (!(entry is SolutionFolder) && !visible)
				return;
			
			if (!iter.Equals (TreeIter.Zero))
				iter = store.AppendValues (iter, icon, entry.Name, entry, selected && visible, visible);
			else
				iter = store.AppendValues (icon, entry.Name, entry, selected && visible, visible);
			
			if (selected)
				tree.ExpandToPath (store.GetPath (iter));
			
			if (entry is SolutionFolder) {
				foreach (SolutionFolderItem ce in ((SolutionFolder)entry).Items) {
					AddEntry (iter, ce);
				}
			}
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:32,代码来源:EntrySelectionTree.cs

示例6: Install

		public void Install (ProgressMonitor monitor, SolutionFolderItem entry, string appName, string prefix, ConfigurationSelector configuration)
		{
			this.appName = appName;
			
			using (DeployContext ctx = new DeployContext (this, DeployService.CurrentPlatform, prefix)) {
				InstallEntry (monitor, ctx, entry, configuration);
			}
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:8,代码来源:InstallResolver.cs

示例7: GetHeader

		public static string GetHeader (SolutionFolderItem policyParent, string fileName, bool newFile)
		{
			StandardHeaderPolicy headerPolicy = policyParent != null ? policyParent.Policies.Get<StandardHeaderPolicy> () : MonoDevelop.Projects.Policies.PolicyService.GetDefaultPolicy<StandardHeaderPolicy> ();
			TextStylePolicy textPolicy = policyParent != null ? policyParent.Policies.Get<TextStylePolicy> ("text/plain") : MonoDevelop.Projects.Policies.PolicyService.GetDefaultPolicy<TextStylePolicy> ("text/plain");
			AuthorInformation authorInfo = policyParent != null ? policyParent.AuthorInformation : AuthorInformation.Default;
			
			return GetHeader (authorInfo, headerPolicy, textPolicy, fileName, newFile);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:8,代码来源:StandardHeaderService.cs

示例8: GetTagModel

			TagModel GetTagModel (SolutionFolderItem policyParent, Project project, string language, string identifier, string fileName)
			{
				var model = new TagModel();
				var projectModel = ProjectTagModel ?? Outer.ProjectTagModel;
				if (projectModel != null)
					model.InnerModels = new [] { projectModel };
				ModifyTags (policyParent, project, language, identifier, fileName, ref model.OverrideTags);
				return model;
			}
开发者ID:picoe,项目名称:Eto,代码行数:9,代码来源:EnhancedFile.cs

示例9: AddToProject

		public override bool AddToProject (SolutionFolderItem policyParent, Project project, string language, string directory, string name)
		{
			if (!GtkDesignInfo.SupportsDesigner (project)) {
				ReferenceManager mgr = new ReferenceManager (project as DotNetProject);
				mgr.GtkPackageVersion = mgr.DefaultGtkVersion;
				mgr.Dispose ();
			}

			GtkDesignInfo info = GtkDesignInfo.FromProject ((DotNetProject) project);
				
			GuiBuilderProject gproject = info.GuiBuilderProject;
			
			string fileName = fileTemplate.GetFileName (policyParent, project, language, directory, name);
			fileTemplate.AddToProject (policyParent, project, language, directory, name);

			FileService.NotifyFileChanged (fileName);

			DotNetProject netProject = project as DotNetProject;
			string ns = netProject != null ? netProject.GetDefaultNamespace (fileName) : "";
			string cname = Path.GetFileNameWithoutExtension (fileName);
			string fullName = ns.Length > 0 ? ns + "." + cname : cname;
			string[,] tags = { 
				{"Name", cname},
				{"Namespace", ns},
				{"FullName", fullName}
			};

			XmlElement widgetElem = steticTemplate ["widget"];
			if (widgetElem != null) {
				string content = widgetElem.OuterXml;
				content = StringParserService.Parse (content, tags);
				
				XmlDocument doc = new XmlDocument ();
				doc.LoadXml (content);
				
				gproject.AddNewComponent (doc.DocumentElement);
				gproject.SaveAll (false);
				IdeApp.ProjectOperations.SaveAsync (project);
				return true;
			}
			
			widgetElem = steticTemplate ["action-group"];
			if (widgetElem != null) {
				string content = widgetElem.OuterXml;
				content = StringParserService.Parse (content, tags);
				
				XmlDocument doc = new XmlDocument ();
				doc.LoadXml (content);
				
				gproject.SteticProject.AddNewActionGroup (doc.DocumentElement);
				gproject.SaveAll (false);
				IdeApp.ProjectOperations.SaveAsync (project);
				return true;
			}
			
			throw new InvalidOperationException ("<widget> or <action-group> element not found in widget template.");
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:57,代码来源:WidgetFileDescriptionTemplate.cs

示例10: AddClasses

		void AddClasses (ITreeBuilder builder, SolutionFolderItem entry)
		{
			if (entry is SolutionFolder) {
				foreach (SolutionFolderItem e in ((SolutionFolder)entry).Items)
					AddClasses (builder, e);
			} else if (entry is Project) {
				ProjectNodeBuilder.BuildChildNodes (builder, entry as Project);
			}
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:9,代码来源:CombineNodeBuilder.cs

示例11: AddToProject

		public override bool AddToProject (SolutionFolderItem policyParent, Project project, string language, string directory, string name)
		{
			var model = CombinedTagModel.GetTagModel (ProjectTagModel, policyParent, project, language, name, null);
			var fileName = StringParserService.Parse (name, model);

			project.ProjectProperties.SetValue (typeAtt.Value, string.IsNullOrEmpty (fileName) ? propertyInnerText : string.Concat (fileName, extension));

			return true;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:9,代码来源:PropertyDescriptionTemplate.cs

示例12: AddToProject

		public override bool AddToProject (SolutionFolderItem policyParent, Project project, string language, string directory, string name)
		{
			ProjectFile file = template.AddFileToProject (policyParent, project, language, directory, name);
			if (file != null) {
				file.BuildAction = BuildAction.EmbeddedResource;
				return true;
			}
			else
				return false;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:10,代码来源:ResourceFileDescriptionTemplate.cs

示例13: GetDeployFiles

		public virtual DeployFileCollection GetDeployFiles (DeployContext ctx, SolutionFolderItem entry, ConfigurationSelector configuration)
		{
			if (entry is SolutionFolder)
				return GetCombineDeployFiles (ctx, (SolutionFolder) entry, configuration);
			else if (entry is Project)
				return GetProjectDeployFiles (ctx, (Project) entry, configuration);
			else if (Next != null)
				return Next.GetDeployFiles (ctx, entry, configuration);
			else
				return new DeployFileCollection ();
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:11,代码来源:DeployServiceExtension.cs

示例14: SolutionItemReference

		public SolutionItemReference (SolutionFolderItem item)
		{
			if (item is SolutionItem) {
				path = ((SolutionItem)item).FileName;
			} else {
				path = item.ParentSolution.FileName;
				if ((item is SolutionFolder) && ((SolutionFolder)item).IsRoot)
					id = ":root:";
				else
					id = item.ItemId;
			}
		}
开发者ID:gAdrev,项目名称:monodevelop,代码行数:12,代码来源:SolutionItemReference.cs

示例15: ModifyTags

		public override void ModifyTags (SolutionFolderItem policyParent, Project project, string language, string identifier, string fileName, ref Dictionary<string,string> tags)
		{
			base.ModifyTags (policyParent, project, language, identifier, fileName, ref tags);
			if (fileName == null)
				return;
			
			tags ["AspNetMaster"] = "";
			tags ["AspNetMasterContent"] = "";
			
			var aspProj = project.GetService<AspNetAppProjectFlavor> ();
			if (aspProj == null)
				throw new InvalidOperationException ("MasterContentFileDescriptionTemplate is only valid for ASP.NET projects");
			
			ProjectFile masterPage = null;
			
			var dialog = new MonoDevelop.Ide.Projects.ProjectFileSelectorDialog (project, null, "*.master");
			try {
				dialog.Title = GettextCatalog.GetString ("Select a Master Page...");
				int response = MonoDevelop.Ide.MessageService.RunCustomDialog (dialog);
				if (response == (int)Gtk.ResponseType.Ok)
					masterPage = dialog.SelectedFile;
			} finally {
				dialog.Destroy ();
				dialog.Dispose ();
			}
			if (masterPage == null)
				return;
			
			tags ["AspNetMaster"] = aspProj.LocalToVirtualPath (masterPage);
			
			try {
				var pd = TypeSystemService.ParseFile (project, masterPage.FilePath).Result
						as WebFormsParsedDocument;
				if (pd == null)
					return;
				
				var sb = new System.Text.StringBuilder ();
				foreach (string id in pd.XDocument.GetAllPlaceholderIds ()) {
					sb.Append ("<asp:Content ContentPlaceHolderID=\"");
					sb.Append (id);
					sb.Append ("\" ID=\"");
					sb.Append (id);
					sb.Append ("Content\" runat=\"server\">\n</asp:Content>\n");
				}
				
				tags["AspNetMasterContent"] = sb.ToString ();
			}
			catch (Exception ex) {
				//no big loss if we just insert blank space
				//it's just a template for the user to start editing
				LoggingService.LogWarning ("Error generating AspNetMasterContent for template", ex);
			}
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:53,代码来源:MasterContentFileDescriptionTemplate.cs


注:本文中的MonoDevelop.Projects.SolutionFolderItem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。