public SplashPageViewModel(INavigationService navigationService, IPageDialogService dialogService, SystemStatusService systemStatusService, SystemEnvironmentsService systemEnvironmentsService, ProjectService projectService, MyUserService myUserService, RecordCacheHelper recordCacheHelper, AppStatus appStatus, ExceptionRecordsService exceptionRecordsService, AppExceptionsService appExceptionsService, LeaveCategoryService leaveCategoryService, OnCallPhoneService onCallPhoneService) { this.navigationService = navigationService; this.dialogService = dialogService; this.systemStatusService = systemStatusService; this.systemEnvironmentsService = systemEnvironmentsService; this.projectService = projectService; this.myUserService = myUserService; this.recordCacheHelper = recordCacheHelper; this.appStatus = appStatus; this.exceptionRecordsService = exceptionRecordsService; this.appExceptionsService = appExceptionsService; this.leaveCategoryService = leaveCategoryService; this.onCallPhoneService = onCallPhoneService; }
public OnCallPhonePageViewModel(INavigationService navigationService, IPageDialogService dialogService, OnCallPhoneService onCallPhoneService, MyUserService myUserService, RefreshTokenService refreshTokenService, SystemStatusService systemStatusService, AppStatus appStatus) { this.navigationService = navigationService; this.dialogService = dialogService; this.onCallPhoneService = onCallPhoneService; this.myUserService = myUserService; this.refreshTokenService = refreshTokenService; this.systemStatusService = systemStatusService; this.appStatus = appStatus; #region 點選某筆紀錄觸發命令 ItemTappedCommand = new DelegateCommand(async() => { try { PhoneDialer.Open(SelectedItem.PhoneNumber); } catch (Exception ex) { await dialogService.DisplayAlertAsync("錯誤", $"發生例外異常:{ex.Message}", "確定"); } }); #endregion #region 更新遠端紀錄命令 RefreshCommand = new DelegateCommand(async() => { IsRefresh = true; await ReloadData(); IsRefresh = false; }); #endregion }