Ejemplo n.º 1
0
 private void buttonSave_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (this.rePass.Password != Login._UserInfo.Password)
         {
             TempWindowForm tempWindowForm = new TempWindowForm();
             QQMessageBox.Show(tempWindowForm, "原始密码输入有误.", "提示", QQMessageBoxIcon.Error, QQMessageBoxButtons.OK);
             return;
         }
         else
         {
             if (newPass.Password != newRePass.Password)
             {
                 TempWindowForm tempWindowForm = new TempWindowForm();
                 QQMessageBox.Show(tempWindowForm, "2次输入密码有误请重新输入.", "提示", QQMessageBoxIcon.Error, QQMessageBoxButtons.OK);
                 return;
             }
             else
             {
                 Login._UserInfo.Password = newPass.Password;
                 Login._ClientEngine.Send(NotifyType.Request_UpdateUser, Login._UserInfo);
             }
         }
     }
     catch (Exception)
     { }
 }
Ejemplo n.º 2
0
        private void btnConvert_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                int nPoint = Convert.ToInt32(this.txtInputPointAmount);
                if (nPoint > Login._UserInfo.Point)
                {
                    TempWindowForm tempWindowForm = new TempWindowForm();
                    QQMessageBox.Show(tempWindowForm, "结算金额有误请重新输入", "提示", QQMessageBoxIcon.Error, QQMessageBoxButtons.OK);

                    this.txtInputPointAmount.Text = "0";
                    this.txtInputPointAmount.Focus();

                    return;
                }

                Login._UserInfo.Point = Login._UserInfo.Point - nPoint;
                Login._UserInfo.Cash  = Login._UserInfo.Cash + nPoint / 100000;

                Login._ClientEngine.Send(NotifyType.Request_UpdateUser, Login._UserInfo);
            }
            catch (Exception)
            { }
        }