private void btnLevelup_Click(object sender, RoutedEventArgs e) { var response = AdminHelper.Levelup(ApiTestCore.CurManager.Idx); if (response.Code == (int)MessageCode.Success) { ApiTestCore.UpdateManagerData(response.Data); ShowMessage("升级成功"); } else { ShowMessage(EmulatorHelper.BuildErrorinfo("升级", response.Code)); } }
public void BindManagerInfo(NBManagerInfoData managerData) { ApiTestCore.CurManager = managerData.Manager; ApiTestCore.CurManagerExtra = managerData.ManagerExtra; ApiTestCore.CurPoint = managerData.Point; ApiTestCore.ServerTime = managerData.ServerTime; lblManagerName.Content = ApiTestCore.CurManager.Name; logoUserControl1.SetLogo(ApiTestCore.CurManager.Logo); UpdateLevel(); UpdateExp(); UpdateCoin(); lblManagerVip.Content = "Vip" + ApiTestCore.CurManager.VipLevel; UpdatePoint(); lblManagerStamina.Content = "体力:" + string.Format("{0}/{1}", ApiTestCore.CurManagerExtra.Stamina, ApiTestCore.CurManagerExtra.StaminaMax); lblManagerStaminaResume.Content = "恢复:" + ShareUtil.GetTime(managerData.ManagerExtra.ResumeStaminaTimeTick) .ToString("MM-dd HH:mm:ss.fff"); _serverTime = ShareUtil.GetTime(ApiTestCore.ServerTime); _countdownTimer.Start(); _heartTimer.Start(); ApiTestCore.UpdateTask(); }