public PreprocessingStepsFactory(
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     WebViewTools.IWebViewTools webViewTools
     )
 {
     this.preprocessingStepsFactory = preprocessingStepsFactory;
     this.webViewTools = webViewTools;
 }
示例#2
0
 private DownloadStep(
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     WebViewTools.IWebViewTools webViewTools
     )
 {
     this.preprocessingStepsFactory = preprocessingStepsFactory;
     this.webViewTools = webViewTools;
 }
示例#3
0
 internal DownloadStep(
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     WebViewTools.IWebViewTools webViewTools,
     PreprocessingStepParams source
     ) : this(preprocessingStepsFactory, webViewTools)
 {
     this.source = source;
 }
示例#4
0
 public DragDropHandler(
     Preprocessing.IManager preprocessingManager,
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     ILogSourcesManager logSourcesManager)
 {
     this.preprocessingManager      = preprocessingManager;
     this.preprocessingStepsFactory = preprocessingStepsFactory;
     this.logSourcesManager         = logSourcesManager;
 }
示例#5
0
 internal DownloadStep(
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     WebViewTools.IWebViewTools webViewTools,
     IReadOnlyCollection <string> ids,
     DateTime referenceTime,
     string env
     ) : this(preprocessingStepsFactory, webViewTools)
 {
     source = new PreprocessingStepParams(MakeUrl(ids, referenceTime, env));
 }
示例#6
0
 public PreprocessingStepsFactory(
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     WebViewTools.IWebViewTools webViewTools,
     IContentCache contentCache
     )
 {
     this.preprocessingStepsFactory = preprocessingStepsFactory;
     this.webViewTools = webViewTools;
     this.contentCache = contentCache;
 }
示例#7
0
 private DownloadStep(
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     WebViewTools.IWebViewTools webViewTools,
     IContentCache contentCache
     )
 {
     this.preprocessingStepsFactory = preprocessingStepsFactory;
     this.webViewTools = webViewTools;
     this.contentCache = contentCache;
 }
        public Presenter(
            ILogSourcesManager logSourcesManager,
            IChangeNotification changeNotification,
            IView view,
            Preprocessing.IManager sourcesPreprocessingManager,
            Preprocessing.IStepsFactory preprocessingStepsFactory,
            MRU.IRecentlyUsedEntities mru,
            QuickSearchTextBox.IPresenter searchBoxPresenter,
            IAlertPopup alerts,
            ITraceSourceFactory traceSourceFactory
            )
        {
            this.view = view;
            this.changeNotification          = changeNotification;
            this.logSourcesManager           = logSourcesManager;
            this.sourcesPreprocessingManager = sourcesPreprocessingManager;
            this.preprocessingStepsFactory   = preprocessingStepsFactory;
            this.mru = mru;
            this.searchBoxPresenter = searchBoxPresenter;
            this.trace  = traceSourceFactory.CreateTraceSource("UI", "hist-dlg");
            this.alerts = alerts;

            items            = Selectors.Create(() => visible, () => acceptedFilter, MakeItems);
            actuallySelected = Selectors.Create(() => items().displayItems, () => selected,
                                                (items, selected) => items.SelectMany(i => i.Flatten()).Where(i => selected.Contains(i.key)).ToImmutableList());
            openButtonEnabled = Selectors.Create(actuallySelected, selected => selected.Any(IsOpenable));
            rootViewItem      = Selectors.Create(() => items().displayItems, () => selected, () => expanded, MakeRootItem);

            searchBoxPresenter.OnSearchNow += (s, e) =>
            {
                acceptedFilter = searchBoxPresenter.Text;
                FocusItemsListAndSelectFirstItem();
                changeNotification.Post();
            };
            searchBoxPresenter.OnRealtimeSearch += (s, e) =>
            {
                acceptedFilter = searchBoxPresenter.Text;
                changeNotification.Post();
            };
            searchBoxPresenter.OnCancelled += (s, e) =>
            {
                if (acceptedFilter != "")
                {
                    acceptedFilter = "";
                    searchBoxPresenter.Focus(null);
                }
                else
                {
                    visible = false;
                }
                changeNotification.Post();
            };

            view.SetViewModel(this);
        }
示例#9
0
 public Presenter(
     IView view,
     Preprocessing.IManager preprocessingManager,
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     ITShark tShark
     )
 {
     this.view = view;
     this.preprocessingManager      = preprocessingManager;
     this.preprocessingStepsFactory = preprocessingStepsFactory;
     this.tShark = tShark;
 }
        public Presenter(
            ILogSourcesManager logSourcesManager,
            IView view,
            Preprocessing.IManager sourcesPreprocessingManager,
            Preprocessing.IStepsFactory preprocessingStepsFactory,
            MRU.IRecentlyUsedEntities mru,
            QuickSearchTextBox.IPresenter searchBoxPresenter,
            IAlertPopup alerts,
            ITraceSourceFactory traceSourceFactory
            )
        {
            this.view = view;
            this.logSourcesManager           = logSourcesManager;
            this.sourcesPreprocessingManager = sourcesPreprocessingManager;
            this.preprocessingStepsFactory   = preprocessingStepsFactory;
            this.mru = mru;
            this.searchBoxPresenter = searchBoxPresenter;
            this.trace  = traceSourceFactory.CreateTraceSource("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);
        }
示例#11
0
 internal PcapUnpackPreprocessingStep(
     Preprocessing.IStepsFactory preprocessingStepsFactory,
     ITShark tshark,
     PreprocessingStepParams srcFile,
     PreprocessingStepParams[] keyFiles)
 {
     this.preprocessingStepsFactory = preprocessingStepsFactory;
     this.sourceFile = srcFile;
     this.tshark     = tshark;
     if (keyFiles != null)
     {
         this.getKeyFiles = (IPreprocessingStepCallback _) => Task.FromResult(keyFiles);
     }
     else if (srcFile?.Argument != null)
     {
         this.getKeyFiles = (IPreprocessingStepCallback callback) =>
                            Task.WhenAll(StepArgument.Parse(srcFile.Argument).Select(history => callback.ReplayHistory(history)));
     }
     else
     {
         this.getKeyFiles = (IPreprocessingStepCallback _) => Task.FromResult(new PreprocessingStepParams[0]);
     }
 }
 internal JsonUnpackPreprocessingStep(Preprocessing.IStepsFactory preprocessingStepsFactory, PreprocessingStepParams srcFile)
 {
     this.preprocessingStepsFactory = preprocessingStepsFactory;
     this.sourceFile = srcFile;
 }
        public Presenter(
            ILogSourcesManager logSources,
            IUserDefinedFormatsManager udfManager,
            IRecentlyUsedEntities mru,
            Preprocessing.IManager logSourcesPreprocessings,
            IView view,
            Preprocessing.IStepsFactory 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,
            ITraceSourceFactory traceSourceFactory,
            IChangeNotification changeNotification
            )
        {
            this.logSources = logSources;
            this.udfManager = udfManager;
            this.mru        = mru;
            this.view       = view;
            this.logSourcesPreprocessings    = logSourcesPreprocessings;
            this.preprocessingStepsFactory   = preprocessingStepsFactory;
            this.workspacesManager           = workspacesManager;
            this.newLogSourceDialogPresenter = newLogSourceDialogPresenter;
            this.sourcesListPresenter        = sourcesListPresenter;
            this.tracer = traceSourceFactory.CreateTraceSource("UI", "smgr-ui");
            this.sharingDialogPresenter          = sharingDialogPresenter;
            this.historyDialogPresenter          = historyDialogPresenter;
            this.sourcePropertiesWindowPresenter = sourcePropertiesWindowPresenter;
            this.alerts             = alerts;
            this.presentersFacade   = facade;
            this.changeNotification = changeNotification;

            sourcesListPresenter.DeleteRequested += (sender, args) =>
            {
                DeleteSelectedSources();
            };

            logSourcesPreprocessings.PreprocessingAdded += (sender, args) =>
            {
                if ((args.LogSourcePreprocessing.Flags & PreprocessingOptions.HighlightNewPreprocessing) != 0)
                {
                    preprocessingAwaitingHighlighting = args.LogSourcePreprocessing;
                    pendingUpdateFlag.Invalidate();
                }
            };

            heartbeat.OnTimer += (sender, args) =>
            {
                if (pendingUpdateFlag.Validate())
                {
                    UpdateView();
                }
            };

            view.SetViewModel(this);
        }
 public PreprocessingStepsFactory(Preprocessing.IStepsFactory preprocessingStepsFactory, ITShark tshark)
 {
     this.preprocessingStepsFactory = preprocessingStepsFactory;
     this.tshark = tshark;
 }
 public PreprocessingManagerExtension(Preprocessing.IStepsFactory preprocessingStepsFactory)
 {
     this.preprocessingStepsFactory = preprocessingStepsFactory;
 }