Beispiel #1
0
 public static DisplayInfo Get(SocialItem i)
 {
     switch (i.Service)
     {
         case "twitter":
             return new DisplayInfo(_twitterLogo, Color.LightBlue);
         case "twitter-sonos":
             return new DisplayInfo(_twitterLogo, Color.DarkBlue);
         case "lastfm":
             return new DisplayInfo(_lastfmLogo, Color.Red);
         default:
             return new DisplayInfo(null, Color.Black);
     }
 }
Beispiel #2
0
        static void OnResolutionSuccess(object panel, SocialItem i)
        {
            SocialPanel p = panel as SocialPanel;
            if (p == null)
                return;

            if (p.InvokeRequired)
            {
                // We're not in the UI thread, so we need to call BeginInvoke
                p.BeginInvoke(new ResolveWorker.OnResolveCompleted(OnResolutionSuccess), new object[] { panel, i });
                return;
            }

            // TODO: Update item corresponding to i with status
        }
Beispiel #3
0
 public void Start(object sender, SocialItem i, OnResolveCompleted on_complete)
 {
     _OnComplete = on_complete;
     _Caller = sender;
     _Worker.RunWorkerAsync(i);
 }