Exemplo n.º 1
0
        public async void SetBadgesData(BadgesResponseJSON badges)
        {
            Assembly assembly  = this.GetType().GetTypeInfo().Assembly;
            int      ampersand = GlobalStatusSingleton.username.IndexOf("@");

            usernameLabel.Text     = GlobalStatusSingleton.username.Substring(0, ampersand);
            lightbulbCount.Text    = badges.totalBulbs.ToString();
            mostBulbsInOneDay.Text = MOST_BULBS + badges.maxDailyBulbs.ToString();

            if (badges.pid != -1)
            {
                profilePicBitmap = await GlobalSingletonHelpers.loadBitmapAsync(assembly, badges.pid);

                profilePic.Bitmap = profilePicBitmap;
            }
        }