當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。