Beispiel #1
0
        public MainWindow()
        {
            CartComparer = new CartComparer();
            UserDBManager = new UserDBManager();
            UserLoginManager = new UserLoginManager(UserDBManager);

            LoginWindow = new LoginWindow(UserLoginManager);
            LoginWindow.ShowDialog();

            UserDetailsViewModel = new UserDetailsViewModel(UserLoginManager.LoggedInUser.Username);
            DataContext = UserDetailsViewModel;

            InitializeComponent();

            WiseCartManager = new WiseCartManager();

            Task T1 = Task.Factory.StartNew(() => WiseCartManager.InitializeData());

            Task T2 = T1.ContinueWith(t => ProductsDataGridLoaded());
        }
Beispiel #2
0
 public UserLoginManager(UserDBManager userDBManager)
 {
     ValidUserNameRegex = new Regex(@"^(?=[a-zA-Z])[-\w.]{0,23}([a-zA-Z\d]|(?<![-.])_)$");
     LoggedInUser = null;
     UserDBManager = userDBManager;
 }