static public void Create(IModel appModel, ModelObjects modelObjects, LogJoint.UI.Presenters.IPresentation appPresentation)
        {
            var stateInspectorPresenter = appPresentation.Postprocessing.StateInspector;

            stateInspectorPresenter.OnNodeCreated += (senderPresenter, arg) =>
            {
                if (Rtc.MeetingsStateInspector.ShouldBePresentedCollapsed(arg.NodeObject?.CreationEvent))
                {
                    arg.CreateCollapsed = true;
                }
                else if (Rtc.MediaStateInspector.ShouldBePresentedCollapsed(arg.NodeObject?.CreationEvent))
                {
                    arg.CreateCollapsed = true;
                }
            };

            stateInspectorPresenter.OnMenu += (senderPresenter, arg) =>
            {
                if (stateInspectorPresenter.SelectedObject != null)
                {
                    var menuItems = new []
                    {
                        GoToTimeSeriesMenu.CreateStateInspectorMenuItem(
                            stateInspectorPresenter.SelectedObject,
                            appPresentation.Postprocessing.TimeSeries),
                        DownloadBackendLogsMenu.CreateStateInspectorMenuItem(
                            stateInspectorPresenter.SelectedObject,
                            appPresentation.PromptDialog, appModel.Preprocessing.Manager, modelObjects.BackendLogsPreprocessingStepsFactory)
                    };

                    arg.Items.AddRange(menuItems.Where(i => i != null));
                }
            };
        }
Esempio n. 2
0
 public Application(
     IModel model,
     LogJoint.UI.Presenters.IPresentation presentation
     )
 {
     this.Model        = model;
     this.Presentation = presentation;
 }
Esempio n. 3
0
 public static void Init(
     IModel appModel,
     LogJoint.UI.Presenters.IPresentation appPresentation,
     UI.Presenters.Factory.IViewsFactory viewsFactory
     )
 {
     var model        = Factory.Create(appModel);
     var presentation = UI.Presenters.Factory.Create(model, appPresentation, appModel, viewsFactory);
 }
Esempio n. 4
0
        static public void Create(LogJoint.UI.Presenters.IPresentation presentation)
        {
            var stateInspectorPresenter = presentation.Postprocessing.StateInspector;

            stateInspectorPresenter.OnNodeCreated += (senderPresenter, arg) =>
            {
                if (ChromeDebugLog.WebRtcStateInspector.ShouldBePresentedCollapsed(arg.NodeObject?.CreationEvent, arg.NodeObject?.Id, arg.NodeObject?.Parent?.Id))
                {
                    arg.CreateCollapsed = true;
                }
                else if (WebrtcInternalsDump.WebRtcStateInspector.ShouldBePresentedCollapsed(arg.NodeObject?.CreationEvent))
                {
                    arg.CreateCollapsed = true;
                }
            };
            stateInspectorPresenter.OnMenu += (senderPresenter, arg) =>
            {
                if (stateInspectorPresenter.SelectedObject != null)
                {
                    if (WebrtcInternalsDump.WebRtcStateInspector.HasTimeSeries(stateInspectorPresenter.SelectedObject.CreationEvent) ||
                        ChromeDebugLog.WebRtcStateInspector.HasTimeSeries(stateInspectorPresenter.SelectedObject.CreationEvent))
                    {
                        var timeSeriesPresenter = presentation.Postprocessing.TimeSeries;
                        bool predicate(LogJoint.UI.Presenters.Postprocessing.TimeSeriesVisualizer.ITreeNodeData node) =>
                        node.Type == LogJoint.UI.Presenters.Postprocessing.TimeSeriesVisualizer.ConfigDialogNodeType.ObjectIdGroup &&
                        node.Caption.Contains(stateInspectorPresenter.SelectedObject.Id) &&
                        stateInspectorPresenter.SelectedObject.BelongsToSource(node.LogSource);

                        if (timeSeriesPresenter.ConfigNodeExists(predicate))
                        {
                            arg.Items.Add(new LogJoint.UI.Presenters.Postprocessing.StateInspectorVisualizer.MenuData.Item(
                                              "Go to time series",
                                              () =>
                            {
                                timeSeriesPresenter.Show();
                                timeSeriesPresenter.OpenConfigDialog();
                                timeSeriesPresenter.SelectConfigNode(predicate);
                            }
                                              ));
                        }
                    }
                }
            };
        }
Esempio n. 5
0
        public static PresentationObjects Create(
            ModelObjects model,
            LogJoint.UI.Presenters.IPresentation appPresentation,
            IModel appModel,
            IViewsFactory viewsFactory)
        {
            appPresentation.NewLogSourceDialog.PagesRegistry.RegisterPagePresenterFactory(
                "wireshark",
                f => new NewLogSourceDialog.Pages.WiresharkPage.Presenter(
                    viewsFactory.CreateWiresharkPageView(),
                    appModel.Preprocessing.Manager,
                    appModel.Preprocessing.StepsFactory,
                    model.TShark
                    )
                );

            appPresentation.MessagePropertiesDialog.ExtensionsRegistry.Register(
                new MessagePropertiesDialog.Extension(model.PostprocessorsRegistry, viewsFactory.CreateMessageContentView, appPresentation.ClipboardAccess)
                );

            return(new PresentationObjects
            {
            });
        }