Format Currency Counters

This commit is contained in:
Alan Moon 2025-06-30 12:25:34 -07:00
parent 43c0b8fd24
commit a008c7c942
2 changed files with 6 additions and 6 deletions

View File

@ -300,7 +300,7 @@ namespace qtc_net_client_2
var result = await _apiService.AddCurrencyToCurrentUser(tokenJackpotSpinner.TokensWon, true); var result = await _apiService.AddCurrencyToCurrentUser(tokenJackpotSpinner.TokensWon, true);
if (result.Success) if (result.Success)
{ {
lblCurrencyAmount.Text = (_apiService.CurrentUser.CurrencyAmount + tokenJackpotSpinner.TokensWon).ToString(); lblCurrencyAmount.Text = (_apiService.CurrentUser.CurrencyAmount + tokenJackpotSpinner.TokensWon).ToString("N");
llblClaimSpin.Visible = false; llblClaimSpin.Visible = false;
} }
else MessageBox.Show("We Were Unable To Claim Your Prize At This Time. Please Try Again Later.", "Uh Oh.", MessageBoxButtons.OK, MessageBoxIcon.Error); else MessageBox.Show("We Were Unable To Claim Your Prize At This Time. Please Try Again Later.", "Uh Oh.", MessageBoxButtons.OK, MessageBoxIcon.Error);
@ -391,7 +391,7 @@ namespace qtc_net_client_2
lblWelcome.Text = $"Welcome, {_apiService.CurrentUser.Username}"; lblWelcome.Text = $"Welcome, {_apiService.CurrentUser.Username}";
lblCurrencyAmount.Visible = true; lblCurrencyAmount.Visible = true;
pbCurrencyIcon.Visible = true; pbCurrencyIcon.Visible = true;
lblCurrencyAmount.Text = _apiService.CurrentUser.CurrencyAmount.ToString(); lblCurrencyAmount.Text = _apiService.CurrentUser.CurrencyAmount.ToString("N0");
llblSignOut.Visible = true; llblSignOut.Visible = true;
llblEditProfile.Visible = true; llblEditProfile.Visible = true;
tbcMain.Enabled = true; tbcMain.Enabled = true;
@ -716,7 +716,7 @@ namespace qtc_net_client_2
{ {
if (!IsHandleCreated) { LoggingService.LogString("Form Handle Wasn't Created"); return; } if (!IsHandleCreated) { LoggingService.LogString("Form Handle Wasn't Created"); return; }
if (InvokeRequired) if (InvokeRequired && !IsDisposed)
{ {
await Invoke(async delegate () await Invoke(async delegate ()
{ {
@ -753,12 +753,12 @@ namespace qtc_net_client_2
{ {
lblCurrencyAmount.BeginInvoke(delegate () lblCurrencyAmount.BeginInvoke(delegate ()
{ {
lblCurrencyAmount.Text = _apiService.CurrentUser.CurrencyAmount.ToString(); lblCurrencyAmount.Text = _apiService.CurrentUser.CurrencyAmount.ToString("N0");
}); });
} }
else else
{ {
lblCurrencyAmount.Text = _apiService.CurrentUser.CurrencyAmount.ToString(); lblCurrencyAmount.Text = _apiService.CurrentUser.CurrencyAmount.ToString("N0");
} }
} }

View File

@ -38,7 +38,7 @@ namespace qtc_net_client_2.Forms
var contactsList = await _apiService.GetCurrentUserContacts(); var contactsList = await _apiService.GetCurrentUserContacts();
lblUsername.Text = _userInformationDto.Username; lblUsername.Text = _userInformationDto.Username;
lblCurrencyAmount.Text = _userInformationDto.CurrencyAmount.ToString(); lblCurrencyAmount.Text = _userInformationDto.CurrencyAmount.ToString("N0");
rtxtBio.Text = _userInformationDto.Bio; rtxtBio.Text = _userInformationDto.Bio;
if (pfpRes != null && pfpRes.Success && pfpRes.Data != null) if (pfpRes != null && pfpRes.Success && pfpRes.Data != null)