Avoid Updating Store Items ListView If Count Is Still Equal (No New Items)

Fix Stock Market Game UI Positioning
This commit is contained in:
Alan Moon 2025-07-17 15:27:16 -07:00
parent e6c842cb19
commit 098a59f555
2 changed files with 8 additions and 6 deletions

View File

@ -353,6 +353,8 @@ namespace qtc_net_client_2
var storeItems = await _apiService.GetStoreItems();
if (storeItems != null && storeItems.Success && storeItems.Data != null)
{
if (lvStoreItems.Items.Count == storeItems.Data.Count) return;
ilStoreThumbnails.Images.Clear();
foreach (var item in storeItems.Data)
{

View File

@ -52,7 +52,7 @@
pStockManagement.Controls.Add(btnSell);
pStockManagement.Controls.Add(btnBuy);
pStockManagement.Controls.Add(lblStockCount);
pStockManagement.Location = new Point(242, 134);
pStockManagement.Location = new Point(230, 138);
pStockManagement.Name = "pStockManagement";
pStockManagement.Size = new Size(135, 81);
pStockManagement.TabIndex = 3;
@ -106,7 +106,7 @@
pMarketStatus.Controls.Add(lblMarketStatus);
pMarketStatus.Controls.Add(pbDollarSignRight);
pMarketStatus.Controls.Add(pbDollarSignLeft);
pMarketStatus.Location = new Point(9, 7);
pMarketStatus.Location = new Point(3, 7);
pMarketStatus.Name = "pMarketStatus";
pMarketStatus.Size = new Size(586, 100);
pMarketStatus.TabIndex = 4;
@ -135,7 +135,7 @@
// pbDollarSignRight
//
pbDollarSignRight.Image = Properties.Resources.dollar_money;
pbDollarSignRight.Location = new Point(498, 3);
pbDollarSignRight.Location = new Point(500, 3);
pbDollarSignRight.Name = "pbDollarSignRight";
pbDollarSignRight.Size = new Size(83, 94);
pbDollarSignRight.SizeMode = PictureBoxSizeMode.Zoom;
@ -145,7 +145,7 @@
// pbDollarSignLeft
//
pbDollarSignLeft.Image = Properties.Resources.dollar_money;
pbDollarSignLeft.Location = new Point(6, 3);
pbDollarSignLeft.Location = new Point(3, 3);
pbDollarSignLeft.Name = "pbDollarSignLeft";
pbDollarSignLeft.Size = new Size(83, 94);
pbDollarSignLeft.SizeMode = PictureBoxSizeMode.Zoom;
@ -156,7 +156,7 @@
//
btnRefresh.Enabled = false;
btnRefresh.ForeColor = Color.Black;
btnRefresh.Location = new Point(282, 109);
btnRefresh.Location = new Point(270, 113);
btnRefresh.Name = "btnRefresh";
btnRefresh.Size = new Size(56, 23);
btnRefresh.TabIndex = 10;
@ -169,7 +169,7 @@
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue;
ClientSize = new Size(606, 227);
ClientSize = new Size(595, 227);
Controls.Add(btnRefresh);
Controls.Add(pMarketStatus);
Controls.Add(pStockManagement);