public StaticCommandList() { InitializeComponent(); _myContext = new MyContext(); var historyBrowserConfiguation = IoC.Resolve <IHistoryBrowserConfiguration>(); var historyManagerRetriever = IoC.Resolve <IHistoryManagerRetriever>(); historyBrowserConfiguation.AddDynamicColumn("p1", "A wonderful p1"); historyBrowserConfiguation.AddDynamicColumn("p2", "A great p2"); HistoryColumns.ColumnByName("p1").Position = 0; HistoryColumns.User.Position = 1; HistoryColumns.Description.Position = 2; HistoryColumns.ColumnByName("p2").Position = 3; HistoryColumns.Description.Position = 4; HistoryColumns.State.Position = 5; _historyManager = historyManagerRetriever.Current; _historyBrowserPresenter = IoC.Resolve <IHistoryBrowserPresenter>(); _historyBrowserPresenter.Initialize(); var control = _historyBrowserPresenter.View as Control; control.Dock = DockStyle.Fill; panelControl1.Controls.Add(control); _historyBrowserPresenter.HistoryManager = _historyManager; _historyBrowserPresenter.UpdateHistory(); }
public HistoryPresenter(IMoBiContext context, IHistoryBrowserPresenter historyBrowserPresenter, IRegionResolver regionResolver, IApplicationConfiguration applicationConfiguration, IDisplayNameProvider displayNameProvider) { _context = context; _historyBrowserPresenter = historyBrowserPresenter; _regionResolver = regionResolver; _applicationConfiguration = applicationConfiguration; _displayNameProvider = displayNameProvider; _historyBrowserPresenter.EnableHistoryPruning = false; }
public HistoryPresenter(IHistoryBrowserPresenter historyBrowserPresenter, IWorkspace workspace, IRegionResolver regionResolver, IExecutionContext executionContext, IApplicationConfiguration applicationConfiguration) { _historyBrowserPresenter = historyBrowserPresenter; _workspace = workspace; _executionContext = executionContext; _applicationConfiguration = applicationConfiguration; _initialized = false; _region = regionResolver.RegionWithName(RegionNames.History); _region.Add(_historyBrowserPresenter.View); }
protected override void Context() { _region = A.Fake <IRegion>(); _historyBrowserPresenter = A.Fake <IHistoryBrowserPresenter>(); _workspace = A.Fake <IWorkspace>(); _regionResolver = A.Fake <IRegionResolver>(); _executionContext = A.Fake <IExecutionContext>(); _configuration = A.Fake <IApplicationConfiguration>(); A.CallTo(() => _regionResolver.RegionWithName(RegionNames.History)).Returns(_region); sut = new HistoryPresenter(_historyBrowserPresenter, _workspace, _regionResolver, _executionContext, _configuration); }
public void AttachPresenter(IHistoryBrowserPresenter presenter) { _presenter = presenter; }