Ejemplo n.º 1
0
        private IWorkspacePresenter _currentPresenter; // TODO: replace this with tab views or similar if multipage design needed

        public MainFormPresenter(IMainView view, IViewsProviders providers, ConfigurationManager configmgr)
        {
            _mainView                  = view;
            _mainView.OpenClicked     += OnOpenClicked;
            _mainView.ExportClicked   += OnExportClicked;
            _mainView.HelpClicked     += OnHelpClicked;
            _mainView.SettingsClicked += OnSettingsClicked;
            _mainView.DisplayClicked  += OnDisplayClicked;
            _providers                 = providers;
            _factory = new WorkspacePresenterFactory(providers, configmgr);
        }
Ejemplo n.º 2
0
 public WorkspacePresenterFactory(IViewsProviders providers, ConfigurationManager configmrg)
 {
     _providers = providers;
     _configmgr = configmrg;
     _registry  = new Dictionary <ReportTypes, Func <IWorkspacePresenter> >
     {
         // register here
         { ReportTypes.EPTReport,
           () => new EPTPresenter(_providers[ReportTypes.EPTReport], _configmgr[ReportTypes.EPTReport]) }
     };
 }