Example #1
0
 void SetRecognizeIcon(Gtk.Image img, float confidence)
 {
     if (confidence == 2)            //Исправлено пользователем.
     {
         img.Pixbuf      = img.RenderIcon(Stock.Apply, IconSize.Button, "");
         img.TooltipText = String.Format("Исправлено.");
     }
     else if (confidence > 0.8)
     {
         img.Pixbuf      = img.RenderIcon(Stock.Yes, IconSize.Button, "");
         img.TooltipText = String.Format("ОК. Доверие: {0}", confidence);
     }
     else if (confidence == -1)            //Распознования не проводилось
     {
         img.Pixbuf      = img.RenderIcon(Stock.DialogQuestion, IconSize.Button, "");
         img.TooltipText = String.Format("Распознование не проводилось.");
     }
     else if (confidence == -2)            //Результат не прошел проверку.
     {
         img.Pixbuf      = img.RenderIcon(Stock.No, IconSize.Button, "");
         img.TooltipText = String.Format("Результат не прошёл проверку.");
     }
     else
     {
         img.Pixbuf      = img.RenderIcon(Stock.DialogWarning, IconSize.Button, "");
         img.TooltipText = String.Format("Не точно. Доверие: {0}", confidence);
     }
 }
Example #2
0
 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();
 }
Example #3
0
        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, "");
                Pixbuf    emptyIcon       = new Pixbuf("images/pixel.gif");

                TreeIter tiNowPLaying   = new TreeIter();
                TreeIter tiPlaylistItem = new TreeIter();

                tsPlaylist.GetIterFirst(out tiPlaylistItem);

                while (tsPlaylist.IterNext(ref tiPlaylistItem))
                {
                    _parent._tvPlaylist.Model.SetValue(tiPlaylistItem, 0, emptyIcon);
                }

                if (tsPlaylist.GetIter(out tiNowPLaying, new TreePath(itemPlaying)) && !_parent.oXbmc.Status.IsNotPlaying())
                {
                    _parent._tvPlaylist.Model.SetValue(tiNowPLaying, 0, nowPlayingIcon);
                }
            }
        }
Example #4
0
        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);
            }
        }
Example #5
0
 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 ();
 }
Example #6
0
 public void Message(string message, string stockId)
 {
     label.LabelProp = label.TooltipText = message;
     image.Pixbuf    = image.RenderIcon(stockId, IconSize.Menu, string.Empty);
 }