public PropertyDetailViewModel(PropertyModel item) { manager = PropertyStatusMstrService.DefaultManager; propertySubStatusMstrService = PropertySubStatusMstrService.DefaultManager; statusList = new ObservableCollection <PropertyStatusMstr>(); substatusList = new ObservableCollection <PropertySubStatusMstr>(); SubmitCommand = new Command(() => OnSubmit(), () => !IsBusy); HistoryCommand = new Command(() => OnHistoryAsync(), () => !IsBusy); MapCommand = new Command(() => OnMap()); CloseCommand = new Command(() => OnClose()); _isCompleted = (item.IsStatusUpdated == false ? true : false); _IsHistory = (string.IsNullOrEmpty(item.LatestStatus) ? false : true); PropertyModel = item; IsBlur = BackColor; this.PropertyChanged += PropertyDetailViewModel_PropertyChanged; }
public SettingViewModel() { manager = PropertiesService.DefaultManager; propertyUserStatusService = PropertyUserStatusService.DefaultManager; propertyStatus = PropertyStatusMstrService.DefaultManager; propertySub = PropertySubStatusMstrService.DefaultManager; LogOutCommand = new Command(async() => await OnLogOutAsync()); ChangePasswordCommand = new Command(async() => await OnChangePasswordAsync()); UserName = string.Concat(Client.firstName, " ", Client.lastName); RoleName = Client.roleName; switch (Device.RuntimePlatform) { case Device.UWP: IsVisiable = true; break; default: IsVisiable = false; break; } SyncCommand = new Command(async() => await OnSyncAsync()); }