Example #1
0
        public ScreenCapturePanel(
            Config appConfig,
            ScreenCapturePanelConfig config,
            ILoggingService logger,
            TimedCaptureService captureService,
            ScreenCapturePublisher capturePublisher,
            Func <ScreenCapturePanel, bool> requestFocus,
            Action <ScreenCapturePanel> releaseFocus)
        {
            InitializeComponent();
            this.appConfig        = appConfig;
            this.capturePublisher = capturePublisher;
            this.requestFocus     = requestFocus;
            this.releaseFocus     = releaseFocus;
            this.captureService   = captureService;
            this.logger           = logger.ScopeForFeature(this);
            this.Config           = config;
            this.Location.Text    = config.Url;

            this.SafeViewport = new SafeWebView(this.Viewport);
            this.SafeViewport.NavigationStarting  += Viewport_NavigationStarting;
            this.SafeViewport.NavigationCompleted += Viewport_NavigationCompleted;
            this.SafeViewport.NewWindowRequested  += Viewport_NewWindowRequested;
        }
Example #2
0
        private void AddNewUserCreatedCapturePanel(ScreenCapturePanelConfig config)
        {
            var panel = new ScreenCapturePanel(
                this.config,
                config,
                this.featureLogger,
                this.timedCaptureService,
                this.capturePublisher,
                this.HandleCapturePanelFocusRequest,
                this.HandleCapturePanelReleaseFocusRequest);

            var tab = new TabItem()
            {
                Content = panel,
                Header  = panel.Config.Name
            };

            this.screenCapturePanels.Items.Insert(0, tab);
            this.screenCapturePanels.SelectedIndex = 0;

            this.featureLogger.Info("Added new Capture Panel named {0}", panel.Config.PrettyName);

            this.UpdateCaptureServiceWithPanels();
        }