public Factory( IAlertPopup alerts, IFileDialogs fileDialogs, Help.IPresenter help, ILogProviderFactoryRegistry registry, IFormatDefinitionsRepository repo, IUserDefinedFormatsManager userDefinedFormatsManager, ITempFilesManager tempFilesManager, ITraceSourceFactory traceSourceFactory, RegularExpressions.IRegexFactory regexFactory, LogViewer.IPresenterFactory logViewerPresenterFactory, IViewsFactory viewFactories, ISynchronizationContext synchronizationContext, FieldsProcessor.IFactory fieldsProcessorFactory ) { this.viewFactories = viewFactories; this.alerts = alerts; this.registry = registry; this.fileDialogs = fileDialogs; this.userDefinedFormatsManager = userDefinedFormatsManager; this.help = help; this.repo = repo; this.tempFilesManager = tempFilesManager; this.logViewerPresenterFactory = logViewerPresenterFactory; this.traceSourceFactory = traceSourceFactory; this.regexFactory = regexFactory; this.synchronizationContext = synchronizationContext; this.fieldsProcessorFactory = fieldsProcessorFactory; }
public FormMain() { InitializeComponent(); DisableSideMenu(); Presenter = new PrMain(this, new MainModel()); FileDlgs = new FileDialogs(); }
public Presenter( ILogSourcesManager logSources, IView view, ILogSourcesPreprocessingManager logSourcesPreprocessings, SourcePropertiesWindow.IPresenter propertiesWindowPresenter, LogViewer.IPresenter logViewerPresenter, IPresentersFacade navHandler, IAlertPopup alerts, IFileDialogs fileDialogs, IClipboardAccess clipboard, IShellOpen shellOpen, SaveJointLogInteractionPresenter.IPresenter saveJointLogInteractionPresenter ) { this.logSources = logSources; this.view = view; this.propertiesWindowPresenter = propertiesWindowPresenter; this.logViewerPresenter = logViewerPresenter; this.logSourcesPreprocessings = logSourcesPreprocessings; this.alerts = alerts; this.fileDialogs = fileDialogs; this.clipboard = clipboard; this.shellOpen = shellOpen; this.saveJointLogInteractionPresenter = saveJointLogInteractionPresenter; logViewerPresenter.FocusedMessageChanged += (sender, args) => { view.InvalidateFocusedMessageArea(); }; view.SetPresenter(this); }
public OrdersAveragePresenter(IOrdersAverageView view, IOrdersQueries ordersQueries, IFileDialogs fileDialogs) { _view = view; _ordersQueries = ordersQueries; _fileDialogs = fileDialogs; _view.Load += OnLoad; _view.Save += new EventHandler(async(s, e) => await OnSaveAsync(s, e)); }
public AllOrdersPresenter(IAllOrdersView view, IOrdersQueries ordersQueries, IFileDialogs fileDialogs) { _view = view; _ordersQueries = ordersQueries; _fileDialogs = fileDialogs; _view.Load += OnLoad; _view.Save += new EventHandler(async(s, e) => await OnSaveAsync(s, e)); _view.SelectedOrderChanged += OnSelectedOrderChanged; }
public OrdersQuantityForClientPresenter(IOrdersQuantityForClientView view, IOrdersQueries ordersQueries, IFileDialogs fileDialogs) { _view = view; _ordersQueries = ordersQueries; _fileDialogs = fileDialogs; _view.Load += OnLoad; _view.Save += new EventHandler(async(s, e) => await OnSaveAsync(s, e)); _view.Generate += OnGenerate; }
public Presenter( IView view, IFileDialogs fileDialogs, IAlertPopup alerts ) { this.view = view; this.fileDialogs = fileDialogs; this.alerts = alerts; this.view.SetEventsHandler(this); }
public OrdersInPriceRangePresenter(IOrdersInPriceRangeView view, IOrdersQueries ordersQueries, IFileDialogs fileDialogs) { _view = view; _ordersQueries = ordersQueries; _fileDialogs = fileDialogs; _errorMessage = new List <string>(); _view.Load += OnLoad; _view.Save += new EventHandler(async(s, e) => await OnSaveAsync(s, e)); _view.Generate += OnGenerate; _view.SelectedOrderChanged += OnSelectedOrderChanged; _view.InputDataChanged += OnInputDataChanged; }
public Exporter([NotNull] ISerializer serializer, [NotNull] IFileDialogs fileDialogs) { if (serializer == null) { throw new ArgumentNullException(nameof(serializer)); } if (fileDialogs == null) { throw new ArgumentNullException(nameof(fileDialogs)); } this.serializer = serializer; this.fileDialogs = fileDialogs; }
public Presenter( IView view, IWizardScenarioHost host, IAlertPopup alerts, IFileDialogs fileDialogs ) { this.view = view; this.view.SetEventsHandler(this); this.host = host; this.alerts = alerts; this.fileDialogs = fileDialogs; }
public static PresentationObjects Create( ModelObjects model, IClipboardAccess clipboardAccess, IShellOpen shellOpen, IAlertPopup alertPopup, IFileDialogs fileDialogs, IPromptDialog promptDialog, About.IAboutConfig aboutConfig, MainForm.IDragDropHandler dragDropHandler, ISystemThemeDetector systemThemeDetector, IViewsFactory views ) { T callOptionalFactory <T>(Func <T> factory) where T : class
public Presenter( IView view, IAlertPopup alerts, IFileDialogs fileDialogs, ITempFilesManager tempFilesManager, Help.IPresenter help ) { this.dialog = view; this.alerts = alerts; this.fileDialogs = fileDialogs; this.tempFilesManager = tempFilesManager; this.help = help; this.dialog.SetEventsHandler(this); }
public Presenter( IView view, IAlertPopup alerts, IFileDialogs fileDialogs, FieldsProcessor.IFactory fieldsProcessorFactory, Help.IPresenter help ) { this.dialog = view; this.alerts = alerts; this.fileDialogs = fileDialogs; this.fieldsProcessorFactory = fieldsProcessorFactory; this.help = help; this.dialog.SetEventsHandler(this); }
public Presenter( ILogSourcesManager logSources, IShutdown shutdown, Progress.IProgressAggregatorFactory progressFactory, IAlertPopup alerts, IFileDialogs fileDialogs, StatusReports.IPresenter statusReport ) { this.logSources = logSources; this.shutdown = shutdown; this.progressFactory = progressFactory; this.alerts = alerts; this.fileDialogs = fileDialogs; this.statusReport = statusReport; }
public Presenter( IView view, IFileBasedLogProviderFactory factory, ILogSourcesManager model, IAlertPopup alerts, IFileDialogs fileDialogs ) { this.view = view; this.factory = factory; this.model = model; this.alerts = alerts; this.fileDialogs = fileDialogs; view.SetEventsHandler(this); }
public MainPresenter( IMainView view, IOrdersInMemoryDb orders, IReportPresentersFactory reportPresenterFactory, IFileDialogs fileDialogs) { _view = view; _orders = orders; _reportPresenterFactory = reportPresenterFactory; _fileDialogs = fileDialogs; _view.LoadDatabase += new EventHandler(async(s, e) => await OnLoadDatabaseAsync(s, e)); _view.ResetDatabase += OnResetDatabase; _view.ShowReport += OnShowReport; _view.ShowDatabaseReport += OnShowDatabaseReport; _view.DatabaseLoaded = false; }
public ObjectsFactory( IAlertPopup alerts, IFileDialogs fileDialogs, Help.IPresenter help, ILogProviderFactoryRegistry registry, IFormatDefinitionsRepository repo, IUserDefinedFormatsManager userDefinedFormatsManager, ITempFilesManager tempFilesManager, LogViewer.IPresenterFactory logViewerPresenterFactory, ViewFactories viewFactories ) { this.viewFactories = viewFactories; this.alerts = alerts; this.registry = registry; this.fileDialogs = fileDialogs; this.userDefinedFormatsManager = userDefinedFormatsManager; this.help = help; this.repo = repo; this.tempFilesManager = tempFilesManager; this.logViewerPresenterFactory = logViewerPresenterFactory; }
public Presenter( IView view, IUserDefinedSearches userDefinedSearches, IAlertPopup alerts, IFileDialogs fileDialogs, SearchEditorDialog.IPresenter searchEditorDialog ) { this.view = view; this.userDefinedSearches = userDefinedSearches; this.alerts = alerts; this.fileDialogs = fileDialogs; this.searchEditorDialog = searchEditorDialog; userDefinedSearches.OnChanged += (sender, e) => { if (currentDialog == null) { return; } UpdateViewItems(); UpdateControls(); }; }
public Presenter( ILogSourcesManager logSources, IView view, IManager logSourcesPreprocessings, SourcePropertiesWindow.IPresenter propertiesWindowPresenter, LogViewer.IPresenterInternal logViewerPresenter, IAlertPopup alerts, IFileDialogs fileDialogs, IClipboardAccess clipboard, IShellOpen shellOpen, SaveJointLogInteractionPresenter.IPresenter saveJointLogInteractionPresenter, IColorTheme theme, IChangeNotification changeNotification, IHeartBeatTimer heartbeat ) { this.logSources = logSources; this.view = view; this.propertiesWindowPresenter = propertiesWindowPresenter; this.logSourcesPreprocessings = logSourcesPreprocessings; this.alerts = alerts; this.fileDialogs = fileDialogs; this.clipboard = clipboard; this.shellOpen = shellOpen; this.saveJointLogInteractionPresenter = saveJointLogInteractionPresenter; this.changeNotification = changeNotification; void updateItems() { itemsRevision++; changeNotification.Post(); } logSources.OnLogSourceVisiblityChanged += (s, e) => updateItems(); logSources.OnLogSourceAnnotationChanged += (s, e) => updateItems(); logSources.OnLogSourceColorChanged += (s, e) => updateItems(); logSourcesPreprocessings.PreprocessingChangedAsync += (s, e) => pendingUpdateFlag.Invalidate(); logSources.OnLogSourceStatsChanged += (s, e) => { if ((e.Flags & (LogProviderStatsFlag.Error | LogProviderStatsFlag.CachedMessagesCount | LogProviderStatsFlag.State | LogProviderStatsFlag.BytesCount | LogProviderStatsFlag.BackgroundAcivityStatus)) != 0) { pendingUpdateFlag.Invalidate(); } }; heartbeat.OnTimer += (s, e) => { if (pendingUpdateFlag.Validate()) { updateItems(); } }; this.getRoot = Selectors.Create( () => logSources.Items, () => logSourcesPreprocessings.Items, () => theme.ThreadColors, () => expandedKeys, () => selectedKeys, () => itemsRevision, (sources, preprocessings, themeColors, expanded, selected, rev) => new RootViewItem { Items = ImmutableArray.CreateRange( EnumItemsData(sources, preprocessings, themeColors, expanded, selected, logSourcesPreprocessings)) } ); this.getSelectedSources = Selectors.Create( getRoot, root => ImmutableArray.CreateRange( ViewItem.Flatten(root).Where(i => i.IsSelected).SelectMany(i => { if (i is LogSourceViewItem singleSource) { return new[] { singleSource.LogSource } } ; if (i is SourcesContainerViewItem container) { return(container.LogSources.Select(x => x.LogSource)); } return(Enumerable.Empty <ILogSource>()); }) .Distinct() ) ); this.getSelectedPreprocessings = Selectors.Create( getRoot, root => ImmutableArray.CreateRange( ViewItem.Flatten(root).OfType <PreprocessingViewItem>().Select(p => p.Preprocessing) ) ); this.getFocusedMessageItem = Selectors.Create( () => logViewerPresenter.FocusedMessage, getRoot, (msg, root) => { var ls = msg?.GetLogSource(); return((IViewItem)ViewItem.Flatten(root).FirstOrDefault( i => (i as LogSourceViewItem)?.LogSource == ls )); } ); view.SetViewModel(this); }