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


C# IconId类代码示例

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


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


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