Karaoke-Kingpin 移除歡迎詞設定
Karaoke-Kingpin 移除人氣與最新歌曲設定 20250325
This commit is contained in:
parent
b0a9673ffc
commit
4e7039c824
@ -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<SongData> _songs = new ObservableCollection<SongData>();
|
||||
@ -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)
|
||||
{
|
||||
|
@ -108,17 +108,17 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- 歡迎詞 -->
|
||||
<Label Content="歡迎詞:" VerticalAlignment="Center"/>
|
||||
<TextBox x:Name="WelcomeMessageTextBox"
|
||||
<!--Label Content="歡迎詞:" VerticalAlignment="Center"/-->
|
||||
<!--TextBox x:Name="WelcomeMessageTextBox"
|
||||
Text="歡迎使用超級巨星歡唱網路版系統,與你共度美好時光。"
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Stretch"
|
||||
TextChanged="WelcomeMessageTextBox_TextChanged"/>
|
||||
TextChanged="WelcomeMessageTextBox_TextChanged"/-->
|
||||
<!-- 系統公告 -->
|
||||
<Label Content="系統公告:" VerticalAlignment="Center" 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"/>
|
||||
<!--Label Content="系統公告:" VerticalAlignment="Center" 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"/-->
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@ -230,31 +230,31 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</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"
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
VerticalAlignment="Center"
|
||||
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"
|
||||
Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
Grid.RowSpan="2"
|
||||
VerticalAlignment="Center"
|
||||
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>
|
||||
</GroupBox>
|
||||
|
Reference in New Issue
Block a user