public SummaryViewModel(PropertyDetailViewModel viewModel) { manager = PropertyUserStatusService.DefaultManager; propertyService = PropertiesService.DefaultManager; SubmitCommand = new Command(() => OnSubmit(), () => !IsBusy); CancelCommand = new Command(async() => await OnCancel(), () => !IsBusy); PropertyModel = viewModel; IsSubStatus = (PropertyModel.SubStatus == null ? false : true); this.PropertyChanged += SummaryViewModel_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()); }