Finished remove channel button handling

This commit is contained in:
Enrico Ludwig 2024-08-26 20:33:11 +02:00
parent d3cb34e130
commit 2ca8da61a7
3 changed files with 8 additions and 8 deletions

View File

@ -35,9 +35,6 @@
Grid.Row="0">
<MenuItem Header="File">
<MenuItem Header="Add Channel" />
<MenuItem Header="Remove Channel" />
<Separator />
<MenuItem Header="Exit" Command="{Binding ExitApplication}" />
</MenuItem>
</Menu>

View File

@ -31,10 +31,8 @@ public partial class MainWindow : Window
private void OnDatabaseChanged(object? sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(BetterRaidDatabase.OnlyOnline))
{
GenerateRaidGrid();
}
InitializeRaidChannels();
GenerateRaidGrid();
}
private void OnDataContextChanged(object? sender, EventArgs e)
@ -62,6 +60,11 @@ public partial class MainWindow : Window
private void InitializeRaidChannels()
{
foreach (var rbvm in _raidButtonVMs)
{
rbvm.PropertyChanged -= OnChannelDataChanged;
}
_raidButtonVMs.Clear();
var vm = DataContext as MainWindowViewModel;

View File

@ -1 +1 @@
{"OnlyOnline":true,"Channels":["Cedricun","ZanTal","PropzMaster","Artimus83","HyperonsLive","theshroomlife","Robocraft999","sllikson","Aron_dc","AIEsports","GronkhTv","TobinatorLP","Lordabgrund"],"AutoSave":true}
{"OnlyOnline":true,"Channels":["Cedricun","ZanTal","PropzMaster","Artimus83","HyperonsLive","theshroomlife","Robocraft999","sllikson","Aron_dc","AIEsports","TobinatorLP","Lordabgrund","GronkhTV"],"AutoSave":true}