Пример #1
0
 void GUI()
 {
     main.Invoke(new MethodInvoker(delegate()
     {
         showFriends = new Friends(this, Bot.DisplayName);
         showFriends.Show();
         showFriends.Activate();
         LoadFriends();
     }));
 }
Пример #2
0
Файл: Bot.cs Проект: narugo/Mist
 void GUI()
 {
     main.Invoke(new MethodInvoker(delegate()
     {
         showFriends = new Friends(this, Bot.displayName);
         showFriends.Show();
         showFriends.Activate();
         LoadFriends();
         showFriends.friends_list.SetObjects(ListFriends.Get(MistClient.Properties.Settings.Default.OnlineOnly));
     }));
 }
Пример #3
0
Файл: Bot.cs Проект: Jamyn/Mist
 void GUI()
 {
     main.Invoke(new MethodInvoker(delegate()
     {
         showFriends = new Friends(this, Bot.displayName);
         showFriends.Show();
         showFriends.Activate();
         LoadFriends();
         showFriends.friends_list.SetObjects(ListFriends.Get());
     }));
 }
Пример #4
0
        void OnTimerElapsed(object sender, ElapsedEventArgs e)
        {
            byte[] avatarHash = bot.SteamFriends.GetFriendAvatar(bot.SteamUser.SteamID);
            bool validHash = avatarHash != null && !IsZeros(avatarHash);

            if ((AvatarHash == null && !validHash && avatarBox.Image != null) || (AvatarHash != null && AvatarHash.SequenceEqual(avatarHash)))
            {
                // avatar is already up to date, no operations necessary
            }
            else if (validHash)
            {
                AvatarHash = avatarHash;
                CDNCache.DownloadAvatar(bot.SteamUser.SteamID, avatarHash, AvatarDownloaded);
            }
            else
            {
                AvatarHash = null;
                avatarBox.Image = ComposeAvatar(null);
            }
            bot.LoadFriends();
            if (Application.OpenForms.Count < 1)
            {
                Friends friends = new Friends(bot, steam_name.Text);
                friends.Show();
                friends.Activate();
            }
            friends_list.SetObjects(ListFriends.Get(showOnlineFriendsOnlyToolStripMenuItem.Checked));
            Console.WriteLine("Friends list refreshed.");
        }