public Presenter(IView view, ILogProviderFactory factory, ILogSourcesController model)
 {
     this.view    = view;
     this.factory = (WindowsEventLog.Factory)factory;
     this.model   = model;
     view.SetEventsHandler(this);
 }
		public DragDropHandler(
			ILogSourcesPreprocessingManager preprocessingManager,
			IPreprocessingStepsFactory preprocessingStepsFactory,
			ILogSourcesController model)
		{
			this.preprocessingManager = preprocessingManager;
			this.preprocessingStepsFactory = preprocessingStepsFactory;
			this.model = model;
		}
 public DragDropHandler(
     ILogSourcesController logSourcesController,
     ILogSourcesPreprocessingManager preprocessingManager,
     IPreprocessingStepsFactory preprocessingStepsFactory)
 {
     this.logSourcesController      = logSourcesController;
     this.preprocessingManager      = preprocessingManager;
     this.preprocessingStepsFactory = preprocessingStepsFactory;
 }
Exemple #4
0
 public Model(
     IInvokeSynchronization threadSync,
     Telemetry.ITelemetryCollector telemetryCollector,
     Persistence.IWebContentCache webCache,
     Persistence.IContentCache contentCache,
     Persistence.IStorageManager storageManager,
     IBookmarks bookmarks,
     ILogSourcesManager sourcesManager,
     IModelThreads threads,
     ITempFilesManager tempFilesManager,
     Preprocessing.IPreprocessingManagerExtensionsRegistry preprocessingManagerExtentionsRegistry,
     Preprocessing.ILogSourcesPreprocessingManager logSourcesPreprocessingManager,
     Preprocessing.IPreprocessingStepsFactory preprocessingStepsFactory,
     Progress.IProgressAggregator progressAggregator,
     ILogProviderFactoryRegistry logProviderFactoryRegistry,
     IUserDefinedFormatsManager userDefinedFormatsManager,
     MRU.IRecentlyUsedEntities mru,
     Progress.IProgressAggregatorFactory progressAggregatorsFactory,
     IHeartBeatTimer heartbeat,
     ILogSourcesController logSourcesController,
     IShutdown shutdown,
     WebBrowserDownloader.IDownloader webBrowserDownloader,
     AppLaunch.ICommandLineHandler commandLineHandler,
     Postprocessing.IPostprocessorsManager postprocessorsManager,
     Postprocessing.IUserNamesProvider analyticsShortNames,
     Analytics.TimeSeries.ITimeSeriesTypesAccess timeSeriesTypes,
     Postprocessing.IAggregatingLogSourceNamesProvider logSourceNamesProvider
     )
 {
     this.ModelThreadSynchronization = threadSync;
     this.Telemetry        = telemetryCollector;
     this.WebContentCache  = webCache;
     this.ContentCache     = contentCache;
     this.StorageManager   = storageManager;
     this.Bookmarks        = bookmarks;
     this.SourcesManager   = sourcesManager;
     this.Threads          = threads;
     this.TempFilesManager = tempFilesManager;
     this.PreprocessingManagerExtensionsRegistry = preprocessingManagerExtentionsRegistry;
     this.PreprocessingStepsFactory      = preprocessingStepsFactory;
     this.LogSourcesPreprocessingManager = logSourcesPreprocessingManager;
     this.ProgressAggregator             = progressAggregator;
     this.LogProviderFactoryRegistry     = logProviderFactoryRegistry;
     this.UserDefinedFormatsManager      = userDefinedFormatsManager;
     this.ProgressAggregatorsFactory     = progressAggregatorsFactory;
     this.MRU                    = mru;
     this.Heartbeat              = heartbeat;
     this.LogSourcesController   = logSourcesController;
     this.Shutdown               = shutdown;
     this.WebBrowserDownloader   = webBrowserDownloader;
     this.CommandLineHandler     = commandLineHandler;
     this.PostprocessorsManager  = postprocessorsManager;
     this.ShortNames             = analyticsShortNames;
     this.TimeSeriesTypes        = timeSeriesTypes;
     this.LogSourceNamesProvider = logSourceNamesProvider;
 }
        public Presenter(
            IView view,
            IFileBasedLogProviderFactory factory,
            ILogSourcesController model,
            IAlertPopup alerts,
            IFileDialogs fileDialogs
            )
        {
            this.view        = view;
            this.factory     = factory;
            this.model       = model;
            this.alerts      = alerts;
            this.fileDialogs = fileDialogs;

            view.SetEventsHandler(this);
        }
Exemple #6
0
        public Presenter(
            ILogSourcesController logSourcesController,
            IView view,
            Preprocessing.ILogSourcesPreprocessingManager sourcesPreprocessingManager,
            Preprocessing.IPreprocessingStepsFactory preprocessingStepsFactory,
            MRU.IRecentlyUsedEntities mru,
            QuickSearchTextBox.IPresenter searchBoxPresenter,
            IAlertPopup alerts
            )
        {
            this.view = view;
            this.logSourcesController        = logSourcesController;
            this.sourcesPreprocessingManager = sourcesPreprocessingManager;
            this.preprocessingStepsFactory   = preprocessingStepsFactory;
            this.mru = mru;
            this.searchBoxPresenter = searchBoxPresenter;
            this.trace  = new LJTraceSource("UI", "hist-dlg");
            this.alerts = alerts;

            searchBoxPresenter.OnSearchNow += (s, e) =>
            {
                UpdateItems();
                FocusItemsListAndSelectFirstItem();
            };
            searchBoxPresenter.OnRealtimeSearch += (s, e) => UpdateItems();
            searchBoxPresenter.OnCancelled      += (s, e) =>
            {
                if (itemsFiltered)
                {
                    UpdateItems();
                    searchBoxPresenter.Focus(null);
                }
                else
                {
                    view.Hide();
                }
            };

            view.SetEventsHandler(this);
        }
Exemple #7
0
        public Presenter(
            ILogSourcesManager logSources,
            IUserDefinedFormatsManager udfManager,
            IRecentlyUsedEntities mru,
            Preprocessing.ILogSourcesPreprocessingManager logSourcesPreprocessings,
            ILogSourcesController logSourcesController,
            IView view,
            Preprocessing.IPreprocessingStepsFactory preprocessingStepsFactory,
            Workspaces.IWorkspacesManager workspacesManager,
            SourcesList.IPresenter sourcesListPresenter,
            NewLogSourceDialog.IPresenter newLogSourceDialogPresenter,
            IHeartBeatTimer heartbeat,
            SharingDialog.IPresenter sharingDialogPresenter,
            HistoryDialog.IPresenter historyDialogPresenter,
            IPresentersFacade facade,
            SourcePropertiesWindow.IPresenter sourcePropertiesWindowPresenter,
            IAlertPopup alerts
            )
        {
            this.logSources           = logSources;
            this.udfManager           = udfManager;
            this.logSourcesController = logSourcesController;
            this.mru  = mru;
            this.view = view;
            this.logSourcesPreprocessings    = logSourcesPreprocessings;
            this.preprocessingStepsFactory   = preprocessingStepsFactory;
            this.workspacesManager           = workspacesManager;
            this.newLogSourceDialogPresenter = newLogSourceDialogPresenter;
            this.sourcesListPresenter        = sourcesListPresenter;
            this.tracer = new LJTraceSource("UI", "smgr-ui");
            this.sharingDialogPresenter          = sharingDialogPresenter;
            this.historyDialogPresenter          = historyDialogPresenter;
            this.sourcePropertiesWindowPresenter = sourcePropertiesWindowPresenter;
            this.alerts           = alerts;
            this.presentersFacade = facade;

            sourcesListPresenter.DeleteRequested += delegate(object sender, EventArgs args)
            {
                DeleteSelectedSources();
            };
            logSources.OnLogSourceAdded += (sender, args) =>
            {
                UpdateRemoveAllButton();
            };
            logSources.OnLogSourceRemoved += (sender, args) =>
            {
                updateTracker.Invalidate();
                UpdateRemoveAllButton();
            };
            logSourcesPreprocessings.PreprocessingAdded += (sender, args) =>
            {
                updateTracker.Invalidate();
                UpdateRemoveAllButton();
                if ((args.LogSourcePreprocessing.Flags & PreprocessingOptions.HighlightNewPreprocessing) != 0)
                {
                    preprocessingAwaitingHighlighting = args.LogSourcePreprocessing;
                }
            };
            logSourcesPreprocessings.PreprocessingDisposed += (sender, args) =>
            {
                updateTracker.Invalidate();
                UpdateRemoveAllButton();
            };
            logSourcesPreprocessings.PreprocessingChangedAsync += (sender, args) =>
            {
                updateTracker.Invalidate();
            };
            sourcesListPresenter.SelectionChanged += delegate(object sender, EventArgs args)
            {
                bool anySourceSelected  = sourcesListPresenter.SelectedSources.Any();
                bool anyPreprocSelected = sourcesListPresenter.SelectedPreprocessings.Any();
                view.EnableDeleteSelectedSourcesButton(anySourceSelected || anyPreprocSelected);
                view.EnableTrackChangesCheckBox(anySourceSelected);
                UpdateTrackChangesCheckBox();
                view.SetPropertiesButtonState(
                    sourcePropertiesWindowPresenter != null && sourcesListPresenter.SelectedSources.Count() == 1);
            };

            logSources.OnLogSourceVisiblityChanged += (sender, args) =>
            {
                updateTracker.Invalidate();
            };
            logSources.OnLogSourceAnnotationChanged += (sender, args) =>
            {
                updateTracker.Invalidate();
            };
            logSources.OnLogSourceTrackingFlagChanged += (sender, args) =>
            {
                updateTracker.Invalidate();
            };
            logSources.OnLogSourceStatsChanged += (sender, args) =>
            {
                if ((args.Flags & (LogProviderStatsFlag.Error | LogProviderStatsFlag.CachedMessagesCount | LogProviderStatsFlag.State | LogProviderStatsFlag.BytesCount | LogProviderStatsFlag.BackgroundAcivityStatus)) != 0)
                {
                    updateTracker.Invalidate();
                }
            };
            heartbeat.OnTimer += (sender, args) =>
            {
                if (updateTracker.Validate())
                {
                    UpdateView();
                }
            };

            this.sharingDialogPresenter.AvailabilityChanged += (sender, args) =>
            {
                UpdateShareButton();
            };
            this.sharingDialogPresenter.IsBusyChanged += (sender, args) =>
            {
                UpdateShareButton();
            };

            view.SetPresenter(this);

            UpdateShareButton();
        }
Exemple #8
0
 public Presenter(IView view, ILogProviderFactory factory, ILogSourcesController model)
 {
     this.view    = view;
     this.factory = factory;
     this.model   = model;
 }