public MainView(IPresenterFactory presenterFactory) { _notebook = presenterFactory.InstantiatePresenter<MainNotebook>(); _notebook.Add(presenterFactory.InstantiatePresenter<MenuPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter<ModsPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter<BlueprintsPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter<SavegamesPageView>(this)); _notebook.Add(presenterFactory.InstantiatePresenter<TasksPageView>(this)); PackStart(presenterFactory.InstantiatePresenter<MainHeaderView>()); var sideBox = new VBox { MinWidth = 280, WidthRequest = 280 }; _sidebarContainer = new SidebarContainer(); sideBox.PackStart(_sidebarContainer, true, true); var box = new HBox(); box.PackStart(_notebook, true); box.PackEnd(sideBox); PackStart(box, true, true); _notebook.HandleSizeChangeOnTabChange = true; _notebook.HandleSizeUpdate(); }
public MainWindow(IPresenterFactory presenterFactory) { Title = "ParkitectNexus Client"; Width = 950; Height = 650; Icon = App.Images["parkitectnexus_logo-64x64.png"]; Content = presenterFactory.InstantiatePresenter<MainView>(); }
public App(IPresenterFactory presenterFactory, IParkitect parkitect, IQueueableTaskManager taskManager, ILogger log, IUpdateManager updateManager, Migrator migrator) { _migrator = migrator; _presenterFactory = presenterFactory; _parkitect = parkitect; _taskManager = taskManager; _log = log; _updateManager = updateManager; }
public DentalSurgeryVisitPresenter(IRepositoryFactory repositoryFactory, IPresenterFactory presenterFactory) { this.repositoryFactory = repositoryFactory; this.presenterFactory = presenterFactory; }
static IPresenter BuildPresenter( HttpContextBase httpContext, ITraceContext traceContext, IMessageBus messageBus, Action<IPresenter> presenterCreatedCallback, IPresenterFactory presenterFactory, PresenterBinding binding, IView viewInstance) { traceContext.Write(typeof(PresenterBinder), () => string.Format( CultureInfo.InvariantCulture, "Creating presenter of type {0} for view of type {1}. (The actual view instance is of type {2}.)", binding.PresenterType.FullName, binding.ViewType.FullName, viewInstance.GetType().FullName)); var presenter = presenterFactory.Create(binding.PresenterType, binding.ViewType, viewInstance); presenter.HttpContext = httpContext; presenter.Messages = messageBus; if (presenterCreatedCallback != null) { presenterCreatedCallback(presenter); } return presenter; }
public GPPresenter getGPPresenter(Patient patient, IRepositoryFactory factory, IPresenterFactory presenterFactory) { return(new GPPresenter(patient, factory, presenterFactory)); }
public MainPresenter(MainGridModel mainGridModel, IMainView view, IMessagesView messagesView, IViewFactory viewFactory, IMessageBoxView messageBoxView, UserStatsDataModel userStatsDataModel, IPresenterFactory presenterFactory, IClientConfiguration clientConfiguration, IProteinService proteinService, IUpdateLogic updateLogic, RetrievalModel retrievalModel, IExternalProcessStarter processStarter, IPreferenceSet prefs, IClientSettingsManager settingsManager) { _gridModel = mainGridModel; //_gridModel.BeforeResetBindings += delegate { _view.DataGridView.FreezeSelectionChanged = true; }; _gridModel.AfterResetBindings += delegate { //_view.DataGridView.FreezeSelectionChanged = false; DisplaySelectedSlotData(); _view.RefreshControlsWithTotalsData(_gridModel.SlotTotals); }; _gridModel.SelectedSlotChanged += (sender, e) => { if (e.Index >= 0 && e.Index < _view.DataGridView.Rows.Count) { _view.DataGridView.Rows[e.Index].Selected = true; DisplaySelectedSlotData(); } }; _userStatsDataModel = userStatsDataModel; // Views _view = view; _messagesView = messagesView; _messageBoxView = messageBoxView; // _viewFactory = viewFactory; _presenterFactory = presenterFactory; // Collections _clientConfiguration = clientConfiguration; _proteinService = proteinService; // Logic Services _updateLogic = updateLogic; _updateLogic.Owner = _view; _retrievalModel = retrievalModel; _processStarter = processStarter; // Data Services _prefs = prefs; _settingsManager = settingsManager; _clientConfiguration.DictionaryChanged += delegate { AutoSaveConfig(); }; }
static IEnumerable<IPresenter> BuildPresenters( HttpContextBase httpContext, ITraceContext traceContext, IMessageBus messageBus, Action<IPresenter> presenterCreatedCallback, IPresenterFactory presenterFactory, IEnumerable<PresenterBinding> bindings) { return bindings .SelectMany(binding => BuildPresenters( httpContext, traceContext, messageBus, presenterCreatedCallback, presenterFactory, binding)); }
private static IPresenter BuildPresenter( Action<IPresenter> presenterCreatedCallback, //IAppState appState, IPresenterFactory presenterFactory, IEnumerable<PresenterBinding> bindings) { return bindings .Select(binding => BuildPresenters( presenterCreatedCallback, //appState, presenterFactory, binding)).ToList().First(); }
private static IPresenter BuildPresenters( Action<IPresenter> presenterCreatedCallback, //IAppState appState, IPresenterFactory presenterFactory, PresenterBinding binding) { IView viewToCreateFor = binding.ViewInstance; return BuildPresenter( presenterCreatedCallback, //appState, presenterFactory, binding, viewToCreateFor); }
public ApplicationController(IPresenterFactory factory) { _factory = factory; }
protected WebControlView(IPresenterFactory presenterFactory) { PresenterFactory = presenterFactory; }
public StaffServicesPresenter getStaffServicesPresenter(IPresenterFactory presenterFactory, IRepositoryFactory repositoryFactory) { return(new StaffServicesPresenter(presenterFactory, repositoryFactory)); }
public DentalSurgeryVisitPresenter getDentalSurgeryVisitPresenter(IRepositoryFactory repositoryFactory, IPresenterFactory presenterFactory) { return(new DentalSurgeryVisitPresenter(repositoryFactory, presenterFactory)); }
public RecordTreatmentPresenter getRecordTreatmentPresenter(IPresenterFactory presenterFactory, ITreatmentPlanRepository treatmentPlanRepository) { return(new RecordTreatmentPresenter(presenterFactory, treatmentPlanRepository)); }
public QuestionnairePresenter getQuestionnairePresenter(Patient patient, IPresenterFactory presenterFactory, IRepositoryFactory repositoryFactory) { return(new QuestionnairePresenter(patient, presenterFactory, repositoryFactory)); }
public PatientPresenter getPatientPresenter( IPresenterFactory presenterFactory, IRepositoryFactory repositoryFactory) { return(new PatientPresenter(presenterFactory, repositoryFactory)); }
protected NavigationState(IPresenterFactory presenterFactory) => PresenterFactory = presenterFactory;
public WpfStartUpState(IPresenterFactory presenterFactory, IApplicationData appState) : base(presenterFactory) { _appState = appState; }
public RadiantDentalPracticePresenter( IPresenterFactory presenterFactory, IRepositoryFactory repositoryFactory) { this.presenterFactory = presenterFactory; this.repositoryFactory = repositoryFactory; }
protected StartUpState(IPresenterFactory presenterFactory) : base(presenterFactory) { }
private static IPresenter BuildPresenter( Action<IPresenter> presenterCreatedCallback, //IAppState appState, IPresenterFactory presenterFactory, PresenterBinding binding, IView viewInstance) { Tracing.Verbose( "Creating presenter of type {0} for view of type {1}. (The actual view instance is of type {2}.)", binding.PresenterType.FullName, binding.ViewType.FullName, viewInstance.GetType().FullName ); var presenter = presenterFactory.Create(binding.PresenterType, binding.ViewType, viewInstance); //presenter.Items = appState; if (presenterCreatedCallback != null) { presenterCreatedCallback(presenter); } return presenter; }
public RecordTreatmentPresenter(IPresenterFactory presenterFactory, ITreatmentPlanRepository treatmentPlanRepository) { this.treatmentPlanRepository = treatmentPlanRepository; this.presenterFactory = presenterFactory; }
private static IPresenter PerformBinding( IView candidate, IPresenterDiscoveryStrategy presenterDiscoveryStrategy, IAppState appState, Action<IPresenter> presenterCreatedCallback, IPresenterFactory presenterFactory) { var bindings = GetBindings( candidate, presenterDiscoveryStrategy); var newPresenter = BuildPresenter( presenterCreatedCallback, //appState, presenterFactory, new[] {bindings}); return newPresenter; }
public MainPresenter(MainGridModel mainGridModel, IMainView view, IMessagesView messagesView, IViewFactory viewFactory, IMessageBoxView messageBoxView, UserStatsDataModel userStatsDataModel, IPresenterFactory presenterFactory, IClientConfiguration clientConfiguration, IProteinService proteinService, IUpdateLogic updateLogic, Core.ScheduledTasks.RetrievalModel retrievalModel, IExternalProcessStarter processStarter, IPreferenceSet prefs, ClientSettingsManager settingsManager) { _gridModel = mainGridModel; _gridModel.AfterResetBindings += (sender, e) => { // run asynchronously so binding operation can finish _view.BeginInvoke(new Action(() => { DisplaySelectedSlotData(); _view.RefreshControlsWithTotalsData(_gridModel.SlotTotals); }), null); }; _gridModel.SelectedSlotChanged += (sender, e) => { if (e.Index >= 0 && e.Index < _view.DataGridView.Rows.Count) { // run asynchronously so binding operation can finish _view.BeginInvoke(new Action(() => { _view.DataGridView.Rows[e.Index].Selected = true; DisplaySelectedSlotData(); }), null); } }; _userStatsDataModel = userStatsDataModel; // Views _view = view; _messagesView = messagesView; _messageBoxView = messageBoxView; // _viewFactory = viewFactory; _presenterFactory = presenterFactory; // Collections _clientConfiguration = clientConfiguration; _proteinService = proteinService; // Logic Services _updateLogic = updateLogic; _updateLogic.Owner = _view; _retrievalModel = retrievalModel; _processStarter = processStarter; // Data Services _prefs = prefs; _settingsManager = settingsManager; _clientConfiguration.ConfigurationChanged += delegate { AutoSaveConfig(); }; }
static IEnumerable<IPresenter> PerformBinding( IEnumerable<object> hosts, IEnumerable<IView> candidates, IPresenterDiscoveryStrategy presenterDiscoveryStrategy, HttpContextBase httpContext, ITraceContext traceContext, IMessageBus messageBus, Action<IPresenter> presenterCreatedCallback, IPresenterFactory presenterFactory) { var bindings = GetBindings( hosts, candidates, presenterDiscoveryStrategy, traceContext); var newPresenters = BuildPresenters( httpContext, traceContext, messageBus, presenterCreatedCallback, presenterFactory, bindings); return newPresenters; }
public Output(IPresenterFactory presenterFactory, IEnumerable <IOutputStream> streams) { _streams = streams.ToList(); PresenterFactory = presenterFactory; }
static IEnumerable<IPresenter> BuildPresenters( HttpContextBase httpContext, ITraceContext traceContext, IMessageBus messageBus, Action<IPresenter> presenterCreatedCallback, IPresenterFactory presenterFactory, PresenterBinding binding) { IEnumerable<IView> viewsToCreateFor; switch (binding.BindingMode) { case BindingMode.Default: viewsToCreateFor = binding.ViewInstances; break; case BindingMode.SharedPresenter: viewsToCreateFor = new[] { CreateCompositeView(binding.ViewType, binding.ViewInstances, traceContext) }; break; default: throw new NotSupportedException(string.Format( CultureInfo.InvariantCulture, "Binding mode {0} is not supported by this method.", binding.BindingMode)); } return viewsToCreateFor.Select(viewInstance => BuildPresenter( httpContext, traceContext, messageBus, presenterCreatedCallback, presenterFactory, binding, viewInstance)); }
public StaffServicesPresenter(IPresenterFactory presenterFactory, IRepositoryFactory repositoryFactory) { this.presenterFactory = presenterFactory; this.repositoryFactory = repositoryFactory; }
public MainViewPresenterFacade(IPresenterFactory<IPresenter<ICreateView>> createPresenterFactory, IPresenterFactory<IPresenter<IDetailView>> detailPresenterFactory) { _createPresenterFactory = createPresenterFactory; _detailPresenterFactory = detailPresenterFactory; }
public WelcomeState(IPresenterFactory presenterFactory) : base(presenterFactory) => _presenter = PresenterFactory.Build <WelcomePresenter>();