Exemplo n.º 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;
        }
Exemplo n.º 2
0
 public void onViewChange(object sender)
 {
     string viewName = (string) sender;
     if (viewName == "TextUI")
     {
         gui.disable();
         textui.enable();
         currentui = textui;
     } else
         if (viewName == "GUI")
         {
             textui.disable();
             currentui = gui;
             gui.enable();
         }
 }
Exemplo n.º 3
0
 public void installUI(UIAbstract ui)
 {
     api.ManContentEvent += new API.ManContentHandler(ui.manUpdate);
     tm.TaskChangeEvent += new TaskManager.TaskChangeHandler(ui.onTaskChange);
     tm.refreshDisplay();
 }