Esempio n. 1
0
		public LoginViewModel(ApplicationManager appManager)
        {
            _appManager = appManager;
			Name = appManager.AccountManager.AccountUsername;
			Password = appManager.AccountManager.AccountPassword;
			_appManager.ConnectionManager.ConnectionDropped += OnConnectionLost;
        }
Esempio n. 2
0
        public HomeViewModel(ApplicationManager appManager)
        {
            _appManager = appManager;
            Users = new ObservableCollection<UserViewModel>();
			_publicRooms = new ObservableCollection<Room> ();
			_activeChats = new ObservableCollection<ActiveChatViewModel> ();
            LoadData();
        }
Esempio n. 3
0
        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);
        }