Пример #1
0
        public MainViewModel(IRootItemsContainer rootItemsContainer, IJuickClient client, INavigationManager navigationManager) {
            this.rootItemsContainer = rootItemsContainer;
            this.client = client;
            this.navigationManager = navigationManager;
            ItemPressCommand = new DelegateCommand<SampleDataGroup>(ItemPress);

            Initialize();
        }
Пример #2
0
        public LoginViewModel(IJuickClient juickClient, ICredentialStorage credentialStorage, INavigationManager navigationManager) {
            this.client = juickClient;
            this.credentialStorage = credentialStorage;
            this.navigationManager = navigationManager;

            LoginCommand = new DelegateCommand(DoLogin);

            var credential = credentialStorage.LoadCredential();
            if(credential != null) {
                login = credential.UserName;
                password = credential.Password;
            }
        }