public AttackRouteListElementViewModel(UserParty party, Action <UserParty> onUnSelect) { Id = party.Id; Party = party; PartyUnits = new ReactiveCollection <UserUnitViewModel>(); Tags = new ReactiveCollection <TagViewModel>(); IsExpandComment.Subscribe(x => { if (x) { Comment.Value = party.Comment; } else { Comment.Value = party.Comment?.GetFirstLine() ?? string.Empty; } }); OnUnSelect.Subscribe(() => { onUnSelect?.Invoke(party); }); UpdateParty(party); }
public void OnUnSelectInvoke() { OnUnSelect?.Invoke(this, EventArgs.Empty); }