public LoginViewModel(ApplicationManager appManager) { _appManager = appManager; Name = appManager.AccountManager.AccountUsername; Password = appManager.AccountManager.AccountPassword; _appManager.ConnectionManager.ConnectionDropped += OnConnectionLost; }
public HomeViewModel(ApplicationManager appManager) { _appManager = appManager; Users = new ObservableCollection<UserViewModel>(); _publicRooms = new ObservableCollection<Room> (); _activeChats = new ObservableCollection<ActiveChatViewModel> (); LoadData(); }
public static Page GetMainPage() { ApplicationManager applicationManager = new ApplicationManager( DependencyService.Get<ITransportResource>(), DependencyService.Get<IStorage>(), DependencyService.Get<IDeviceInfo>()); return new LoginPage(new LoginViewModel(applicationManager)); }
public UserDetailViewModel(ApplicationManager appManager, Profile profile) { _appManager = appManager; //Auto map it like it's hot //Copy, flatten, you can make it happen AutoMapper.CopyPropertyValues (profile, this); AutoMapper.CopyPropertyValues (profile.Details, this); }