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


C# Icon类代码示例

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


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

示例1: SetIcon

	public bool SetIcon(int IconIndex, Icon NewIcon) {
		if (IconIndex >= 0 && IconIndex < IconsList.Count) {
			IconsList[IconIndex] = NewIcon;
			return true;
		}
		return false;
	}
开发者ID:Deus0,项目名称:Zeltex,代码行数:7,代码来源:Inventory.cs

示例2: assertCurrentNode

 protected void assertCurrentNode(ITestPart part, Icon icon, string text)
 {
     OutlineNode outlineNode = treeBuilder.LastNode;
     outlineNode.Part.ShouldBeTheSameAs(part);
     outlineNode.Icon.ShouldEqual(icon);
     outlineNode.HeaderText().ShouldEqual(text);
 }
开发者ID:adymitruk,项目名称:storyteller,代码行数:7,代码来源:TestTreeBuilderTester.cs

示例3: Input

 internal Input(BootstrapHelper helper, FormInputType inputType)
     : base(helper, "input", Css.FormControl)
 {
     OutputEndTag = false;
     Icon = Icon.None;
     MergeAttribute("type", inputType.GetDescription());
 }
开发者ID:CarlosHAraujo,项目名称:FluentBootstrap,代码行数:7,代码来源:Input.cs

示例4: CommandButton

 public CommandButton(Icon icon, string text, ICommand command)
     : this()
 {
     image.SetIcon(icon);
     label.Content = text;
     button.Command = command;
 }
开发者ID:adymitruk,项目名称:storyteller,代码行数:7,代码来源:CommandButton.xaml.cs

示例5: Virtualtray

    private Virtualtray()
    {
        _virtualbox = (IVirtualBox) new VirtualBox.VirtualBox();

        /* the generated VirtualBox.dll COM library doesn't work with the C# event
         * system, so we handle events by registering callbacks
         */
        _virtualbox.RegisterCallback(this);

        _icon = GetIcon("icon/icon-16.ico");
        _idleIcon = GetIcon("icon/icon-gray-16.ico");

        _notifyIcon = new NotifyIcon();
        _notifyIcon.Icon = _idleIcon;
        _notifyIcon.Text = "Virtualtray";
        _notifyIcon.Visible = true;

        _vms = new Hashtable();

        ContextMenu menu = new ContextMenu();
        foreach (IMachine machine in _virtualbox.Machines) {
            MachineMenu mm = new MachineMenu(machine, menu);
            mm.StateChange += new EventHandler(MachineStateChangeEventHandler);
            _vms.Add(machine.Id, mm);
        }
        menu.MenuItems.Add(new MenuItem("-") {Name = "-"});
        menu.MenuItems.Add(new MenuItem("Open VirtualBox...", new EventHandler(
            MenuLaunchVirtualBoxEventHandler)));
        menu.MenuItems.Add(new MenuItem("Exit", new EventHandler(MenuExitEventHandler)));
        _notifyIcon.ContextMenu = menu;

        ToggleIcon();
        _notifyIcon.MouseClick += new MouseEventHandler(IconClickEventHandler);
        Application.ApplicationExit += new EventHandler(ApplicationExitEventHandler);
    }
开发者ID:justinwh,项目名称:virtualtray,代码行数:35,代码来源:Virtualtray.cs

示例6: CommandButton

 public CommandButton(Icon desiredIcon, string text, ICommand command)
     : this()
 {
     icon.SetIcon(desiredIcon);
     label.Content = text;
     button.Command = command;
 }
开发者ID:kharlamov,项目名称:StoryTeller2,代码行数:7,代码来源:CommandButton.xaml.cs

示例7: IconStyle

 public IconStyle(float scale, float heading, Icon icon, vec2 hotSpot)
 {
     this.scale = scale;
     this.heading = heading;
     this.icon = icon;
     this.hotSpot = hotSpot;
 }
开发者ID:AlphaTangoIndia,项目名称:excel2earth,代码行数:7,代码来源:IconStyle.cs

示例8: Main

	static int Main (string [] args)
	{
		string icoFile = Path.Combine (AppDomain.CurrentDomain.BaseDirectory,
			"earth.ico");

		Icon ico1 = new Icon (icoFile);
		if (ico1.Size != new Size (32, 32))
			return 1;

#if NET_2_0
		Icon ico2 = new Icon (icoFile, 20, 40);
		if (ico2.Size != new Size (32, 32))
			return 2;

		Icon ico3 = new Icon (icoFile, new Size (20, 40));
		if (ico3.Size != new Size (32, 32))
			return 3;
#endif

		string curFile = Path.Combine (AppDomain.CurrentDomain.BaseDirectory,
			"text.cur");

		Cursor cursor = new Cursor (curFile);
		if (cursor.Size != new Size (32, 32))
			return 4;

		return 0;
	}
开发者ID:mono,项目名称:gert,代码行数:28,代码来源:test.cs

示例9: Update

 public void Update(Icon icon, bool inQueue)
 {
     _controls.Run.IsEnabled = !inQueue;
     _controls.Path.Content = _test.GetPath().Locator;
     _controls.Status.Content = inQueue ? "Queued" : _test.GetStatus();
     _controls.Icon.SetIcon(icon);
 }
开发者ID:kharlamov,项目名称:StoryTeller2,代码行数:7,代码来源:TestLineDriver.cs

示例10: Form1

 public Form1()
 {
     InitializeComponent();
     sprites = new Sprites();
     icon = new Icon();
     mainBackground = new MainBackground();
     combatBackground = new CombatBackground();
 }
开发者ID:lightlordmh,项目名称:GDAPSII-Project2,代码行数:8,代码来源:Form1.cs

示例11: Awake

 void Awake()
 {
     GameEvents.onGUIEditorToolbarReady.Add (onGUIEditorToolbarReady);
     if (texture == null) {
         texture = GameDatabase.Instance.GetTexture ("ExtraplanetaryLaunchpads/Textures/icon_button", false);
         icon = new Icon ("EL icon", texture, texture);
     }
 }
开发者ID:Alewx,项目名称:Extraplanetary-Launchpads,代码行数:8,代码来源:EditorToolbar.cs

示例12: Icon

 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="other"></param>
 public Icon(Icon other)
     : base(other)
 {
     if (other.Value != null)
         Value = (System.Drawing.Icon)other.Value.Clone();
     else
         Value = null;
 }
开发者ID:wsrf2009,项目名称:KnxUiEditor,代码行数:12,代码来源:Icon.cs

示例13: draw_combat_icon

        /* sub_76504 */
        internal static void draw_combat_icon(int iconIndex, Icon iconState, int direction, int tileY, int tileX)
        {
            DaxBlock icon = gbl.combat_icons[iconIndex].GetIcon(iconState, direction);

            if (icon != null)
            {
                seg040.draw_combat_picture(icon, (tileY * 3) + 1, (tileX * 3) + 1, 0);
            }
        }
开发者ID:gowantervo,项目名称:coab,代码行数:10,代码来源:ovr034.cs

示例14: SetIcon

    public static void SetIcon(GameObject gObj, Icon icon)
    {
        if (largeIcons == null)
        {
            largeIcons = GetTextures("sv_icon_dot", "_pix16_gizmo", 0, 16);
        }

        SetIcon(gObj, largeIcons[(int)icon].image as Texture2D);
    }
开发者ID:rokusaki,项目名称:TileTestLab,代码行数:9,代码来源:Utility.cs

示例15: Form1_Load

 private void Form1_Load(object sender, EventArgs e)
 {
     // Load the basic set of eight icons.
         images = new Icon[5];
         images[0] = new Icon("C:\\icon1.ico");
         images[1] = new Icon("C:\\icon2.ico");
         images[2] = new Icon("C:\\icon3.ico");
         images[3] = new Icon("C:\\icon4.ico");
         images[4] = new Icon("C:\\icon5.ico");
 }
开发者ID:RainMaker777,项目名称:my-time-tracker,代码行数:10,代码来源:SampleCode.cs


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