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 @@ -