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


C# Description.AddinDescription类代码示例

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


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

示例1: NodeEditorWidget

		public NodeEditorWidget (DotNetProject project, AddinRegistry reg, ExtensionNodeType ntype, AddinDescription parentAddinDescription, string parentPath, ExtensionNodeDescription node)
		{
			this.node = node;
			this.project = project;
			tips = new Tooltips ();
			Spacing = 0;
			
			// Header
			
			Label label = new Label ();
			label.Wrap = true;
			label.WidthRequest = 480;
			string txt = "<b>" + node.NodeName + "</b>";
			if (ntype.Description.Length > 0)
				txt += "\n" + GLib.Markup.EscapeText (ntype.Description);
			label.Markup = txt;
			label.Xalign = 0f;
			PackStart (label, false, false, 6);
			PackStart (new HSeparator (), false, false, 0);
			
			// Attributes
			
			grid = new PropertyGrid ();
			grid.CurrentObject = new NodeWrapper (project, reg, ntype, parentAddinDescription, parentPath, node);
			
			PackStart (grid, true, true, 0);
			
			ShowAll ();
			
			grid.ShowHelp = true;
			grid.ShowToolbar = false;
			
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:33,代码来源:NodeEditorWidget.cs

示例2: GetDisplayName

		public static string GetDisplayName (AddinDescription ad)
		{
			if (!string.IsNullOrEmpty (ad.Name))
				return ad.Name;
			else
				return ad.LocalId;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:Util.cs

示例3: SelectNodeSetDialog

		public SelectNodeSetDialog (DotNetProject project, AddinRegistry registry, AddinDescription desc)
		{
			this.Build();
			this.project = project;
			this.registry = registry;
			this.desc = desc;
			
			foreach (AddinDependency adep in desc.MainModule.Dependencies) {
				Addin addin = registry.GetAddin (adep.FullAddinId);
				if (addin != null && addin.Description != null) {
					foreach (ExtensionNodeSet ns in addin.Description.ExtensionNodeSets) {
						combo.AppendText (ns.Id);
						sets [ns.Id] = ns;
					}
				}
			}
			
			foreach (ExtensionNodeSet ns in desc.ExtensionNodeSets) {
				combo.AppendText (ns.Id);
				sets [ns.Id] = ns;
			}
			
			nodeseteditor.AllowEditing = false;
			buttonOk.Sensitive = false;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:25,代码来源:SelectNodeSetDialog.cs

示例4: LoadAddin

        void LoadAddin(AddinDescription addin, List<ConfigurablePlugin> plugins)
        {
            if (addin == null) {
                vbox1.Visible = false;
                return;
            }
            vbox1.Visible = true;
            namelabel.Text = addin.Name;
            desclabel.Text = addin.Description;
            authorlabel.Text = addin.Author;
            filelabel.Text = addin.AddinFile;

            if (plugins != null && plugins.Count > 0) {
                configframe.Visible = true;
                foreach (Widget w in configbox.Children) {
                    configbox.Remove (w);
                    w.Destroy ();
                }
                foreach (ConfigurablePlugin plugin in plugins) {
                    foreach (AttributeAndProperty attrprop in plugin.Properties) {
                        if (attrprop.Property.PropertyType == typeof(Boolean)) {
                            CheckButton button = new CheckButton (attrprop.Attribute.description);
                            button.Active = (bool)attrprop.Property.GetValue (plugin, null);
                            button.Clicked += (sender, e) => {
                                attrprop.Property.SetValue (plugin, button.Active, null);
                            };
                            button.Show ();
                            configbox.PackStart (button, false, true, 0);
                        }
                    }
                }
            } else {
                configframe.Visible = false;
            }
        }
开发者ID:GNOME,项目名称:longomatch,代码行数:35,代码来源:PluginsPreferences.cs

示例5: Fill

		public void Fill (AddinDescription desc, AddinData data)
		{
			adesc = desc;
			comboNs.Entry.Text = desc.Namespace;
			entryVersion.Text = desc.Version;
			entryCompatVersion.Text = desc.CompatVersion;
			textviewDesc.Buffer.Text = desc.Description;
			entryAuthor.Text = desc.Author;
			entryLicense.Text = desc.Copyright;
			entryUrl.Text = desc.Url;
			checkIsRoot.Active = desc.IsRoot;
			notebook.ShowTabs = false;
			notebook.ShowBorder = false;
			
			if (desc.LocalId.Length == 0) {
				defaultId = System.IO.Path.GetFileNameWithoutExtension (data.Project.GetOutputFileName (ConfigurationSelector.Default));
				entryIdentifier.Text = defaultId;
			}
			else
				entryIdentifier.Text = desc.LocalId;
			
			if (desc.Name.Length == 0) {
				defaultName = entryIdentifier.Text;
				entryName.Text = defaultName;
			}
			else
				entryName.Text = desc.Name;
			
			extensionEditor.SetData (adesc, data);
			extensionPointsEditor.SetData (adesc, data);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:31,代码来源:AddinDescriptionWidget.cs

示例6: RegisterNodeSet

		public void RegisterNodeSet (AddinDescription description, ExtensionNodeSet nset)
		{
			List<RootExtensionPoint> extensions;
			if (nodeSetHash.TryGetValue (nset.Id, out extensions)) {
				// Extension point already registered
				List<ExtensionPoint> compatExtensions = GetCompatibleExtensionPoints (nset.Id, description, description.MainModule, extensions);
				if (compatExtensions.Count > 0) {
					foreach (ExtensionPoint einfo in compatExtensions)
						einfo.NodeSet.MergeWith (null, nset);
					return;
				}
			}
			// Create a new extension set
			RootExtensionPoint rep = new RootExtensionPoint ();
			rep.ExtensionPoint = new ExtensionPoint ();
			rep.ExtensionPoint.SetNodeSet (nset);
			rep.ExtensionPoint.RootAddin = description.AddinId;
			rep.ExtensionPoint.Path = nset.Id;
			rep.Description = description;
			if (extensions == null) {
				extensions = new List<RootExtensionPoint> ();
				nodeSetHash [nset.Id] = extensions;
			}
			extensions.Add (rep);
		}
开发者ID:wanglehui,项目名称:mono-addins,代码行数:25,代码来源:AddinUpdateData.cs

示例7: NodeEditorDialog

		public NodeEditorDialog (DotNetProject project, AddinRegistry reg, ExtensionNodeType ntype, AddinDescription parentAddinDescription, string parentPath, ExtensionNodeDescription node)
		{
			editor = new NodeEditorWidget (project, reg, ntype, parentAddinDescription, parentPath, node);
			editor.BorderWidth = 12;
			this.VBox.PackStart (editor, true, true, 0);
			this.AddButton (Stock.Cancel, ResponseType.Cancel);
			this.AddButton (Stock.Ok, ResponseType.Ok);
			this.DefaultWidth = 400;
			ShowAll ();
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:10,代码来源:NodeEditorDialog.cs

示例8: NewExtensionPointDialog

		public NewExtensionPointDialog (DotNetProject project, AddinRegistry registry, AddinDescription adesc, ExtensionPoint ep)
		{
			this.Build();
			this.ep = ep;
			this.project = project;
			this.registry = registry;
			this.adesc = adesc;

			notebook.Page = 0;
			
			Fill ();
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:12,代码来源:NewExtensionPointDialog.cs

示例9: AddDependencies

		public static void AddDependencies (AddinDescription desc, AddinScanResult scanResult)
		{
			// Not implemented in AddinScanResult to avoid making AddinDescription remotable
			foreach (ModuleDescription mod in desc.AllModules) {
				foreach (Dependency dep in mod.Dependencies) {
					AddinDependency adep = dep as AddinDependency;
					if (adep == null) continue;
					string depid = Addin.GetFullId (desc.Namespace, adep.AddinId, adep.Version);
					scanResult.AddAddinToUpdateRelations (depid);
				}
			}
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:12,代码来源:Util.cs

示例10: Fill

		public void Fill (AddinRegistry reg, AddinDescription localDesc, AddinDescription pdesc, string path)
		{
			List<AddinDescription> deps = new List<AddinDescription> ();
			
			foreach (Dependency dep in pdesc.MainModule.Dependencies) {
				AddinDependency adep = dep as AddinDependency;
				if (adep == null) continue;
				Addin addin = reg.GetAddin (adep.FullAddinId);
				if (addin != null)
					deps.Add (addin.Description);
			}
			Fill (localDesc, pdesc, path, deps);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:13,代码来源:ExtensionNodeTree.cs

示例11: RegisterAddinRootExtensionPoint

		public void RegisterAddinRootExtensionPoint (AddinDescription description, ExtensionPoint ep)
		{
			ArrayList list = (ArrayList) pathHash [ep.Path];
			if (list == null) {
				list = new ArrayList ();
				pathHash [ep.Path] = list;
			}
			
			RootExtensionPoint rep = new RootExtensionPoint ();
			rep.Description = description;
			rep.ExtensionPoint = ep;
			ep.RootAddin = description.AddinId;
			list.Add (rep);
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:14,代码来源:AddinUpdateData.cs

示例12: RegisterAddinRootNodeSet

		public void RegisterAddinRootNodeSet (AddinDescription description, ExtensionNodeSet nodeSet)
		{
			ArrayList list = (ArrayList) nodeSetHash [nodeSet.Id];
			if (list == null) {
				list = new ArrayList ();
				nodeSetHash [nodeSet.Id] = list;
			}
			
			RootExtensionPoint rep = new RootExtensionPoint ();
			rep.Description = description;
			ExtensionPoint ep = new ExtensionPoint ();
			ep.RootAddin = description.AddinId;
			ep.SetNodeSet (nodeSet);
			rep.ExtensionPoint = ep;
			list.Add (rep);
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:16,代码来源:AddinUpdateData.cs

示例13: PropertyLocalization

        public void PropertyLocalization()
        {
            AddinDescription desc = new AddinDescription ();

            desc.Properties.SetPropertyValue ("prop1", "val1");
            Assert.AreEqual ("val1", desc.Properties.GetPropertyValue ("prop1"));
            Assert.AreEqual ("val1", desc.Properties.GetPropertyValue ("prop1", "en"));
            Assert.AreEqual ("val1", desc.Properties.GetPropertyValue ("prop1", "en-US"));
            Assert.AreEqual ("val1", desc.Properties.GetPropertyValue ("prop1", "en_US"));
            Assert.AreEqual ("val1", desc.Properties.GetPropertyValue ("prop1", null));

            desc.Properties.SetPropertyValue ("prop2", "valCa", "ca");
            Assert.AreEqual ("valCa", desc.Properties.GetPropertyValue ("prop2"));
            Assert.AreEqual ("valCa", desc.Properties.GetPropertyValue ("prop2", "ca"));
            Assert.AreEqual ("valCa", desc.Properties.GetPropertyValue ("prop2", "ca-ES"));
            Assert.AreEqual ("valCa", desc.Properties.GetPropertyValue ("prop2", "ca_ES"));
            Assert.AreEqual ("valCa", desc.Properties.GetPropertyValue ("prop2", "ca-AN"));
            Assert.AreEqual ("valCa", desc.Properties.GetPropertyValue ("prop2", "ca_AN"));
            Assert.IsEmpty (desc.Properties.GetPropertyValue ("prop2", "en"));
            Assert.IsEmpty (desc.Properties.GetPropertyValue ("prop2", "en-US"));
            Assert.IsEmpty (desc.Properties.GetPropertyValue ("prop2", "en_US"));
            Assert.IsEmpty (desc.Properties.GetPropertyValue ("prop2", null));

            desc.Properties.SetPropertyValue ("prop2", "valCaEs", "ca_ES");
            Assert.AreEqual ("valCaEs", desc.Properties.GetPropertyValue ("prop2"));
            Assert.AreEqual ("valCa", desc.Properties.GetPropertyValue ("prop2", "ca"));
            Assert.AreEqual ("valCaEs", desc.Properties.GetPropertyValue ("prop2", "ca-ES"));
            Assert.AreEqual ("valCaEs", desc.Properties.GetPropertyValue ("prop2", "ca_ES"));
            Assert.AreEqual ("valCa", desc.Properties.GetPropertyValue ("prop2", "ca-AN"));
            Assert.AreEqual ("valCa", desc.Properties.GetPropertyValue ("prop2", "ca_AN"));
            Assert.IsEmpty (desc.Properties.GetPropertyValue ("prop2", "en"));
            Assert.IsEmpty (desc.Properties.GetPropertyValue ("prop2", "en-US"));
            Assert.IsEmpty (desc.Properties.GetPropertyValue ("prop2", "en_US"));
            Assert.IsEmpty (desc.Properties.GetPropertyValue ("prop2", null));

            desc.Properties.SetPropertyValue ("prop2", "val4", null);
            Assert.AreEqual ("valCaEs", desc.Properties.GetPropertyValue ("prop2"));
            Assert.AreEqual ("valCa", desc.Properties.GetPropertyValue ("prop2", "ca"));
            Assert.AreEqual ("valCaEs", desc.Properties.GetPropertyValue ("prop2", "ca-ES"));
            Assert.AreEqual ("valCaEs", desc.Properties.GetPropertyValue ("prop2", "ca_ES"));
            Assert.AreEqual ("valCa", desc.Properties.GetPropertyValue ("prop2", "ca-AN"));
            Assert.AreEqual ("valCa", desc.Properties.GetPropertyValue ("prop2", "ca_AN"));
            Assert.AreEqual ("val4", desc.Properties.GetPropertyValue ("prop2", "en"));
            Assert.AreEqual ("val4", desc.Properties.GetPropertyValue ("prop2", "en-US"));
            Assert.AreEqual ("val4", desc.Properties.GetPropertyValue ("prop2", "en_US"));
            Assert.AreEqual ("val4", desc.Properties.GetPropertyValue ("prop2", null));
        }
开发者ID:wanglehui,项目名称:mono-addins,代码行数:47,代码来源:TestAddinDescription.cs

示例14: Fill

		public void Fill (AddinDescription desc)
		{
			string name = desc.Name;
			if (string.IsNullOrEmpty (name))
				name = desc.LocalId;
			labelName.Markup = "<small>Add-in</small>\n<big><b>" + GLib.Markup.EscapeText (name) + "</b></big>";
			
			if (!string.IsNullOrEmpty (desc.Description))
				labelDesc.Text = desc.Description;
			else
				labelDesc.Hide ();
			
			labelId.Text = desc.LocalId;
			labelNamespace.Text = desc.Namespace;
			labelVersion.Text = desc.Version;
			labelAuthor.Text = desc.Author;
			labelCopyright.Text = desc.Copyright;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:18,代码来源:AddinView.cs

示例15: ExtensionSelectorDialog

		public ExtensionSelectorDialog (AddinRegistry reg, AddinDescription adesc, bool isRoot, bool addinSelector)
		{
			this.Build();
			
			this.addinSelector = addinSelector;
			this.registry = reg;
			this.adesc = adesc;
			this.isRoot = isRoot;
			
			pixCategory = ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.ClosedFolder, IconSize.Menu);
			pixNamespace = ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.NameSpace, IconSize.Menu);
			pixAddin = ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Addin, IconSize.Menu);
			pixLocalAddin = ImageService.GetPixbuf ("md-addinauthoring-current-addin", IconSize.Menu);
			
			store = new TreeStore (typeof(string), typeof(object), typeof(ExtensionPoint), typeof(bool), typeof(bool), typeof(Gdk.Pixbuf), typeof(bool), typeof(bool));
			
			TreeViewColumn col = new TreeViewColumn ();
			CellRendererPixbuf cpix = new CellRendererPixbuf ();
			col.PackStart (cpix, false);
			col.AddAttribute (cpix, "pixbuf", ColIcon);
			col.AddAttribute (cpix, "visible", ColShowIcon);
			
			CellRendererToggle ctog = new CellRendererToggle ();
			ctog.Toggled += OnToggled;
			ctog.Yalign = 0;
			ctog.Ypad = 5;
			col.PackStart (ctog, false);
			col.AddAttribute (ctog, "active", ColChecked);
			col.AddAttribute (ctog, "visible", ColShowCheck);
			CellRendererText crt = new CellRendererText ();
			crt.Yalign = 0;
			col.PackStart (crt, true);
			col.AddAttribute (crt, "markup", ColLabel);
			
			tree.AppendColumn (col);
			Fill ();
			
			tree.HeadersVisible = false;
			tree.Model = store;
			
			tree.TestExpandRow += new Gtk.TestExpandRowHandler (OnTestExpandRow);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:42,代码来源:ExtensionSelectorDialog.cs


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