Karaoke-Kingpin 移除歡迎詞設定

Karaoke-Kingpin 移除人氣與最新歌曲設定
20250325
This commit is contained in:
allen.yan 2025-03-25 11:54:45 +08:00
parent b0a9673ffc
commit 4e7039c824
2 changed files with 22 additions and 22 deletions

View File

@ -46,7 +46,7 @@ namespace Karaoke_Kingpin.Controller
public partial class Index : Window public partial class Index : Window
{ {
//private bool isInitialLoad = true; // 默认为true表示处于初始化加载阶段 //private bool isInitialLoad = true; // 默认为true表示处于初始化加载阶段
private bool isFormFullyLoaded = false; //private bool isFormFullyLoaded = false;
private TcpClient client; private TcpClient client;
private NetworkStream stream; private NetworkStream stream;
private ObservableCollection<SongData> _songs = new ObservableCollection<SongData>(); private ObservableCollection<SongData> _songs = new ObservableCollection<SongData>();
@ -1463,7 +1463,7 @@ namespace Karaoke_Kingpin.Controller
_SaveSongToDatabase(song); _SaveSongToDatabase(song);
} }
} }
/*
private void WelcomeMessageTextBox_TextChanged(object sender, TextChangedEventArgs e) private void WelcomeMessageTextBox_TextChanged(object sender, TextChangedEventArgs e)
{ {
// 获取文本框的当前内容 // 获取文本框的当前内容
@ -1474,17 +1474,17 @@ namespace Karaoke_Kingpin.Controller
// 将内容写入文件 // 将内容写入文件
File.WriteAllText(filePath, currentText); File.WriteAllText(filePath, currentText);
} }*/
private void Window_Loaded(object sender, RoutedEventArgs e) private void Window_Loaded(object sender, RoutedEventArgs e)
{ {
// Now that the Window is loaded, set the flag to true // 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 // 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. // Ensure the form components are fully initialized before processing any changes.
if (!isFormFullyLoaded) if (!isFormFullyLoaded)
@ -1505,9 +1505,9 @@ namespace Karaoke_Kingpin.Controller
System.Windows.MessageBox.Show("請輸入有效的整數。"); 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 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 // Handle any errors here, possibly logging them or informing the user
Console.WriteLine("An error occurred while writing to the file: " + ex.Message); Console.WriteLine("An error occurred while writing to the file: " + ex.Message);
} }
} }*/
private void SearchTypeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) private void SearchTypeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{ {

View File

@ -108,17 +108,17 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- 歡迎詞 --> <!-- 歡迎詞 -->
<Label Content="歡迎詞:" VerticalAlignment="Center"/> <!--Label Content="歡迎詞:" VerticalAlignment="Center"/-->
<TextBox x:Name="WelcomeMessageTextBox" <!--TextBox x:Name="WelcomeMessageTextBox"
Text="歡迎使用超級巨星歡唱網路版系統,與你共度美好時光。" Text="歡迎使用超級巨星歡唱網路版系統,與你共度美好時光。"
Grid.Column="1" Grid.Column="1"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
TextChanged="WelcomeMessageTextBox_TextChanged"/> TextChanged="WelcomeMessageTextBox_TextChanged"/-->
<!-- 系統公告 --> <!-- 系統公告 -->
<Label Content="系統公告:" VerticalAlignment="Center" Grid.Row="1"/> <!--Label Content="系統公告:" VerticalAlignment="Center" Grid.Row="1"/-->
<TextBox x:Name="txtAnnouncement" Text="這裡填入系統公告內容。" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Grid.Row="1"/> <!--TextBox x:Name="txtAnnouncement" Text="這裡填入系統公告內容。" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Grid.Row="1"/-->
<Button Content="發送" Grid.Column="2" VerticalAlignment="Center" Grid.Row="1" Click="SendAnnouncement_Click"/> <!--Button Content="發送" Grid.Column="2" VerticalAlignment="Center" Grid.Row="1" Click="SendAnnouncement_Click"/-->
</Grid> </Grid>
</Grid> </Grid>
@ -230,31 +230,31 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Content="新進歌曲限:" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Center" /> <!--Label Content="新進歌曲限:" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Center" /-->
<TextBox x:Name="txtNewSongLimit" <!--TextBox x:Name="txtNewSongLimit"
Text="100" Text="100"
Grid.Column="1" Grid.Column="1"
Grid.Row="0" Grid.Row="0"
Grid.RowSpan="2" Grid.RowSpan="2"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
TextChanged="IntegerUpDown_ValueChanged"/> TextChanged="IntegerUpDown_ValueChanged"/-->
<Label Content="筆" Grid.Column="2" Grid.Row="1" /> <!--Label Content="筆" Grid.Column="2" Grid.Row="1" /-->
<Label Content="熱門歌曲限" Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" /> <!--Label Content="熱門歌曲限" Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" /-->
<TextBox x:Name="txtHotSongLimit" <!--TextBox x:Name="txtHotSongLimit"
Text="100" Text="100"
Grid.Column="1" Grid.Column="1"
Grid.Row="2" Grid.Row="2"
Grid.RowSpan="2" Grid.RowSpan="2"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
TextChanged="IntegerUpDown_ValueChanged"/> TextChanged="IntegerUpDown_ValueChanged"/-->
<Label Content="筆。" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" /> <!--Label Content="筆。" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" /-->
</Grid> </Grid>
</Grid> </Grid>
</GroupBox> </GroupBox>