public override void UpdatePersonaState() { if (Friends.chat_opened) { Bot.main.Invoke((Action)(() => { foreach (TabPage tab in Friends.chat.ChatTabControl.TabPages) { if ((SteamID)tab.Tag == OtherSID) { foreach (var item in tab.Controls) { Friends.chat.chatTab = (ChatTab)item; } tab.Invoke((Action)(() => { var friend = ListFriends.GetFriend(OtherSID); if (Friends.chat.ChatTabControl.SelectedTab == tab) { Friends.chat.Text = friend.Name + " - Chat"; Friends.chat.Refresh(); } tab.Text = friend.Name; Friends.chat.chatTab.Name = friend.Name; Friends.chat.chatTab.steam_name.Text = friend.Name; Friends.chat.chatTab.steam_status.Text = friend.Status; })); return; } } })); } }