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


C# Icon.ToString方法代码示例

本文整理汇总了C#中System.Drawing.Icon.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Icon.ToString方法的具体用法?C# Icon.ToString怎么用?C# Icon.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Drawing.Icon的用法示例。


在下文中一共展示了Icon.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegisterStatusIcon

 private void RegisterStatusIcon(Icon icon)
 {
     if (icon != Icon.None)
     {
         this.ResourceManager.RegisterClientStyleBlock(icon.ToString() + "-sbar", this.GetIconClass(icon));
     }
 }
开发者ID:emayk,项目名称:Ext.NET.Pro,代码行数:7,代码来源:StatusBar.cs

示例2: SetUp

		public void SetUp ()		
		{
			icon = new Icon (TestBitmap.getInFile ("bitmaps/VisualPng.ico"));
			iconStr = icon.ToString ();
		
			icoConv = new IconConverter();
			icoConvFrmTD = (IconConverter) TypeDescriptor.GetConverter (icon);
			
			Stream stream = new FileStream (TestBitmap.getInFile ("bitmaps/VisualPng1.ico"), FileMode.Open);
			int length = (int) stream.Length;
			iconBytes = new byte [length];
 			
			try {
				if (stream.Read (iconBytes, 0, length) != length)
					Assert.Fail ("SU#1: Read Failure"); 
			} catch (Exception e) {
				Assert.Fail ("SU#2 Exception thrown while reading. Exception is: "+e.Message);
			} finally {
				stream.Close ();
			}
		
			stream.Close ();

		}
开发者ID:nlhepler,项目名称:mono,代码行数:24,代码来源:TestIconConverter.cs

示例3: GetIconClassName

 public static string GetIconClassName(Icon icon)
 {
     return (icon != Icon.None) ? string.Format("icon-{0}-sbar", icon.ToString().ToLowerInvariant()) : "";
 }
开发者ID:emayk,项目名称:Ext.NET.Pro,代码行数:4,代码来源:StatusBar.cs

示例4: SetIconClass

 /// <summary>
 /// Sets the CSS class that provides a background image to use as the button's icon. This method also changes the value of the iconCls config internally.
 /// </summary>
 protected virtual void SetIconClass(Icon icon)
 {
     if (this.Icon != Icon.None)
     {
         this.SetIconClass("#" + icon.ToString()); 
     }
     else
     {
         this.SetIconClass(""); 
     }
 }
开发者ID:emayk,项目名称:Ext.NET.Pro,代码行数:14,代码来源:LabelBase.cs

示例5: SetIconCls

 /// <summary>
 /// Sets the CSS class that provides a background image to use as the button's icon. This method also changes the value of the iconCls config internally.
 /// </summary>
 /// <param name="icon">New icon</param>
 protected virtual void SetIconCls(Icon icon)
 {
     this.SetIconCls(this.Icon != Icon.None ? "#" + icon.ToString() : "");
 }
开发者ID:rajjan,项目名称:Ext.NET.Community,代码行数:8,代码来源:PanelHeader.cs


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