Beispiel #1
0
        private void ViewStorageMessage(string storageID)
        {
            MessageWindow messageWindow = new MessageWindow();

            messageWindow.Show();
            string gameid = AccessHelper.GetGameStorageGameID(storageID);
            string userid = AccessHelper.GetGameStorageUserID(storageID);

            messageWindow.nickname.Content = AccessHelper.GetUserNickName(userid);
            messageWindow.phone.Content    = AccessHelper.GetUserPhone(userid);
            messageWindow.qq.Content       = AccessHelper.GetUserQQ(userid);
            messageWindow.email.Content    = AccessHelper.GetUserEmail(userid);
            messageWindow.address.Text     = AccessHelper.GetUserAddress(userid);
            if (AccessHelper.GetGameStorageType(storageID) == "交换")
            {
                messageWindow.storageInfo.Text = "用户 " + AccessHelper.GetUserNickName(userid) + " 想要用《" + AccessHelper.GetGameZhName(gameid) + "》交换《" + AccessHelper.GetGameStorageChangeGame(storageID) + "》";
            }
            else if (AccessHelper.GetGameStorageType(storageID) == "出售")
            {
                messageWindow.storageInfo.Text = "用户 " + AccessHelper.GetUserNickName(userid) + " 想要以" + AccessHelper.GetGameStoragePrice(storageID) + "元 出售《" + AccessHelper.GetGameZhName(gameid) + "》";
            }
            else if (AccessHelper.GetGameStorageType(storageID) == "出租")
            {
                messageWindow.storageInfo.Text = "用户 " + AccessHelper.GetUserNickName(userid) + " 想要以" + AccessHelper.GetGameStoragePrice(storageID) + "元/日 出租《" + AccessHelper.GetGameZhName(gameid) + "》";
            }

            messageWindow.Pic.Source   = AccessHelper.GetGameImage(gameid);
            messageWindow.message.Text = AccessHelper.GetGameStorageMessage(storageID);
        }
Beispiel #2
0
        private void userCenterBtn_Click(object sender, RoutedEventArgs e)
        {
            UserCenterWindow userCenterWindow = new UserCenterWindow();

            userCenterWindow.Show();
            userCenterWindow.userID = userID;

            userCenterWindow.userPasswd.Text   = AccessHelper.GetUserPasswd(userID);
            userCenterWindow.userNickName.Text = AccessHelper.GetUserNickName(userID);
            userCenterWindow.userPhone.Text    = AccessHelper.GetUserPhone(userID);
            userCenterWindow.userQQ.Text       = AccessHelper.GetUserQQ(userID);
            userCenterWindow.userEmail.Text    = AccessHelper.GetUserEmail(userID);
            userCenterWindow.userAddress.Text  = AccessHelper.GetUserAddress(userID);
        }
        private void cancelBtn_Click(object sender, RoutedEventArgs e)
        {
            updateBtn.IsEnabled  = true;
            confirmBtn.IsEnabled = false;
            cancelBtn.IsEnabled  = false;

            userPasswd.IsEnabled   = false;
            userNickName.IsEnabled = false;
            userPhone.IsEnabled    = false;
            userQQ.IsEnabled       = false;
            userEmail.IsEnabled    = false;
            userAddress.IsEnabled  = false;

            userPasswd.Text   = AccessHelper.GetUserPasswd(userID);
            userNickName.Text = AccessHelper.GetUserNickName(userID);
            userPhone.Text    = AccessHelper.GetUserPhone(userID);
            userQQ.Text       = AccessHelper.GetUserQQ(userID);
            userEmail.Text    = AccessHelper.GetUserEmail(userID);
            userAddress.Text  = AccessHelper.GetUserAddress(userID);
        }