BF2Statistics.AccountEditForm.AccountEditForm C# (CSharp) Method

AccountEditForm() public method

Constructor
public AccountEditForm ( int Pid ) : System
Pid int The player account ID
return System
        public AccountEditForm(int Pid)
        {
            InitializeComponent();
            this.AccountId = Pid;

            // Register for Events
            GpcmClient.OnSuccessfulLogin += GpcmClient_OnSuccessfulLogin;
            GpcmClient.OnDisconnect += GpcmClient_OnDisconnect;

            // Fill the account information boxes
            using (GamespyDatabase Database = new GamespyDatabase())
            {
                Dictionary<string, object> User = Database.GetUser(AccountId);
                PlayerID.Value = AccountId = Int32.Parse(User["id"].ToString());
                AccountNick.Text = User["name"].ToString();
                AccountEmail.Text = User["email"].ToString();

                // Disable options if user is online
                if (GamespyEmulator.IsPlayerConnected(AccountId))
                {
                    SatusLabel.Text = "Online (IP: " + User["lastip"].ToString() + ")";
                    UpdateBtn.Enabled = false;
                    DeleteBtn.Enabled = false;
                    DisconnectBtn.Enabled = true;
                }
                else
                {
                    SatusLabel.Text = "Offline";
                }
            }
        }