Example #1
0
        private void RefreshPage()
        {
            if (PlayerDataBaseControl.isEnglish)
            {
                lblAccountName.Text    = "Account Name:";
                lblName.Text           = "Name:";
                btnChangeName.Text     = "Change Name";
                lblPassword.Text       = "Password";
                btnChangePassword.Text = "Change Password";
                lblEmail.Text          = "Email";
                btnChangeEmail.Text    = "Change Email";
                lblGoldCoins.Text      = "Gold Coins";

                lblProfile.Text       = "Profile:";
                btnChangeProfile.Text = "Change Profile";
                lblGameProgress.Text  = "Game Progress:";
            }
            else
            {
                lblAccountName.Text    = "用戶名:";
                lblName.Text           = "名稱:";
                btnChangeName.Text     = "更改名稱";
                lblPassword.Text       = "密碼:";
                btnChangePassword.Text = "更改密碼";
                lblEmail.Text          = "電子郵件:";
                btnChangeEmail.Text    = "更改電郵";
                lblGoldCoins.Text      = "金幣:";

                lblProfile.Text       = "個人簡介:";
                btnChangeProfile.Text = "更改個人簡介";
                lblGameProgress.Text  = "遊戲進度:";
            }

            lblPlayerIDOutput.Text    = PlayerDataBaseControl.playerID;
            lblAccountNameOutput.Text = PlayerDataBaseControl.playerAccountName;
            lblNameOutput.Text        = PlayerDataBaseControl.playerName;
            lblEmailOutput.Text       = PlayerDataBaseControl.playerEmail;
            lblProfileOutput.Text     = PlayerDataBaseControl.playerProfile;
            lblGoldCoinsOutput.Text   = PlayerDataBaseControl.playerGoldCoins.ToString();

            string star   = "";
            int    length = PlayerDataBaseControl.playerPassword.Length;

            for (int i = 0; i < length; i++)
            {
                star += "*";
            }
            lblPasswordOutput.Text = star;


            lblGameProgressOutput.Text = "";
            if (PlayerDataBaseControl.isEnglish)
            {
                lblGameProgressOutput.Text += "GSD War Zone Game Process: ";
                if (DataBaseControl.MatchingOneColumn_OfTable("GSDWarZone", "PlayerID", PlayerDataBaseControl.playerID))
                {
                    lblGameProgressOutput.Text += DataBaseControl.GetData_OfGSDWarZoneTable("PlayerID", PlayerDataBaseControl.playerID, "GameProgress");
                }

                lblGameProgressOutput.Text += "\n\nGSD F1 Race Game Process: ";
                if (DataBaseControl.MatchingOneColumn_OfTable("GSDF1Race", "PlayerID", PlayerDataBaseControl.playerID))
                {
                    lblGameProgressOutput.Text += DataBaseControl.GetData_OfGSDF1RaceTable("PlayerID", PlayerDataBaseControl.playerID, "GameProgress");
                }
            }
            else
            {
                lblGameProgressOutput.Text += "GSD War Zone 遊戲進度: ";
                if (DataBaseControl.MatchingOneColumn_OfTable("GSEWarZone", "PlayerID", PlayerDataBaseControl.playerID))
                {
                    lblGameProgressOutput.Text += DataBaseControl.GetData_OfGSDWarZoneTable("PlayerID", PlayerDataBaseControl.playerID, "GameChineseProgress");
                }

                lblGameProgressOutput.Text += "\n\nGSD F1 Race 遊戲進度: ";
                if (DataBaseControl.MatchingOneColumn_OfTable("GSDF1Race", "PlayerID", PlayerDataBaseControl.playerID))
                {
                    lblGameProgressOutput.Text += DataBaseControl.GetData_OfGSDF1RaceTable("PlayerID", PlayerDataBaseControl.playerID, "GameChineseProgress");
                }
            }
        }