Med Popups och nytt system för släckning, men utan hantering av rätt popup
This commit is contained in:
@ -35,12 +35,11 @@ public partial class ParticipantViewModel : BaseViewModel
|
||||
ParticipantObject = new Participant();
|
||||
ParticipantList = new ObservableCollection<Participant>();
|
||||
IsSaveCommandEnabled = true;
|
||||
_popupEvent.InfoPopupCloseRequested += infoPopupViewModel_ClosePopupRequested;
|
||||
PopupVisad = false;
|
||||
_popupEvent.InfoPopupCloseRequested += infoPopupViewModel_ClosePopupRequested;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Private Variables
|
||||
[ObservableProperty]
|
||||
@ -52,6 +51,7 @@ public partial class ParticipantViewModel : BaseViewModel
|
||||
private readonly IPopupService _popupService;
|
||||
private readonly IPopupEventHub _popupEvent;
|
||||
private readonly InfoPopupViewModel _infoPopupViewModel;
|
||||
private string _activePopupId;
|
||||
|
||||
#endregion
|
||||
|
||||
@ -176,8 +176,12 @@ public partial class ParticipantViewModel : BaseViewModel
|
||||
// _popupService.ClosePopupAsync(Shell.Current).GetAwaiter().GetResult();
|
||||
//}
|
||||
|
||||
private async void infoPopupViewModel_ClosePopupRequested(object? sender, EventArgs e)
|
||||
private async void infoPopupViewModel_ClosePopupRequested(object? sender, PopupCloseEventArgs e)
|
||||
{
|
||||
if (e.PopupId != _activePopupId)
|
||||
{
|
||||
return;
|
||||
}
|
||||
PopupVisad = true;
|
||||
await _popupService.ClosePopupAsync(Shell.Current);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user