void GUI() { main.Invoke(new MethodInvoker(delegate() { showFriends = new Friends(this, Bot.DisplayName); showFriends.Show(); showFriends.Activate(); LoadFriends(); })); }
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)); })); }
void GUI() { main.Invoke(new MethodInvoker(delegate() { showFriends = new Friends(this, Bot.displayName); showFriends.Show(); showFriends.Activate(); LoadFriends(); showFriends.friends_list.SetObjects(ListFriends.Get()); })); }
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."); }