From a008c7c942d230baaa1075b6b4479d83cc89515c Mon Sep 17 00:00:00 2001 From: AlanMoonbase Date: Mon, 30 Jun 2025 12:25:34 -0700 Subject: [PATCH] Format Currency Counters --- qtc-net-client-2/Forms/Main.cs | 10 +++++----- qtc-net-client-2/Forms/Profile.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qtc-net-client-2/Forms/Main.cs b/qtc-net-client-2/Forms/Main.cs index 52ac754..831489c 100644 --- a/qtc-net-client-2/Forms/Main.cs +++ b/qtc-net-client-2/Forms/Main.cs @@ -300,7 +300,7 @@ namespace qtc_net_client_2 var result = await _apiService.AddCurrencyToCurrentUser(tokenJackpotSpinner.TokensWon, true); if (result.Success) { - lblCurrencyAmount.Text = (_apiService.CurrentUser.CurrencyAmount + tokenJackpotSpinner.TokensWon).ToString(); + lblCurrencyAmount.Text = (_apiService.CurrentUser.CurrencyAmount + tokenJackpotSpinner.TokensWon).ToString("N"); 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); @@ -391,7 +391,7 @@ namespace qtc_net_client_2 lblWelcome.Text = $"Welcome, {_apiService.CurrentUser.Username}"; lblCurrencyAmount.Visible = true; pbCurrencyIcon.Visible = true; - lblCurrencyAmount.Text = _apiService.CurrentUser.CurrencyAmount.ToString(); + lblCurrencyAmount.Text = _apiService.CurrentUser.CurrencyAmount.ToString("N0"); llblSignOut.Visible = true; llblEditProfile.Visible = true; tbcMain.Enabled = true; @@ -716,7 +716,7 @@ namespace qtc_net_client_2 { if (!IsHandleCreated) { LoggingService.LogString("Form Handle Wasn't Created"); return; } - if (InvokeRequired) + if (InvokeRequired && !IsDisposed) { await Invoke(async delegate () { @@ -753,12 +753,12 @@ namespace qtc_net_client_2 { lblCurrencyAmount.BeginInvoke(delegate () { - lblCurrencyAmount.Text = _apiService.CurrentUser.CurrencyAmount.ToString(); + lblCurrencyAmount.Text = _apiService.CurrentUser.CurrencyAmount.ToString("N0"); }); } else { - lblCurrencyAmount.Text = _apiService.CurrentUser.CurrencyAmount.ToString(); + lblCurrencyAmount.Text = _apiService.CurrentUser.CurrencyAmount.ToString("N0"); } } diff --git a/qtc-net-client-2/Forms/Profile.cs b/qtc-net-client-2/Forms/Profile.cs index 6365490..4e3e897 100644 --- a/qtc-net-client-2/Forms/Profile.cs +++ b/qtc-net-client-2/Forms/Profile.cs @@ -38,7 +38,7 @@ namespace qtc_net_client_2.Forms var contactsList = await _apiService.GetCurrentUserContacts(); lblUsername.Text = _userInformationDto.Username; - lblCurrencyAmount.Text = _userInformationDto.CurrencyAmount.ToString(); + lblCurrencyAmount.Text = _userInformationDto.CurrencyAmount.ToString("N0"); rtxtBio.Text = _userInformationDto.Bio; if (pfpRes != null && pfpRes.Success && pfpRes.Data != null)