本文整理汇总了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;
}
示例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);
}
示例3: Input
internal Input(BootstrapHelper helper, FormInputType inputType)
: base(helper, "input", Css.FormControl)
{
OutputEndTag = false;
Icon = Icon.None;
MergeAttribute("type", inputType.GetDescription());
}
示例4: CommandButton
public CommandButton(Icon icon, string text, ICommand command)
: this()
{
image.SetIcon(icon);
label.Content = text;
button.Command = command;
}
示例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);
}
示例6: CommandButton
public CommandButton(Icon desiredIcon, string text, ICommand command)
: this()
{
icon.SetIcon(desiredIcon);
label.Content = text;
button.Command = command;
}
示例7: IconStyle
public IconStyle(float scale, float heading, Icon icon, vec2 hotSpot)
{
this.scale = scale;
this.heading = heading;
this.icon = icon;
this.hotSpot = hotSpot;
}
示例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;
}
示例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);
}
示例10: Form1
public Form1()
{
InitializeComponent();
sprites = new Sprites();
icon = new Icon();
mainBackground = new MainBackground();
combatBackground = new CombatBackground();
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例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);
}
示例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");
}