Exemple #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //
            // Create Dependancies
            //

            // User Controls / Presenters
            var ucInventorySearchBar = new UCInventorySearchBar();

            ucInventorySearchBar.Tag = new InventorySearchBarPresenter(ucInventorySearchBar);

            var ucInventorySearchResults = new UCInventorySearchResults();

            ucInventorySearchResults.Tag = new InventorySearchResultsPresenter(ucInventorySearchResults);

            var ucInventoryProductEditor = new UCInventoryProductEditor();

            ucInventoryProductEditor.presenter = new InventoryProductEditorPresenter(ucInventoryProductEditor);

            var inventoryView = new UCInventoryView(ucInventorySearchBar, ucInventorySearchResults, ucInventoryProductEditor);

            inventoryView.Tag = new InventoryPresenter(inventoryView);

            // Main Form
            var mainForm = new MainForm(inventoryView);

            mainForm.Tag = new MainFormPresenter(mainForm);

            // Start Application
            Application.Run(mainForm);
        }
Exemple #2
0
 public InventorySearchBarPresenter(UCInventorySearchBar isb)
 {
     inventorySearchBar = isb;
     EventAggregator.Instance.Subscribe <InventoryProductSearch>(OnSetSearchBarFocus);
 }