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); }
public InventoryProductEditorPresenter(UCInventoryProductEditor ipe) { inventoryProductEditor = ipe; inventoryDAL = new InventoryDAL(); inventoryItems = new InventoryItem(); inventoryItemsOrig = new InventoryItem(); // Image Clicked EventAggregator.Instance.Subscribe <InventoryProductDetails>(OnParentProductSelected); EventAggregator.Instance.Subscribe <InventoryProductEditorLockColumns>(SetLockColumns); EventAggregator.Instance.Subscribe <InventoryProductEditorSave>(UpdateDB); EventAggregator.Instance.Subscribe <InventoryProductEditorUndoChanges>(UndoChanges); }