Finished remove channel button handling
This commit is contained in:
parent
d3cb34e130
commit
2ca8da61a7
@ -35,9 +35,6 @@
|
|||||||
Grid.Row="0">
|
Grid.Row="0">
|
||||||
|
|
||||||
<MenuItem Header="File">
|
<MenuItem Header="File">
|
||||||
<MenuItem Header="Add Channel" />
|
|
||||||
<MenuItem Header="Remove Channel" />
|
|
||||||
<Separator />
|
|
||||||
<MenuItem Header="Exit" Command="{Binding ExitApplication}" />
|
<MenuItem Header="Exit" Command="{Binding ExitApplication}" />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
@ -31,11 +31,9 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
private void OnDatabaseChanged(object? sender, PropertyChangedEventArgs e)
|
private void OnDatabaseChanged(object? sender, PropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.PropertyName == nameof(BetterRaidDatabase.OnlyOnline))
|
InitializeRaidChannels();
|
||||||
{
|
|
||||||
GenerateRaidGrid();
|
GenerateRaidGrid();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void OnDataContextChanged(object? sender, EventArgs e)
|
private void OnDataContextChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -62,6 +60,11 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
private void InitializeRaidChannels()
|
private void InitializeRaidChannels()
|
||||||
{
|
{
|
||||||
|
foreach (var rbvm in _raidButtonVMs)
|
||||||
|
{
|
||||||
|
rbvm.PropertyChanged -= OnChannelDataChanged;
|
||||||
|
}
|
||||||
|
|
||||||
_raidButtonVMs.Clear();
|
_raidButtonVMs.Clear();
|
||||||
|
|
||||||
var vm = DataContext as MainWindowViewModel;
|
var vm = DataContext as MainWindowViewModel;
|
||||||
|
2
db.json
2
db.json
@ -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}
|
Reference in New Issue
Block a user