本文整理汇总了C#中Gtk.Image.RenderIcon方法的典型用法代码示例。如果您正苦于以下问题:C# Image.RenderIcon方法的具体用法?C# Image.RenderIcon怎么用?C# Image.RenderIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Image
的用法示例。
在下文中一共展示了Image.RenderIcon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MarkNowPlayingEntry
public void MarkNowPlayingEntry()
{
int itemCount = _parent.oXbmc.Playlist.GetLength();
string itemPlaying = _parent.oXbmc.NowPlaying.Get("songno", true);
if (itemCount > 0 && Convert.ToInt32(itemPlaying) < itemCount)
{
Gtk.Image nowPlayingImage = new Gtk.Image();
Pixbuf nowPlayingIcon = nowPlayingImage.RenderIcon(Stock.MediaPlay, IconSize.Menu, "");
TreeIter tiPlaylistItem = new TreeIter();
tsPlaylist.GetIterFirst(out tiPlaylistItem);
while (tsPlaylist.IterNext(ref tiPlaylistItem))
_parent._tvPlaylist.Model.SetValue(tiPlaylistItem, 0, new Pixbuf("Interface/Images/pixel.gif"));
if (tsPlaylist.GetIter(out tiNowPlaying, new TreePath(itemPlaying)) && !_parent.oXbmc.Status.IsNotPlaying())
_parent._tvPlaylist.Model.SetValue(tiNowPlaying, 0, nowPlayingIcon);
}
}
示例2: InitIcons
void InitIcons()
{
// could use this.RenderIcon(...) but those icons can be less appealing (grey check mark, red cross)
Gtk.Image image = new Gtk.Image ();
pixbufs[0] = image.RenderIcon (Gtk.Stock.No, IconSize.SmallToolbar, null);
pixbufs[1] = image.RenderIcon (Gtk.Stock.Yes, IconSize.SmallToolbar, null);
image.Destroy ();
}