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


C# Core.Codon类代码示例

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


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

示例1: BuildItem

		/// <summary>
		/// Creates an item with the specified sub items. And the current
		/// Condition status for this item.
		/// </summary>
		public object BuildItem(object caller, Codon codon, ArrayList subItems)
		{
//			if (subItems == null || subItems.Count > 0) {
//				throw new ApplicationException("Tried to buil a command with sub commands, please check the XML definition.");
//			}
			return new DisplayBindingDescriptor(codon);
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:11,代码来源:DisplayBindingDoozer.cs

示例2: SchemeExtensionDescriptor

		public SchemeExtensionDescriptor(Codon codon)
		{
			this.codon = codon;
			schemeName = codon.Properties["scheme"];
			if (schemeName == null || schemeName.Length == 0)
				schemeName = codon.Id;
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:7,代码来源:SchemeExtension.cs

示例3: DisplayBindingDescriptor

		public DisplayBindingDescriptor(Codon codon)
		{
			isSecondary = codon.Properties["type"] == "Secondary";
			if (!isSecondary && codon.Properties["type"] != "" && codon.Properties["type"] != "Primary")
				MessageService.ShowWarning("Unknown display binding type: " + codon.Properties["type"]);
			this.codon = codon;
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:DisplayBindingDescriptor.cs

示例4: ToolbarItemDescriptor

		public ToolbarItemDescriptor(object caller, Codon codon, IList subItems, IEnumerable<ICondition> conditions)
		{
			this.Caller = caller;
			this.Codon = codon;
			this.SubItems = subItems;
			this.Conditions = conditions;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:7,代码来源:ToolBarItemDoozer.cs

示例5: BuildItem

        public object BuildItem(object caller, Codon codon, ArrayList subItems)
        {
            string type = codon.Properties.Contains("type") ? codon.Properties["type"] : "Item";

            bool createCommand = codon.Properties["loadclasslazy"] == "false";

            switch (type) {
                case "Separator":
                    return new ToolBarSeparator(codon, caller);
                case "CheckBox":
                    return new ToolBarCheckBox(codon, caller);
                case "Item":
                    return new ToolBarCommand(codon, caller, createCommand);
                case "ComboBox":
                    return new ToolBarComboBox(codon, caller);
                case "TextBox":
                    return new ToolBarTextBox(codon, caller);
                case "Label":
                    return new ToolBarLabel(codon, caller);
                case "DropDownButton":
                    return new ToolBarDropDownButton(codon, caller, subItems);
                case "SplitButton":
                    return new ToolBarSplitButton(codon, caller, subItems);
                case "Builder":
                    return codon.AddIn.CreateObject(codon.Properties["class"]);
                default:
                    throw new System.NotSupportedException("unsupported menu item type : " + type);
            }
        }
开发者ID:jumpinjackie,项目名称:fdotoolbox,代码行数:29,代码来源:ToolBarItemDoozer.cs

示例6: ToolbarItemDescriptor

		public ToolbarItemDescriptor(object parameter, Codon codon, IList subItems, IReadOnlyCollection<ICondition> conditions)
		{
			this.Parameter = parameter;
			this.Codon = codon;
			this.SubItems = subItems;
			this.Conditions = conditions;
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:7,代码来源:ToolBarItemDoozer.cs

示例7: AddNextPathChainString

 private static string AddNextPathChainString(Codon codon)
 {
     if (codon.Properties.Contains("label"))
     return StringParser.Parse(codon.Properties["label"]).Replace("&", "");
       else
     return codon.Id;
 }
开发者ID:MyLoadTest,项目名称:VuGenPowerPack,代码行数:7,代码来源:SearchItemBuilder.cs

示例8: BuildItem

 public object BuildItem(object caller, Codon codon, ArrayList subItems)
 {
     return new Tool {
         ToolTipText = codon.Properties["tooltiptext"],
         Command = codon.AddIn.CreateObject(codon.Properties["class"]) as AbstractCommand
     };
 }
开发者ID:SchwarzerLoewe,项目名称:Paint,代码行数:7,代码来源:ToolDoozer.cs

示例9: DoSetUp

		void DoSetUp(XmlReader reader, string endElement)
		{
			Stack<ICondition> conditionStack = new Stack<ICondition>();
			List<Codon> innerCodons = new List<Codon>();
			while (reader.Read()) {
				switch (reader.NodeType) {
					case XmlNodeType.EndElement:
						if (reader.LocalName == "Condition" || reader.LocalName == "ComplexCondition") {
							conditionStack.Pop();
						} else if (reader.LocalName == endElement) {
							if (innerCodons.Count > 0)
								this.codons.Add(innerCodons);
							return;
						}
						break;
					case XmlNodeType.Element:
						string elementName = reader.LocalName;
						if (elementName == "Condition") {
							conditionStack.Push(Condition.Read(reader));
						} else if (elementName == "ComplexCondition") {
							conditionStack.Push(Condition.ReadComplexCondition(reader));
						} else {
							Codon newCodon = new Codon(this.AddIn, elementName, Properties.ReadFromAttributes(reader), conditionStack.ToArray());
							innerCodons.Add(newCodon);
							if (!reader.IsEmptyElement) {
								ExtensionPath subPath = this.AddIn.GetExtensionPath(this.Name + "/" + newCodon.Id);
								subPath.DoSetUp(reader, elementName);
							}
						}
						break;
				}
			}
			if (innerCodons.Count > 0)
				this.codons.Add(innerCodons);
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:35,代码来源:ExtensionPath.cs

示例10: BuildItem

		public object BuildItem(object caller, Codon codon, ArrayList subItems)
		{
			return new FileFilterDescriptor {
				Name = StringParser.Parse(codon.Properties["name"]),
				Extensions = codon.Properties["extensions"]
			};
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:FileFilterDoozer.cs

示例11: MenuCheckBox

 public MenuCheckBox(Codon codon, object caller)
 {
     this.RightToLeft = RightToLeft.Inherit;
     this.caller = caller;
     this.codon  = codon;
     UpdateText();
 }
开发者ID:jumpinjackie,项目名称:fdotoolbox,代码行数:7,代码来源:MenuCheckBox.cs

示例12: CommandWrapper

 private CommandWrapper(Codon codon, IReadOnlyCollection<ICondition> conditions)
 {
     if (conditions == null)
         throw new ArgumentNullException("conditions");
     this.codon = codon;
     this.conditions = conditions;
     this.canExecuteChangedHandlersToRegisterOnCommand = new WeakCollection<EventHandler>();
 }
开发者ID:ichengzi,项目名称:SharpDevelop,代码行数:8,代码来源:CommandWrapper.cs

示例13: CreateCommand

		/// <summary>
		/// Creates a non-lazy command.
		/// </summary>
		public static ICommand CreateCommand(Codon codon, IReadOnlyCollection<ICondition> conditions)
		{
			ICommand command = CreateCommand(codon);
			if (command != null && conditions.Count == 0)
				return command;
			else
				return new CommandWrapper(command, conditions);
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:11,代码来源:CommandWrapper.cs

示例14: BuildItem

 public object BuildItem(object caller, Codon codon, ArrayList subItems)
 {
   string id = codon.Id;
   string resource = codon.Properties["resource"];
   ImageProxy proxy = ResourceImageProxy.FromResource(id,resource);
   TextureManager.BuiltinTextures.Add(proxy);
   return proxy;
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:8,代码来源:TextureDoozer.cs

示例15: ContextActionOptionPanelDescriptor

			public ContextActionOptionPanelDescriptor(Codon codon)
			{
				this.id = codon.Id;
				this.path = codon.Properties["path"];
				this.label = codon.Properties["label"];
				if (string.IsNullOrEmpty(label))
					label = "Context Actions"; // TODO: Translate
			}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:8,代码来源:ContextActionOptionPanelDoozer.cs


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