public GUI(WinMovieRack.Controller.Controller c, MainWindow mw, IMDBBrowser browser, DetailsView dv, ActorsView av, ListView lv,TodoList todoList) { this.controller = c; this.imdbBrowser = browser; this.mainWindow = mw; this.detailsView = dv; this.actorsView = av; this.listView = lv; this.todoList = todoList; mainWindow = mw; mainWindow.Show(); }
public void setTodoList(TodoList todoView) { this.todoView = todoView; todoView.todoListBox.ItemsSource = todoList; disp = Dispatcher.CurrentDispatcher; addToListFunction = (TodoListData todo) => disp.BeginInvoke(DispatcherPriority.Background, (new Action(() => { //System.Console.WriteLine(todo.description); TodoListBoxItem boxItem = new TodoListBoxItem(todo); todoList.Add(boxItem); todoListItems.Add(boxItem.getId, boxItem); }))); updateTodoList(); }
private void initializeGUI() { browserController = new ImdbBrowserController(this); IMDBBrowser browser = new IMDBBrowser(browserController); browserController.setBrowser(browser); todoListController = new TodoListController(this, dbTodo); TodoList todoList = new TodoList(todoListController); todoListController.setTodoList(todoList); windowController = new MainWindowController(); MainWindow mw = new MainWindow(windowController); mw.Width = 1024; mw.Height = 600; windowController.setMainWindow(this, mw); detailsViewController = new DetailsViewController(this, db); DetailsView dv = new DetailsView(detailsViewController); detailsViewController.setDetailsView(dv); detailsViewController.loadCompleteMovieList(); actorsViewController = new ActorsViewController(this, db); ActorsView av = new ActorsView(actorsViewController); actorsViewController.setActorsView(av); listViewController = new ListViewController(this, db); ListView lv = new ListView(listViewController); listViewController.setListView(lv); gui = new WinMovieRack.GUI.GUI(this, mw, browser, dv, av, lv, todoList); }