Пример #1
0
        // let's try to keep everything not part of the UI away from this file
        public MainWindow()
        {
            ATD atd = new ATD();
            atd.execute();

            InitializeComponent();

            new HotKeyHandler(this);
            new MinimizeEventHandler(this);

            controller = new ControlCenter(this);
            commandLine.Focus();
            //taskListDataGrid.FontFamily = new System.Windows.Media.FontFamily("/ToDoOrNoToDo;component/image/#Buxton Sketch");

            // installing UIs to the system
            gui = new GUI(GuiElement, manbox, taskListDataGrid, controller);
            textui = new TextUI(TextUIElement, terminal);

            controller.installUI(gui);
            controller.installUI(textui);
            DataContext = gui;
            taskListDataGrid.SelectedCellsChanged += new System.Windows.Controls.SelectedCellsChangedEventHandler(taskListDataGrid_SelectedCellsChanged);

            gui.enable();
            textui.disable();
            currentui = gui;
        }
Пример #2
0
 //public List<Task> TaskListView { get; set; }
 public GUI(Grid grd, TextBlock mb, DataGrid tl, ControlCenter cc)
 {
     container = grd;
     manbox = mb;
     taskListDataGrid = tl;
     controller = cc;
     TaskListView = CollectionViewSource.GetDefaultView(controller.ReturnTaskList());
 }