RoundRunningView med nytt event "Loaded" triggas endast en gg när sidan är renderad
This commit is contained in:
@ -23,15 +23,12 @@ public partial class ParticipantViewModel : BaseViewModel
|
||||
IMethodSharingService<Participant> sharingService,
|
||||
IPopupService popupService,
|
||||
IPopupEventHub popupEvent
|
||||
//,
|
||||
//InfoPopupViewModel infoPopupViewModel
|
||||
) : base()
|
||||
{
|
||||
_Repository = repo;
|
||||
_sharingService = sharingService;
|
||||
_popupService = popupService;
|
||||
_popupEvent = popupEvent;
|
||||
//_infoPopupViewModel = infoPopupViewModel;
|
||||
ParticipantObject = new Participant();
|
||||
ParticipantList = new ObservableCollection<Participant>();
|
||||
IsSaveCommandEnabled = true;
|
||||
@ -55,13 +52,11 @@ public partial class ParticipantViewModel : BaseViewModel
|
||||
|
||||
#endregion
|
||||
|
||||
public bool PopupVisad { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
private bool isSaveCommandEnabled;
|
||||
|
||||
public bool PopupVisad { get; set; }
|
||||
|
||||
|
||||
#region Get Method
|
||||
public ObservableCollection<Participant> Get()
|
||||
{
|
||||
@ -131,25 +126,6 @@ public partial class ParticipantViewModel : BaseViewModel
|
||||
}
|
||||
|
||||
|
||||
|
||||
//[RelayCommand(CanExecute = nameof(IsSaveCommandEnabled))]
|
||||
//private async Task<bool> Save()
|
||||
//{
|
||||
// if (_Repository == null || ParticipantObject == null)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// var tmpTask = _Repository.Save(ParticipantObject);
|
||||
// int tmp = tmpTask.GetAwaiter().GetResult();
|
||||
// if (tmp != -1)
|
||||
// {
|
||||
// ParticipantObject = new Participant();
|
||||
// this.Get();
|
||||
// await Shell.Current.GoToAsync("..");
|
||||
// }
|
||||
// return tmp != -1;
|
||||
//}
|
||||
|
||||
[RelayCommand]
|
||||
private void DeleteAsync(Participant pp)
|
||||
{
|
||||
@ -173,11 +149,6 @@ public partial class ParticipantViewModel : BaseViewModel
|
||||
}, loadingMessage: "Laddar data...");
|
||||
}
|
||||
|
||||
//private void ClosePopup()
|
||||
//{
|
||||
// _popupService.ClosePopupAsync(Shell.Current).GetAwaiter().GetResult();
|
||||
//}
|
||||
|
||||
private async void infoPopupViewModel_ClosePopupRequested(object? sender, PopupCloseEventArgs e)
|
||||
{
|
||||
if (e.PopupId != _activePopupId)
|
||||
|
||||
Reference in New Issue
Block a user