feat: add attackers handling
This commit is contained in:
@@ -74,6 +74,13 @@ namespace Client.Application.ViewModels
|
||||
return target;
|
||||
}
|
||||
}
|
||||
public List<uint> Attackers
|
||||
{
|
||||
get
|
||||
{
|
||||
return hero.AttackerIds.ToList();
|
||||
}
|
||||
}
|
||||
public HeroSummaryInfoViewModel(Hero hero)
|
||||
{
|
||||
this.hero = hero;
|
||||
@@ -102,6 +109,10 @@ namespace Client.Application.ViewModels
|
||||
OnPropertyChanged("Target");
|
||||
}
|
||||
}
|
||||
else if (e.PropertyName == "AttackerIds")
|
||||
{
|
||||
OnPropertyChanged("Attackers");
|
||||
}
|
||||
}
|
||||
|
||||
private void InventoryInfo_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
|
@@ -221,6 +221,13 @@
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
<ListBox Grid.Row="3" Margin="4" ItemsSource="{Binding Attackers, Mode=OneWay}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Mode=OneWay}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<StackPanel Grid.Column="1" DataContext="{Binding Target, Mode=OneWay}" Visibility="{Binding Path=.,Converter={StaticResource NullToVisibilityConverter}}" Margin="4">
|
||||
<TextBlock FontSize="16" Text="{Binding Path=Name, Mode=OneWay}"></TextBlock>
|
||||
<TextBlock Text="{Binding Path=BriefInfo, Mode=OneWay}"></TextBlock>
|
||||
|
Reference in New Issue
Block a user