Esempio n. 1
0
        /* constructor and initialization */
        public ConnexionViewModel(Window window)
        {
            _window = window;

            _restApiQueries = new RestApiQueries(null);

            _router = new Router();

            _clients = new ObservableCollection <Client>(_restApiQueries.GetClients("Client"));

            /* Routing */
            GoToConnexion = new RelayCommand(
                o => true,
                o => _router.GoToConnexion(_window)
                );
            GoToClientInscription = new RelayCommand(
                o => true,
                o => _router.GoToInscription(_window)
                );

            /* Action */
            ConnexionClientCommand = new RelayCommand(
                o => is_identififantsValides(),
                o => Connexion()
                );
        }