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


C# IconType类代码示例

本文整理汇总了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;
 }
开发者ID:gipasoft,项目名称:Sfera,代码行数:7,代码来源:IOpzioni.cs

示例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);
        }
开发者ID:realpatriot,项目名称:NzbDrone,代码行数:29,代码来源:EventClientProvider.cs

示例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;
    }
开发者ID:kreeds,项目名称:TestProjectDemo,代码行数:30,代码来源:WardrobeItem.cs

示例4: BlockData

	public BlockData(int NewBlockType) {
		DropIndex = NewBlockType;
		DropQuantity = 1;
		DropType = IconType.Item;
		Name = "Block" + NewBlockType; 
		TextureId = NewBlockType;
	}
开发者ID:Deus0,项目名称:Zeltex,代码行数:7,代码来源:BlockData.cs

示例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;
        }
开发者ID:pmcanseco,项目名称:ares,代码行数:34,代码来源:IconButton.cs

示例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);
    }
开发者ID:renhammington,项目名称:UxFoundation,代码行数:8,代码来源:UxNavLink.cs

示例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;
 }
开发者ID:bruno105,项目名称:OKTRAIO,代码行数:9,代码来源:IconGenerator.cs

示例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;
        }
开发者ID:BeRo1985,项目名称:LevelEditor,代码行数:13,代码来源:StandardIconUtil.cs

示例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;
 }
开发者ID:priyaaank,项目名称:XamarinMapsPoc,代码行数:9,代码来源:EntityMarker.cs

示例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();
        }
开发者ID:CaineQT,项目名称:hookme,代码行数:10,代码来源:FormInfo.cs

示例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;
 }
开发者ID:Scrivener07,项目名称:moddingSuite,代码行数:11,代码来源:Icon.cs

示例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;
        }
开发者ID:kklik,项目名称:MagicMongoDBTool,代码行数:15,代码来源:GetResource_Icon.cs

示例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;
        }
开发者ID:kazelone,项目名称:ExpressionWindow,代码行数:48,代码来源:ExpressionMessageBox.cs

示例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;
        }
开发者ID:Redi0,项目名称:meijing-ui,代码行数:18,代码来源:GetResource_Icon.cs

示例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);
    }
开发者ID:renhammington,项目名称:UxFoundation,代码行数:24,代码来源:UxButton.cs


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