예제 #1
0
        public SectionViewModel()
        {
            _communication = ClassLoader.Instance.GetElement <ICommunication>();
            _enviroment    = ClassLoader.Instance.GetElement <IEnviroment>();
            _database      = ClassLoader.Instance.GetElement <IDatabase>();

            AddCommand = new ClickCommand(OnAddCommand);

            token       = _enviroment.UserToken;
            currentUser = _communication.GetUserDetails(token, new CancellationTokenSource().Token);
        }
예제 #2
0
        public BooksViewModel()
        {
            AddCommand = new ClickCommand(OnAddCommand);
            AddCommand.SetCanExecuted(true);

            _communication = ClassLoader.Instance.GetElement <ICommunication>();
            _enviroment    = ClassLoader.Instance.GetElement <IEnviroment>();
            _database      = ClassLoader.Instance.GetElement <IDatabase>();

            token       = _enviroment.UserToken;
            currentUser = _communication.GetUserDetails(token, new CancellationTokenSource().Token);

            _database.GetBooks(currentUser.ID).ToList().ForEach(f => Books.Add(f));
        }
예제 #3
0
 public SignInViewModel()
 {
     SignIn         = new ClickCommand(OnExecuted);
     _communication = ClassLoader.Instance.GetElement <ICommunication>();
     _enviroment    = ClassLoader.Instance.GetElement <IEnviroment>();
 }