• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# SolutionItem类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AddToProject

		public override bool AddToProject (SolutionItem parent, Project project, string language, string directory, string name)
		{
			// Replace template variables
			
			string cname = Path.GetFileNameWithoutExtension (name);
			string[,] tags = { 
				{"Name", cname},
			};
			
			string content = addinTemplate.OuterXml;
			content = StringParserService.Parse (content, tags);
			
			// Create the manifest
			
			XmlDocument doc = new XmlDocument ();
			doc.LoadXml (content);

			string file = Path.Combine (directory, "manifest.addin.xml");
			doc.Save (file);
			
			project.AddFile (file, BuildAction.EmbeddedResource);
			
			AddinData.EnableAddinAuthoringSupport ((DotNetProject)project);
			return true;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:25,代码来源:AddinFileDescriptionTemplate.cs


示例2: AddFileToProject

        public ProjectFile AddFileToProject(SolutionItem policyParent, Project project, string language, string directory, string name)
        {
            generatedFile = SaveFile (policyParent, project, language, directory, name);
            if (generatedFile != null) {
                string buildAction = this.buildAction ?? project.GetDefaultBuildAction (generatedFile);
                ProjectFile projectFile = project.AddFile (generatedFile, buildAction);

                if (!string.IsNullOrEmpty (dependsOn)) {
                    Dictionary<string,string> tags = new Dictionary<string,string> ();
                    ModifyTags (policyParent, project, language, name, generatedFile, ref tags);
                    string parsedDepName = StringParserService.Parse (dependsOn, tags);
                    if (projectFile.DependsOn != parsedDepName)
                        projectFile.DependsOn = parsedDepName;
                }

                if (!string.IsNullOrEmpty (customTool))
                    projectFile.Generator = customTool;

                DotNetProject netProject = project as DotNetProject;
                if (netProject != null) {
                    // Add required references
                    foreach (string aref in references) {
                        string res = netProject.AssemblyContext.GetAssemblyFullName (aref, netProject.TargetFramework);
                        res = netProject.AssemblyContext.GetAssemblyNameForVersion (res, netProject.TargetFramework);
                        if (!ContainsReference (netProject, res))
                            netProject.References.Add (new ProjectReference (ReferenceType.Package, aref));
                    }
                }

                return projectFile;
            } else
                return null;
        }
开发者ID:brantwedel,项目名称:monodevelop,代码行数:33,代码来源:SingleFileDescriptionTemplate.cs


示例3: GetDeployFiles

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


示例4: DeployDialog

		public DeployDialog (SolutionItem 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:Kalnor,项目名称:monodevelop,代码行数:34,代码来源:DeployDialog.cs


示例5: Fill

		public void Fill (PackageBuilder builder, SolutionItem selection)
		{
			store.Clear ();
			
			this.builder = builder;
			if (selection is SolutionFolder) {
				foreach (SolutionItem 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) {
					ReadOnlyCollection<Solution> items = IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem.GetAllSolutions ();
					if (items.Count > 0)
						solution = items [0];
					else
						return;
				}
			}
			AddEntry (TreeIter.Zero, solution.RootFolder);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:29,代码来源:EntrySelectionTree.cs


示例6: GetService

		public virtual object GetService (SolutionItem item, Type type)
		{
			if (type.IsInstanceOfType (this))
				return this;
			else
				return GetNext (item).GetService (item, type);
		}
开发者ID:jgranick,项目名称:haxedevelop,代码行数:7,代码来源:ProjectServiceExtension.cs


示例7: AddEntry

		void AddEntry (TreeIter iter, SolutionItem 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 (SolutionItem ce in ((SolutionFolder)entry).Items) {
					AddEntry (iter, ce);
				}
			}
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:32,代码来源:EntrySelectionTree.cs


示例8: GetSupportLevel

		public FeatureSupportLevel GetSupportLevel (SolutionFolder parentCombine, SolutionItem entry)
		{
			if (entry is Project)
				return FeatureSupportLevel.SupportedByDefault;
			else
				return FeatureSupportLevel.NotSupported;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:MakefileIntegrationFeature.cs


示例9: CanDeploy

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


示例10: Fill

		public void Fill (SolutionFolder parentCombine, SolutionItem entry, ISolutionItemFeature[] features)
		{
			selectedFeatures.Clear ();
			selectedEditors.Clear ();
			
			this.entry = entry;
			this.parentCombine = parentCombine;
			
			foreach (Gtk.Widget w in box.Children) {
				box.Remove (w);
				w.Destroy ();
			}
			// Show enabled features at the beginning
			foreach (ISolutionItemFeature feature in features)
				if (feature.GetSupportLevel (parentCombine, entry) == FeatureSupportLevel.Enabled) {
					Gtk.Widget editor = AddFeature (feature);
					selectedFeatures.Add (feature);
					selectedEditors.Add (editor);
				}
			foreach (ISolutionItemFeature feature in features)
				if (feature.GetSupportLevel (parentCombine, entry) != FeatureSupportLevel.Enabled)
					AddFeature (feature);
			
			if (box.Children.Length == 0) {
				// No features
				Label lab = new Label ();
				lab.Xalign = 0;
				lab.Text = GettextCatalog.GetString ("There are no additional features available for this project.");
				box.PackStart (lab, false, false, 0);
				lab.Show ();
			}
			scrolled.AddWithViewport (box);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:33,代码来源:CombineEntryFeatureSelector.cs


示例11: ApplyFeature

		public void ApplyFeature (SolutionFolder parentCombine, SolutionItem entry, Widget editor)
		{
			GtkFeatureWidget fw = (GtkFeatureWidget) editor;
			ReferenceManager refmgr = new ReferenceManager ((DotNetProject) entry);
			refmgr.GtkPackageVersion = fw.SelectedVersion;
			refmgr.Dispose ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:7,代码来源:GtkFeatureWidget.cs


示例12: Install

		public void Install (IProgressMonitor monitor, SolutionItem entry, string appName, string prefix, ConfigurationSelector configuration)
		{
			this.appName = appName;
			
			using (DeployContext ctx = new DeployContext (this, "Linux", prefix)) {
				InstallEntry (monitor, ctx, entry, configuration);
			}
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:8,代码来源:InstallResolver.cs


示例13: UnitTest

		protected UnitTest (string name, WorkspaceObject ownerSolutionItem)
		{
			this.name = name;
			this.ownerSolutionItem = ownerSolutionItem;
			ownerSolutionEntityItem = ownerSolutionItem as SolutionItem;
			if (ownerSolutionEntityItem != null)
				ownerSolutionEntityItem.DefaultConfigurationChanged += OnConfugurationChanged;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:8,代码来源:UnitTest.cs


示例14: GetMappedConfiguration

		public string GetMappedConfiguration (SolutionItem item)
		{
			foreach (SolutionConfigurationEntry entry in configurations) {
				if (entry.Item == item)
					return entry.ItemConfiguration;
			}
			return null;
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:8,代码来源:SolutionConfiguration.cs


示例15: BuildEnabledForItem

		public bool BuildEnabledForItem (SolutionItem item)
		{
			foreach (SolutionConfigurationEntry entry in configurations) {
				if (entry.Item == item)
					return entry.Build && item.Configurations [entry.ItemConfiguration] != null;
			}
			return false;
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:8,代码来源:SolutionConfiguration.cs


示例16: GetHeader

		public static string GetHeader (SolutionItem 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:yayanyang,项目名称:monodevelop,代码行数:8,代码来源:StandardHeaderService.cs


示例17: ApplyFeature

		public void ApplyFeature (SolutionFolder parentFolder, SolutionItem entry, Gtk.Widget editor)
		{
			// The solution may not be saved yet
			if (parentFolder.ParentSolution.FileName.IsNullOrEmpty || !System.IO.File.Exists (parentFolder.ParentSolution.FileName))
				parentFolder.ParentSolution.Saved += OnSolutionSaved;
			else
				OnSolutionSaved (parentFolder.ParentSolution, null);
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:8,代码来源:GitSupportFeature.cs


示例18: CheckProjectPackageOfExtension

		public static bool CheckProjectPackageOfExtension (SolutionItem item, string packageExtension)
		{
			var project = item as Project;
			var outputPath = project.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration);
			var outputDirectory = outputPath.ParentDirectory.FullPath.ToString ();
			var files = Directory.GetFiles (outputDirectory);
			return files.Any (f => f.ToLower ().Contains (packageExtension));
		}
开发者ID:interisti,项目名称:monodevelop-addin-packager,代码行数:8,代码来源:MDToolHelper.cs


示例19: GetSupportLevel

		public FeatureSupportLevel GetSupportLevel (SolutionFolder parentCombine, SolutionItem entry)
		{
			if (entry is TranslationProject && parentCombine != null)
				return FeatureSupportLevel.Enabled;
			else if ((entry is Project) && parentCombine != null)
				return FeatureSupportLevel.Supported;
			else
				return FeatureSupportLevel.NotSupported;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:9,代码来源:GettextFeature.cs


示例20: AddToProject

		public override bool AddToProject (SolutionItem policyParent, Project project, string language, string directory, string name)
		{
			var path = FilePath.Build (directory, project.Name + "-res.zip");
			var file = new ProjectFile (path, "EmbeddedResource");
			file.ResourceId = "XobotOS.Resources";
			file.Visible = false;
			project.AddFile (file);
			return true;
		}
开发者ID:hakeemsm,项目名称:XobotOS,代码行数:9,代码来源:AndroidResourceFile.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Solver类代码示例发布时间:2022-05-24
下一篇:
C# SolutionFolder类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap