public ControlCenter(MainWindow mw) { this.mw = mw; tm = new TaskManager(); api = new API(tm); eh = new CommandLineHanlder(api); //set up file manager fm = new FileManager(tm); fm.loadFile(FILEPATH); tm.TaskChangeEvent += new TaskManager.TaskChangeHandler(fm.write); //setting up all the events api.StatusChangeEvent += new API.StatusChangeHandler(mw.onStatusChange); api.ViewChangeEvent += new API.ViewChangeHandler(mw.onViewChange); // Set up key_event handler for windows components // handle the event 'a command is entered' mw.commandLine.KeyUp += new KeyEventHandler(eh.KeyUp); mw.commandLine.KeyDown += new KeyEventHandler(eh.KeyDown); mw.commandLine.MouseLeftButtonDown += new MouseButtonEventHandler(eh.MouseLeftButtonDown); mw.commandLine.LostFocus += new RoutedEventHandler(eh.LostFocus); mw.commandLine.Text = "Enter Command"; }
public FileManager(TaskManager tm) { this.tm = tm; }
//View.OutputHandler oh = new View.OutputHandler(); public API(TaskManager tmRef) { this.tm = tmRef; }