本文整理汇总了C#中IconType类的典型用法代码示例。如果您正苦于以下问题:C# IconType类的具体用法?C# IconType怎么用?C# IconType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IconType类属于命名空间,在下文中一共展示了IconType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UserOption
public UserOption(IconType toolbarIconType, IconType menuIconType, string currentStyle, MouseOverAction mouseOverMenuScomparsa)
{
ToolbarIconType = toolbarIconType;
MenuIconType = menuIconType;
CurrentStyle = currentStyle;
MouseOverMenuScomparsa = mouseOverMenuScomparsa;
}
示例2: SendNotification
public virtual bool SendNotification(string caption, string message, IconType iconType, string iconFile, string address)
{
byte[] icon = new byte[0];
if (iconType != IconType.None)
{
icon = ResourceManager.GetRawLogo(iconFile);
}
byte[] payload = new byte[caption.Length + message.Length + 7 + icon.Length];
int offset = 0;
for (int i = 0; i < caption.Length; i++)
payload[offset++] = (byte)caption[i];
payload[offset++] = (byte)'\0';
for (int i = 0; i < message.Length; i++)
payload[offset++] = (byte)message[i];
payload[offset++] = (byte)'\0';
payload[offset++] = (byte)iconType;
for (int i = 0; i < 4; i++)
payload[offset++] = (byte)0;
Array.Copy(icon, 0, payload, caption.Length + message.Length + 7, icon.Length);
return _udpProvider.Send(address, UdpProvider.PacketType.Notification, payload);
}
示例3: Initialize
public void Initialize(IconType iconType, int itemCost, string resourceLocation, bool isLocked, int itemID, GameObject rootObject)
{
_previewTexture.mainTexture = Resources.Load (resourceLocation) as Texture;
// if (iconType != IconType.LOCKED)
_itemCost.text = itemCost.ToString ();
// else
// _itemCost.text = "LV" + itemCost;
_rootObject = rootObject;
if (iconType == IconType.GOLD) {
_itemCurrencyIcon.spriteName = "icon02";
} else if (iconType == IconType.PREMIUM) {
_itemCurrencyIcon.spriteName = "icon03";
}
// else if (iconType == IconType.LOCKED) {
// _itemCurrencyIcon.spriteName = "UI_cos_lock";
// collider.enabled = false;
// }
if (isLocked) {
_lockIcon.gameObject.SetActive (true);
collider.enabled = false;
} else {
_lockIcon.gameObject.SetActive (false);
}
_itemID = itemID;
}
示例4: BlockData
public BlockData(int NewBlockType) {
DropIndex = NewBlockType;
DropQuantity = 1;
DropType = IconType.Item;
Name = "Block" + NewBlockType;
TextureId = NewBlockType;
}
示例5: IconButton
/// <summary>
/// Initializes a new instance of the <see cref="IconButton" /> class.
/// </summary>
/// <param name="type">The icon type.</param>
/// <param name="size">The size of the icon (number of pixels - 24 creates an icon 24x24px).</param>
/// <param name="normalColor">Color to use when not hovered over.</param>
/// <param name="hoverColor">Color to use when hovered over.</param>
/// <param name="selectable">NOT YET IMPLEMENTED. If set to <c>true</c> the icon will be selectable using the keyboard (tab-key).</param>
/// <param name="toolTip">The tool tip text to use. Leave as null to not use a tooltip.</param>
public IconButton(IconType type, int size, Color normalColor, Color hoverColor, bool selectable, string toolTip)
{
IconFont = null;
BackColor = Color.Transparent;
// need more than this to make picturebox selectable
if (selectable)
{
SetStyle(ControlStyles.Selectable, true);
TabStop = true;
}
Width = size;
Height = size;
IconType = type;
InActiveColor = normalColor;
ActiveColor = hoverColor;
ToolTipText = toolTip;
MouseEnter += Icon_MouseEnter;
MouseLeave += Icon_MouseLeave;
}
示例6: UxNavLink
public static MvcHtmlString UxNavLink(this HtmlHelper helper, string text, string url, IconType iconType = null, IconPosition iconPosition = null, bool active = false, bool disabled = false, bool iconPullRight = false, DataToggle dataToggle = DataToggle.None, string badgeText = null, bool badgePullRight = false, string clientId = null)
{
var navLink = new NavLink(text, url, iconType, iconPosition, active, disabled, iconPullRight, dataToggle, clientId);
if (badgeText != null)
navLink.SetBadge(new Badge(badgeText, badgePullRight));
return helper.RenderUxControl(navLink);
}
示例7: IconGenerator
public IconGenerator(IconType type, int width, int height, Color borderColor, float borderWidth)
{
Type = type;
Padding = 5;
Width = Math.Max(width, 1);
Height = Math.Max(height, 1);
BorderColor = borderColor;
BorderWidth = borderWidth;
}
示例8: GetStandardIcon
/// <summary>
/// Gets a standard icon</summary>
/// <param name="type">Standard icon type</param>
/// <returns>Standard icon</returns>
public static Icon GetStandardIcon(IconType type)
{
IntPtr handle = User32.LoadIcon((IntPtr) null, (IntPtr) type);
// Copy (clone) the returned icon to a new object, thus allowing us to clean-up properly
Icon icon = (Icon)Icon.FromHandle(handle).Clone();
User32.DestroyIcon(handle); // Cleanup
return icon;
}
示例9: EntityMarker
public EntityMarker(BankEntity entity, IconType iconType)
{
this.Entity = entity;
this.MarkerOptions = new MarkerOptions ();
this.MarkerOptions.SetTitle (entity.Description());
this.MarkerOptions.SetPosition (new LatLng(entity.Latitude, entity.Longitude));
this.Type = MarkerType.Regular;
IconType = iconType;
}
示例10: FormInfo
public FormInfo(string message, int retardoMS, IconType iconType)
{
if (retardoMS == 0)
retardoMS = 1;
this.retardoMS = retardoMS;
this.iconType = iconType;
this.message = message;
InitializeComponent();
}
示例11: Icon
public Icon(Point p,int i,IconType t,int prio=1)
{
position = new VertexMarker();
position.Colour = Brushes.Green;
position.setPosition(p);
propertypanel = new IconProperty(this);
type = t;
Name = string.Format("Start Position {0}", i);
setSelected(false);
priority = prio;
}
示例12: GetIcon
public static Icon GetIcon(IconType theIcon)
{
Icon micon = null;
switch (theIcon)
{
case IconType.Yes:
micon = GUIResource.Properties.Resources.ok;
break;
case IconType.No:
micon = GUIResource.Properties.Resources.DELETE;
break;
}
return micon;
}
示例13: Show
public static ExpressionDialog.StatusTypes Show(string Content, Window Parent, IconType icon = IconType.Warning, ExpressionDialog.DialogTypes type = ExpressionDialog.DialogTypes.Ok, params string[] ButtonNames)
{
//Create the dialog
ExpressionDialog dialog = new ExpressionDialog(type, Parent, ButtonNames);
//Fill the dialog
Grid ContentGrid = new Grid();
ContentGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(0, GridUnitType.Auto) });
ContentGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) });
string ColorS = "_";
if (Application.Current.MainWindow is ExpressionWindow)
ColorS += Enum.GetName(typeof(ExpressionWindow.ThemeColors), ((ExpressionWindow)Application.Current.MainWindow).ThemeColor);
BitmapImage IconBmp = null;
switch (icon)
{
case IconType.Warning:
IconBmp = new BitmapImage(new Uri("pack://application:,,,/ExpressionWindow;component/icons/warning" + ColorS + ".png"));
break;
case IconType.Question:
IconBmp = new BitmapImage(new Uri("pack://application:,,,/ExpressionWindow;component/Icons/Question" + ColorS + ".png"));
break;
}
Image Icon = new Image()
{
Source = IconBmp,
Stretch = System.Windows.Media.Stretch.None,
Margin = new Thickness(10)
};
Grid.SetColumn(Icon, 0);
ContentGrid.Children.Add(Icon);
Label lb = new Label()
{
Margin = new Thickness(10),
VerticalAlignment = System.Windows.VerticalAlignment.Center,
Content = Content
};
Grid.SetColumn(lb, 1);
ContentGrid.Children.Add(lb);
dialog.Content = ContentGrid;
//Show the dialog
dialog.ShowDialog();
return dialog.Status;
}
示例14: GetIcon
public static Icon GetIcon(IconType theIcon)
{
Icon micon = null;
switch (theIcon)
{
case IconType.Yes:
micon = meijing.ui.Properties.Resources.ok;
break;
case IconType.No:
micon = meijing.ui.Properties.Resources.DELETE;
break;
case IconType.UserGuide:
micon = meijing.ui.Properties.Resources.books;
break;
}
return micon;
}
示例15: UxButton
public static MvcHtmlString UxButton(this HtmlHelper helper,
string text,
ButtonAppearanceType appearance = null,
ButtonSize size = null,
IconType iconType = null,
IconPosition position = null,
bool causesValidation = true,
bool disabled = false,
string loadingText = null,
string clientId = null)
{
var button = new Button(text, ButtonCommand.None, appearance)
.SetSize(size)
.SetValidation(causesValidation)
.SetDisabled(disabled)
.SetLoadingText(loadingText);
button.SetClientId(clientId);
if (iconType!=null)
button.SetIcon(new Icon(iconType), position);
return UxButton(helper, button);
}