public CreateEmployeeViewModel(Employee employee, IEmployeeRepository repository, MainViewModel mainViewModel) : base(mainViewModel) { Employee = employee; Repository = repository; Title = "Create Employee"; }
public void Initialize() { _mainViewModel = new MainViewModel(); _viewModel = new DatabaseLoginViewModel(_mainViewModel); SetCorrectConnectionString(); SettingsHelper.ResetSettings(); }
public LoginViewModel(IDirectoryAuthenticator authenticator, IEmployeeRepository employeeRepository, MainViewModel mainViewModel) : base(mainViewModel) { Title = "Login"; _directoryAuthenticator = authenticator; _employeeRepository = employeeRepository; LoadSettings(); }
public void Initialize() { _mainViewModel = new MainViewModel(); _employee = new Employee {Login = "******"}; _employees = new List<Employee> {_employee}; _repository = new EmployeeRepositoryStub(_employees); SettingsHelper.SaveConnectionString("Data Source=YOGER-SUPERMAN\\SQLEXPRESS;Initial Catalog=HolidayCalendar;Integrated Security=True;Connect Timeout=5"); }
protected UtilityViewModel(MainViewModel mainViewModel) { if (mainViewModel == null) { throw new ArgumentNullException("mainViewModel cannot be null. "); } MainViewModel = mainViewModel; }
private void SetupMainView() { var mainView = new MainView(); var mainViewModel = new MainViewModel(); mainView.DataContext = mainViewModel; Exit += (sender, args) => mainViewModel.Close(); mainView.Show(); }
public void Initialize() { _authenticatorStub = new DirectoryAuthenticatorStub(_domain, _userName, _password); _mainViewModel = new MainViewModel(); _employees = new List<Employee>(); _employeeRepository = new EmployeeRepositoryStub(_employees); _viewModel = GetNewViewModel(); _passwordBox = new PasswordBox {Password = _password}; SettingsHelper.ResetSettings(); }
public UtilityViewModelStub(MainViewModel mainViewModel) : base(mainViewModel) { }
public EditEmployeeViewModel(Employee employee, IEmployeeRepository repository, MainViewModel mainViewModel) : base(employee, repository, mainViewModel) { DisplayEmployeeProperties(employee); }
public EditEmployeeViewModel(Employee employee, MainViewModel mainViewModel) : this(employee, new EmployeeRepository(), mainViewModel) { }
public DatabaseLoginViewModel(MainViewModel mainViewModel) : base(mainViewModel) { Title = "Database info"; }
public LoginViewModel(IEmployeeRepository repository, MainViewModel mainViewModel) : this(new ActiveDirectoryAuthenticator(), repository, mainViewModel) { }
public LoginViewModel(MainViewModel mainViewModel) : this(new DirectoryAuthenticatorDummy(), new EmployeeRepository(SettingsHelper.GetConnectionString()), mainViewModel) { }
public void Initialize() { _mainViewModel = new MainViewModel(); _utilityViewModel = new UtilityViewModelStub(_mainViewModel); _mainViewModel.CurrentUtilityViewModel = _utilityViewModel; }
public void Initialize() { _viewModel = new MainViewModel(); }