From 098a59f555280245655a946cd45e16668f4c333f Mon Sep 17 00:00:00 2001 From: AlanMoonbase Date: Thu, 17 Jul 2025 15:27:16 -0700 Subject: [PATCH] Avoid Updating Store Items ListView If Count Is Still Equal (No New Items) Fix Stock Market Game UI Positioning --- qtc-net-client-2/Forms/Main.cs | 2 ++ qtc-net-client-2/Forms/StockMarketGame.Designer.cs | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/qtc-net-client-2/Forms/Main.cs b/qtc-net-client-2/Forms/Main.cs index 4c2102d..88b5573 100644 --- a/qtc-net-client-2/Forms/Main.cs +++ b/qtc-net-client-2/Forms/Main.cs @@ -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) { diff --git a/qtc-net-client-2/Forms/StockMarketGame.Designer.cs b/qtc-net-client-2/Forms/StockMarketGame.Designer.cs index e56adbd..3a441b6 100644 --- a/qtc-net-client-2/Forms/StockMarketGame.Designer.cs +++ b/qtc-net-client-2/Forms/StockMarketGame.Designer.cs @@ -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);