private MainViewModel PrepareMainViewModel(ClientStorage clientStorage, ProjectStorage projectStorage) { var clientListViewModel = new ClientListViewModel(clientStorage); var projectListViewModel = new ProjectListViewModel(projectStorage); var mainViewModel = new MainViewModel(clientListViewModel, projectListViewModel); return mainViewModel; }
public void LoadDefaultClients(ClientStorage clientStorage) { clientStorage.AddClient(new Client {Name = "Enbridge", ContactName = "Daren"}); clientStorage.AddClient(new Client {Name = "DODO", ContactName = "Фёдор"}); clientStorage.AddClient(new Client {Name = "Avicom", ContactName = "Евгений"}); clientStorage.AddClient(new Client {Name = "Павел", ContactName = "Павел"}); clientStorage.AddClient(new Client {Name = "Дмитрий", ContactName = "Дмитрий"}); }
public void Start(MainWindow window) { var dataManager = new DataManager(); var clientStorage = new ClientStorage(); var projectStorage = new ProjectStorage(); LoadDefaultData(dataManager, clientStorage, projectStorage); window.DataContext = PrepareMainViewModel(clientStorage, projectStorage); window.Show(); }
private void LoadDefaultData(DataManager dataManager, ClientStorage clientStorage, ProjectStorage projectStorage) { dataManager.LoadDefaultClients(clientStorage); dataManager.LoadDefaultProjects(projectStorage); }
public void SetUp() { clientStorage = new ClientStorage(); }