• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IconId类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AbbreviatedTextLookupItem

        public AbbreviatedTextLookupItem(string text, CodeCompletionContext context, IconId image)
            : base(text, image, true)
        {
            this.context = context;

            // When dealing with dynamic items providers, static items are simply merged into the list
            // on each keystroke. If the dynamic item provider adds dynamic items, the merging happens
            // like this:
            // 1. Get a list of existing dynamic items
            // 2. Remove any items that fail ILookupItem.Match
            // 3. Retrieve the item's BaseDynamicRule.PrefixKey value. If it exists and is longer
            //    than the current prefix, remove it
            //    (I'm not sure on the reason for this, perhaps to handle deleting chars in the prefix?)
            // 4. Loop over the new items
            //    a. If the item is ITextualLookupItem and has a BaseDynamicRule.PrefixKey value, look
            //       for the name in the (filtered) list of previous dynamic results. If it exists,
            //       don't add a new item
            //    b. Otherwise, add the item
            //
            // So, static items are always added and never removed. Dynamic items are only merged if
            // they are ITextualLookupItem and have a BaseDynamicRule.PrefixKey value. Dynamic items
            // are removed if they are ITextualLookupItem and their PrefixKey value is longer than
            // the current prefix, presumably when the prefix has chars deleted
            //
            // Which means, to allow us to remove dynamic items on each keystroke, even when adding
            // chars to the prefix, we need a dynamic item that implements ITextualLookupItem and
            // that has a really long PrefixKey value. This is a hack.
            PutData(BaseDynamicRule.PrefixKey, "really_long_string_that_shouldnt_match_so_that_the_item_is_removed");
        }
开发者ID:redoz,项目名称:resharper-angularjs,代码行数:29,代码来源:AbbreviatedTextLookupItem.cs


示例2: CompareTo

 public override int CompareTo(IconId otherRaw)
 {
     EmojiIconId imageSourceIconId = otherRaw as EmojiIconId;
     if (imageSourceIconId == null)
         return string.Compare(GetType().Name, otherRaw.GetType().Name, StringComparison.Ordinal);
     return string.Compare(Emoji.Name, imageSourceIconId.Emoji.Name, StringComparison.InvariantCultureIgnoreCase);
 }
开发者ID:Dylan-Jang,项目名称:ReSharper.ReMoji,代码行数:7,代码来源:EmojiIconId.cs


示例3: TryGetImage

        public ImageSource TryGetImage(IconId iconId, IconTheme theme, IThemedIconManagerPerThemeCache cache, OnError onerror)
        {
            var emojiIconId = iconId as EmojiIconId;

            var image = emojiIconId?.Emoji.Bitmap();
            return image;
        }
开发者ID:Dylan-Jang,项目名称:ReSharper.ReMoji,代码行数:7,代码来源:EmojiIconOwner.cs


示例4: AddMessage

		public void AddMessage (string msg, IconId icon)
		{
			if (lastImage != null) {
				HSeparator sep = new HSeparator ();
				sep.Show ();
				msgBox.PackStart (sep, false, false, 0);
				lastImage.IconSize = Gtk.IconSize.Menu;
			}
			
			HBox box = new HBox ();
			box.Spacing = 12;
			Alignment imgBox = new Alignment (0, 0, 0, 0);
			var img = new ImageView (icon, lastImage != null ? Gtk.IconSize.Menu : IconSize.Dialog);
			imgBox.Add (img);
			lastImage = img;
			box.PackStart (imgBox, false, false, 0);
			Label lab = new Label (msg);
			lab.UseUnderline = false;
			lab.Xalign = 0;
			lab.Yalign = 0;
			lab.Wrap = true;
			lab.WidthRequest = 500;
			box.PackStart (lab, true, true, 0);
			msgBox.PackStart (box, false, false, 0);
			box.ShowAll ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:26,代码来源:MultiMessageDialog.cs


示例5: CompletionData

		public CompletionData (string displayText, IconId icon, string description, string completionText)
		{
			this.DisplayText = displayText;
			this.Icon = icon;
			this.Description = description;
			this.CompletionText = completionText;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:7,代码来源:CompletionData.cs


示例6: ZenSharpLookupItem

 public ZenSharpLookupItem(Template template, GenerateTree tree, IEnumerable<string> scopes, IconId iconId)
     : base(null, template, true)
 {
     _tree = tree;
     _scopes = scopes;
     _template = template;
     // fixme: what is it?
     Log.Info("Creating ZenSharpLookupItem with template = {0}", template);
     _iconId = iconId;
     _displayName = _template.Text;
 }
开发者ID:johnmbaughman,项目名称:ZenSharp,代码行数:11,代码来源:ZenSharpLookupItem.cs


示例7: BackgroundProgressMonitor

		public BackgroundProgressMonitor (string title, IconId iconName)
		{
			this.title = title;
			if (!iconName.IsNull) {
				Application.Invoke (delegate {
					Gdk.Pixbuf img = ImageService.GetPixbuf (iconName, IconSize.Menu);
					icon = IdeApp.Workbench.StatusBar.ShowStatusIcon (img);
					if (icon == null)
						LoggingService.LogError ("Icon '" + iconName + "' not found.");
				});
			}
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:12,代码来源:BackgroundProgressMonitor.cs


示例8: ShowMessage

		public void ShowMessage (IconId image, string message)
		{
			ShowMessage (image, message, false, MessageType.Information);
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:4,代码来源:StatusBar.cs


示例9: GetOutputProgressMonitor

		public IProgressMonitor GetOutputProgressMonitor (string id, string title, IconId icon, bool bringToFront, bool allowMonitorReuse)
		{
			Pad pad = CreateMonitorPad (id, title, icon, bringToFront, allowMonitorReuse, true);
			pad.Visible = true;
			return ((DefaultMonitorPad) pad.Content).BeginProgress (title);
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:6,代码来源:ProgressMonitors.cs


示例10: ShowMessage

		public void ShowMessage (IconId iconId, string message, bool isMarkup)
		{
			Message = message;
			StatusText.ToolTip = message;

			if (iconId.IsNull)
				iconId = BrandingService.StatusSteadyIconId;

			// don't reload same icon
			if (currentIcon == iconId)
				return;

			currentIcon = iconId;

			if (xwtAnimation != null) {
				xwtAnimation.Dispose ();
				xwtAnimation = null;
			}

			if (ImageService.IsAnimation (currentIcon, Gtk.IconSize.Menu)) {
				animatedIcon = ImageService.GetAnimatedIcon (currentIcon, Gtk.IconSize.Menu);
				StatusImage = animatedIcon.FirstFrame;
				xwtAnimation = animatedIcon.StartAnimation (p => {
					StatusImage = p;
				});
			} else
				StatusImage = currentIcon.GetStockIcon ().WithSize (Xwt.IconSize.Small);
		}
开发者ID:vvarshne,项目名称:monodevelop,代码行数:28,代码来源:StatusBar.xaml.cs


示例11: LoadPixbuf

		void LoadPixbuf (IconId iconId)
		{
			// We dont need to load the same image twice
			if (icon == iconId && iconLoaded)
				return;

			icon = iconId;
			iconAnimation = null;

			// clean up previous running animation
			if (xwtAnimation != null) {
				xwtAnimation.Dispose ();
				xwtAnimation = null;
			}

			// if we have nothing, use the default icon
			if (iconId == IconId.Null)
				iconId = Stock.StatusSteady;

			// load image now
			if (ImageService.IsAnimation (iconId, Gtk.IconSize.Menu)) {
				iconAnimation = ImageService.GetAnimatedIcon (iconId, Gtk.IconSize.Menu);
				image = iconAnimation.FirstFrame.ToNSImage ();
				xwtAnimation = iconAnimation.StartAnimation (p => {
					image = p.ToNSImage ();
					ReconstructString ();
				});
			} else {
				image = ImageService.GetIcon (iconId).ToNSImage ();
			}

			iconLoaded = true;
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:33,代码来源:StatusBar.cs


示例12: ShowMessage

		public void ShowMessage (IconId image, string message, bool isMarkup, NSColor color)
		{
			DispatchService.AssertGuiThread ();

			LoadText (message, isMarkup, color);
			LoadPixbuf (image);
			ReconstructString ();
		}
开发者ID:RussellHaley,项目名称:monodevelop,代码行数:8,代码来源:StatusBar.cs


示例13: LinkCommandEntry

		public LinkCommandEntry (string text, string url, IconId icon): base (Id)
		{
			this.text = text;
			this.url = url;
			this.icon = icon;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:6,代码来源:LinkCommandEntry.cs


示例14: GetStatusProgressMonitor

		/******************************/
		
		
		public IProgressMonitor GetStatusProgressMonitor (string title, IconId icon, bool showErrorDialogs)
		{
			return new StatusProgressMonitor (title, icon, showErrorDialogs, true, false, null);
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:7,代码来源:ProgressMonitors.cs


示例15: BeginProgress

		public void BeginProgress (IconId image, string name)
		{
			EndProgress ();
			ShowMessage (image, name);

			if (AutoPulse)
				progressView.StartProgressAutoPulse ();
			else
				progressView.BeginProgress ();
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:10,代码来源:StatusBar.cs


示例16: GetBackgroundProgressMonitor

		public IProgressMonitor GetBackgroundProgressMonitor (string title, IconId icon)
		{
			return new BackgroundProgressMonitor (title, icon);
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:4,代码来源:ProgressMonitors.cs


示例17: BeginProgress

		public void BeginProgress (IconId image, string name)
		{
			EndProgress ();
			ShowMessage (image, name);
			oldFraction = 0;

			if (AutoPulse)
				StartProgressAutoPulse ();
		}
开发者ID:RussellHaley,项目名称:monodevelop,代码行数:9,代码来源:StatusBar.cs


示例18: CommandInfo

		internal CommandInfo (Command cmd)
		{
			text = cmd.Text;
			icon = cmd.Icon;
			accelKey = cmd.AccelKey;
			description = cmd.Description;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:7,代码来源:CommandInfo.cs


示例19: Update

		void Update (CommandInfo cmdInfo)
		{
			updating = true;
			Label = cmdInfo.Text;
			if (cmdInfo.Icon != stockId) {
				stockId = cmdInfo.Icon;
				this.IconWidget = new Gtk.Image (cmdInfo.Icon, Gtk.IconSize.Menu);
			}
			Sensitive = cmdInfo.Enabled;
			Visible = cmdInfo.Visible;
			Active = cmdInfo.Checked;
			updating = false;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:13,代码来源:CommandToggleToolButton.cs


示例20: Update

		void Update (CommandInfo cmdInfo)
		{
			if (lastDesc != cmdInfo.Description) {
				string toolTip;
				if (string.IsNullOrEmpty (cmdInfo.AccelKey)) {
					toolTip = cmdInfo.Description;
				} else {
					toolTip = cmdInfo.Description + " (" + KeyBindingManager.BindingToDisplayLabel (cmdInfo.AccelKey, false) + ")";
				}
				TooltipText = toolTip;
				lastDesc = cmdInfo.Description;
			}
			
			if (Label != cmdInfo.Text)
				Label = cmdInfo.Text;
			if (cmdInfo.Icon != stockId) {
				stockId = cmdInfo.Icon;
				this.IconWidget = new Gtk.Image (cmdInfo.Icon, Gtk.IconSize.Menu);
			}
			if (cmdInfo.Enabled != Sensitive)
				Sensitive = cmdInfo.Enabled;
			if (cmdInfo.Visible != Visible)
				Visible = cmdInfo.Visible;
			if (cmdInfo.Icon.IsNull)
				IsImportant = true;
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:26,代码来源:CommandToolButton.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IconSize类代码示例发布时间:2022-05-24
下一篇:
C# Icon类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap