예제 #1
0
 public NowPlaying()
 {
     LyricsDisplay = new DisplayProxy(this);
     Build();
     Title.ModifyFont(new FontDescription()
     {
         AbsoluteSize = 16 * Pango.Scale.PangoScale
     });
     new Thread(() =>
     {
         var myClient = new MpdClient();
         while (true)
         {
             try
             {
                 myClient.Idle(1000);
             }
             catch (Exception e)
             {
                 Logger.Warn("Exception in IDLE loop", e);
             }
             UpdateStatus();
         }
     })
     { IsBackground = true }.Start();
     Art.SizeAllocated += Art_SizeAllocated;
     SizeAllocated += NowPlaying_SizeAllocated;
 }
예제 #2
0
 public static MpdClient GetSharedClient()
 {
     return _sharedClientInstance ?? (_sharedClientInstance = new MpdClient());
 }