Beispiel #1
0
 private static void ConfigureItemListControl(ItemListControl control)
 {
     control.Dock = DockStyle.Fill;
     control.Location = new System.Drawing.Point(3, 3);
     control.Size = new System.Drawing.Size(507, 517);
     control.TabIndex = 0;
 }
Beispiel #2
0
        public static MainWindow GetMainWindow()
        {
            var inbox_view = new ItemListControl();
            var actions_view = new ItemListControl();
            var window = new MainWindow(inbox_view, actions_view);

            var inbox_model = ObjectFactory.GetInstance<IItemModel<InBoxItem>>();
            var action_model = ObjectFactory.GetInstance<IItemModel<ActionItem>>();
            var converter = new ItemConverter(inbox_model, action_model);
            new InBoxController(window.InBoxControls, window, inbox_model, converter, window);
            new ActionsListController(window.ActionControls, window, action_model, window);

            new MainWindowController(window, inbox_view, actions_view);

            return window;
        }
Beispiel #3
0
        public MainWindow(ItemListControl inbox_view, ItemListControl actions_view)
        {
            InitializeComponent();
            _inbox_controls = inbox_view;
            _actions_controls = actions_view;
            _inbox_tab.Controls.Add(_inbox_controls);
            _actions_tab.Controls.Add(_actions_controls);
            ConfigureItemListControl(_inbox_controls);
            ConfigureItemListControl(_actions_controls);

            _tab_control.SelectedIndexChanged += delegate { RaiseEvent(SelectedTabChanged); };
            _inbox_controls.AddButtonWasClicked += () => RaiseEvent(AddButtonWasClicked);
            _inbox_controls.DeleteButtonWasClicked += () => RaiseEvent(DeleteButtonWasClicked);
            _actions_controls.AddButtonWasClicked += () => RaiseEvent(AddButtonWasClicked);
            _actions_controls.DeleteButtonWasClicked += () => RaiseEvent(DeleteButtonWasClicked);

            KeyPreview = true;
            KeyDown += RouteKeyDownEvents;
        }