// Token: 0x06000056 RID: 86 RVA: 0x0000644C File Offset: 0x0000464C
 private void InfoTabUpdate(SteamData.Lobby Lobby, int CheckResult)
 {
     if (CheckResult != 2 || !InternalConfig.Restricted)
     {
         this.LabelIdValue.Text = Lobby.id.ToString();
     }
     else
     {
         this.LabelIdValue.Text = "Private";
     }
     this.LabelTypeValue.Text        = SteamData.lobbyTypes[(int)Lobby.typeId];
     this.LabelCreatorValue.Text     = Lobby.creator;
     this.LabelPlayerCountValue.Text = Lobby.playerCount.ToString();
     if (Lobby.state != 4)
     {
         this.LabelActivityValue.Text = SteamData.GetActivity(Lobby);
         this.LabelEventValue.Text    = PlayerTable.GetEvent(Lobby.typeId, Lobby.matchModeId, false);
         string[] array = PlayerTable.GetTrack(Lobby.typeId, Lobby.matchModeId, false).Split(" ".ToCharArray(), 2);
         this.LabelTrack.Text           = array[0];
         this.LabelTrackValue.Text      = array[1];
         this.LabelDifficultyValue.Text = PlayerTable.GetDifficulty(Lobby.difficultyId, false);
         return;
     }
     this.LabelActivityValue.Text   = "Unknown";
     this.LabelEventValue.Text      = "Unknown";
     this.LabelTrackValue.Text      = "Unknown";
     this.LabelDifficultyValue.Text = "Unknown";
 }
예제 #2
0
        // Token: 0x06000002 RID: 2 RVA: 0x000020A8 File Offset: 0x000002A8
        public void UpdateStatic()
        {
            DebugTools.Write("All lobbies: Updating user interface static elements... ");
            int num  = 0;
            int num2 = -1;

            if (this.ListView.FocusedItem != null)
            {
                num2 = this.ListView.FocusedItem.Index;
            }
            this.ListView.Items.Clear();
            if (SteamData.lobbyCount > 0)
            {
                foreach (SteamData.Lobby lobby in SteamData.LobbyList)
                {
                    string[] array = new string[4];
                    array[0] = lobby.creator;
                    array[1] = SteamData.lobbyTypes[(int)lobby.typeId];
                    int  num3        = 2;
                    byte playerCount = lobby.playerCount;
                    array[num3] = playerCount.ToString();
                    array[3]    = SteamData.GetActivity(lobby);
                    ListViewItem listViewItem = new ListViewItem(array);
                    if (lobby.SLTProtected)
                    {
                        listViewItem.ForeColor = Color.Green;
                    }
                    this.ListView.Items.Add(listViewItem);
                    num += (int)lobby.playerCount;
                }
                if (num2 >= 0 && num2 < this.ListView.Items.Count)
                {
                    MainForm.ListViewFocus(this.ListView.Items, num2, true);
                }
            }
            this.ButtonJoinLobby.Enabled   = (SteamData.lobbyCount > 0);
            this.ButtonViewPlayers.Enabled = (SteamData.lobbyCount > 0);
            this.ButtonLink.Enabled        = (SteamData.lobbyCount > 0);
            this.LabelLobbyCount.Text      = string.Format("Lobby Total: {0}", (SteamData.errorCode == 0) ? SteamData.lobbyCount.ToString() : "");
            this.LabelPlayerCount.Text     = string.Format("Player Total: {0}", (SteamData.errorCode == 0) ? num.ToString() : "");
            Debug.Print("done.");
        }