From 4e7039c824084279be70ada6f4b7d945929ce782 Mon Sep 17 00:00:00 2001 From: "allen.yan" Date: Tue, 25 Mar 2025 11:54:45 +0800 Subject: [PATCH] =?UTF-8?q?Karaoke-Kingpin=20=E7=A7=BB=E9=99=A4=E6=AD=A1?= =?UTF-8?q?=E8=BF=8E=E8=A9=9E=E8=A8=AD=E5=AE=9A=20Karaoke-Kingpin=20?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=BA=BA=E6=B0=A3=E8=88=87=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E6=AD=8C=E6=9B=B2=E8=A8=AD=E5=AE=9A=2020250325?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/Index.cs | 16 ++++++++-------- Views/Index.xaml | 28 ++++++++++++++-------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Controller/Index.cs b/Controller/Index.cs index 0821e6e..270a8b6 100644 --- a/Controller/Index.cs +++ b/Controller/Index.cs @@ -46,7 +46,7 @@ namespace Karaoke_Kingpin.Controller public partial class Index : Window { //private bool isInitialLoad = true; // 默认为true,表示处于初始化加载阶段 - private bool isFormFullyLoaded = false; + //private bool isFormFullyLoaded = false; private TcpClient client; private NetworkStream stream; private ObservableCollection _songs = new ObservableCollection(); @@ -1463,7 +1463,7 @@ namespace Karaoke_Kingpin.Controller _SaveSongToDatabase(song); } } - + /* private void WelcomeMessageTextBox_TextChanged(object sender, TextChangedEventArgs e) { // 获取文本框的当前内容 @@ -1474,17 +1474,17 @@ namespace Karaoke_Kingpin.Controller // 将内容写入文件 File.WriteAllText(filePath, currentText); - } + }*/ private void Window_Loaded(object sender, RoutedEventArgs e) { // Now that the Window is loaded, set the flag to true - isFormFullyLoaded = true; + //isFormFullyLoaded = true; // You can now safely access controls like txtNewSongLimit and txtHotSongLimit here if needed } - private void IntegerUpDown_ValueChanged(object sender, TextChangedEventArgs e) + /*private void IntegerUpDown_ValueChanged(object sender, TextChangedEventArgs e) { // Ensure the form components are fully initialized before processing any changes. if (!isFormFullyLoaded) @@ -1505,9 +1505,9 @@ namespace Karaoke_Kingpin.Controller System.Windows.MessageBox.Show("請輸入有效的整數。"); } } - } + }*/ - private void SaveLimitsToFile(int newSongLimit, int hotSongLimit) + /*private void SaveLimitsToFile(int newSongLimit, int hotSongLimit) { string filePath = "SongLimitsSettings.txt"; // Update with the path where you want to save the file @@ -1524,7 +1524,7 @@ namespace Karaoke_Kingpin.Controller // Handle any errors here, possibly logging them or informing the user Console.WriteLine("An error occurred while writing to the file: " + ex.Message); } - } + }*/ private void SearchTypeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { diff --git a/Views/Index.xaml b/Views/Index.xaml index ae24906..7ce0e1d 100644 --- a/Views/Index.xaml +++ b/Views/Index.xaml @@ -108,17 +108,17 @@ -