Ejemplo n.º 1
0
        private void RegisterClick(object sender, RoutedEventArgs e)
        {
            RegisterWindow registerWindow = new RegisterWindow();

            this.Close();
            registerWindow.Show();
        }
        //Move to the register window
        private void RegisterWindowButton_Click(object sender, RoutedEventArgs e)
        {
            RegisterWindow regwin = new RegisterWindow();

            regwin.Show();
            this.Hide();
        }
Ejemplo n.º 3
0
        private void registerButton_Click(object sender, EventArgs e)
        {
            this.Hide();
            RegisterWindow regWindow = new RegisterWindow();

            regWindow.ShowDialog();
        }
Ejemplo n.º 4
0
        public void CreateNewWindow(RegisterViewModel regViewModel)
        {
            var window = new RegisterWindow
            {
                DataContext = regViewModel
            };

            window.ShowDialog();
        }
Ejemplo n.º 5
0
        private void App_Startup(object sender, StartupEventArgs e)
        {
            _service = new ClientAPIService(ConfigurationManager.AppSettings["baseAddress"]);

            _loginViewModel = new LoginViewModel(_service);

            _loginViewModel.LogintSucceeded    += ViewModel_LoginSucceeded;
            _loginViewModel.LoginFailed        += ViewModel_LoginFailed;
            _loginViewModel.MessageApplication += ViewModel_MessageApplication;

            _loginView = new LoginWindow
            {
                DataContext = _loginViewModel
            };


            _registerViewModel = new RegisterViewModel(_service);
            _registerViewModel.RegisterSuccess += ViewModel_RegisterSucceeded;

            _registerView = new RegisterWindow
            {
                DataContext = _registerViewModel
            };


            _orderViewModel              = new OrderViewModel(_service);
            _orderViewModel.CloseOrders += ViewModel_CloseOrders;

            _orderView = new OrderWindow
            {
                DataContext = _orderViewModel
            };

            _mainViewModel = new MainViewModel(_service);
            _mainViewModel.LogoutSucceeded    += ViewModel_LogoutSucceeded;
            _mainViewModel.MessageApplication += ViewModel_MessageApplication;
            _mainViewModel.OpenOrders         += ViewModel_OpenOrders;
            _mainViewModel.OpenRegister       += ViewModel_OpenRegister;

            _mainView = new MainWindow
            {
                DataContext = _mainViewModel
            };
            //_mainView.Show();
            _loginView.Show();
            //_registerView.Show();
        }