コード例 #1
0
        private DelayCompositeConfiguration GetConfiguration()
        {
            DelayCompositeConfiguration config = new DelayCompositeConfiguration();
            DelayCompositeType          t      = (DelayCompositeType)cbType.SelectedIndex;

            config.CompositeType = t;

            switch (t)
            {
            case DelayCompositeType.MultiReview:
                DelayCompositeMultiReviewControl dcmrc = configurationPanels[DelayCompositeType.MultiReview] as DelayCompositeMultiReviewControl;
                return(dcmrc.Configuration);

            case DelayCompositeType.SlowMotion:
                DelayCompositeSlowMotionControl dcsmc = configurationPanels[DelayCompositeType.SlowMotion] as DelayCompositeSlowMotionControl;
                return(dcsmc.Configuration);

            case DelayCompositeType.FrozenMosaic:
                DelayCompositeFrozenMosaicControl dcfmc = configurationPanels[DelayCompositeType.FrozenMosaic] as DelayCompositeFrozenMosaicControl;
                return(dcfmc.Configuration);

            default:
                break;
            }

            return(config);
        }
コード例 #2
0
        private void InitializeUI(DelayCompositeConfiguration current)
        {
            this.Text            = ScreenManagerLang.FormConfigureComposite_Title;
            gbConfiguration.Text = ScreenManagerLang.Generic_Configuration;
            rbDelay.Text         = ScreenManagerLang.FormConfigureComposite_Delay;
            rbSlowMotion.Text    = ScreenManagerLang.FormConfigureComposite_SlowMotion;
            rbQuadrants.Text     = ScreenManagerLang.FormConfigureComposite_Quadrants;

            int currentType = (int)current.CompositeType;

            switch (current.CompositeType)
            {
            case DelayCompositeType.SlowMotion:
                rbSlowMotion.Checked = true;
                break;

            case DelayCompositeType.MultiReview:
                rbQuadrants.Checked = true;
                break;

            default:
            case DelayCompositeType.Basic:
                rbDelay.Checked = true;
                break;
            }
        }
コード例 #3
0
        public FormConfigureComposite(DelayCompositeConfiguration current)
        {
            this.currentConfiguration = current;

            InitializeComponent();
            InitializeUI();
        }
コード例 #4
0
        public DelayCompositeFrozenMosaicControl(DelayCompositeConfiguration current)
        {
            InitializeComponent();

            lblImageCount.Text  = ScreenManagerLang.FormConfigureComposite_ImageCount;
            lblInterval.Text    = ScreenManagerLang.FormConfigureComposite_Interval;
            lblRefreshRate.Text = ScreenManagerLang.FormConfigureComposite_RefreshRate;
            lblStart.Text       = ScreenManagerLang.FormConfigureComposite_Start;

            Configuration = new DelayCompositeConfiguration();
            Configuration.CompositeType = DelayCompositeType.FrozenMosaic;

            if (current.CompositeType == DelayCompositeType.FrozenMosaic)
            {
                Configuration.ImageCount  = current.ImageCount;
                Configuration.RefreshRate = current.RefreshRate;
                Configuration.Start       = current.Start;
                Configuration.Interval    = current.Interval;
            }
            else
            {
                Configuration.ImageCount  = 16;
                Configuration.RefreshRate = 0.5f;
                Configuration.Start       = 0;
                Configuration.Interval    = 3;
            }

            InitializeUI();
        }
コード例 #5
0
        public DelayCompositeMultiReviewControl(DelayCompositeConfiguration current)
        {
            InitializeComponent();
            lblImageCount.Text = ScreenManagerLang.FormConfigureComposite_ImageCount;

            Configuration = new DelayCompositeConfiguration();
            Configuration.CompositeType = DelayCompositeType.MultiReview;

            if (current.CompositeType == DelayCompositeType.MultiReview)
            {
                Configuration.ImageCount = current.ImageCount;
            }
            else
            {
                Configuration.ImageCount = 4;
            }

            InitializeUI();
        }
コード例 #6
0
        private DelayCompositeConfiguration GetConfiguration()
        {
            DelayCompositeConfiguration config = new DelayCompositeConfiguration();

            if (rbSlowMotion.Checked)
            {
                config.CompositeType = DelayCompositeType.SlowMotion;
            }
            else if (rbQuadrants.Checked)
            {
                config.CompositeType = DelayCompositeType.MultiReview;
            }
            else
            {
                config.CompositeType = DelayCompositeType.Basic;
            }

            return(config);
        }
コード例 #7
0
ファイル: CaptureScreen.cs プロジェクト: jfpk/kinoveaIDS
        private IDelayComposite GetComposite(DelayCompositeConfiguration configuration)
        {
            switch (configuration.CompositeType)
            {
            case DelayCompositeType.MultiReview:
                return(new DelayCompositeMultiReview(configuration));

            case DelayCompositeType.SlowMotion:
                return(new DelayCompositeSlowMotion(configuration));

            case DelayCompositeType.FrozenMosaic:
                return(new DelayCompositeFrozenMosaic(configuration));

            case DelayCompositeType.Mixed:
                return(new DelayCompositeMixed());

            default:
                return(new DelayCompositeBasic());
            }
        }
コード例 #8
0
ファイル: CaptureScreen.cs プロジェクト: jfpk/kinoveaIDS
        private void ConfigureComposite()
        {
            if (!cameraLoaded || cameraManager == null)
            {
                return;
            }

            FormConfigureComposite form = new FormConfigureComposite(delayCompositeConfiguration);

            FormsHelper.Locate(form);

            if (form.ShowDialog() == DialogResult.OK)
            {
                delayCompositeConfiguration = form.Configuration;
                delayComposite = GetComposite(delayCompositeConfiguration);
                delayCompositer.ResetComposite(delayComposite);
                PreferencesManager.CapturePreferences.DelayCompositeConfiguration = delayCompositeConfiguration;
                PreferencesManager.Save();
            }

            form.Dispose();
        }
コード例 #9
0
ファイル: CaptureScreen.cs プロジェクト: jfpk/kinoveaIDS
        public CaptureScreen()
        {
            // There are several nested lifetimes with symetric setup/teardown methods:
            // Screen -> ctor / BeforeClose.
            // Camera association -> LoadCamera / UnloadCamera.
            // Connection (frame grab) -> Connect / Disconnect.
            // Recording -> StartRecord / StopRecord.

            log.Debug("Constructing a CaptureScreen.");
            view = new CaptureScreenView(this);
            view.DualCommandReceived += OnDualCommandReceived;

            viewportController = new ViewportController();
            viewportController.DisplayRectangleUpdated += ViewportController_DisplayRectangleUpdated;
            viewportController.Poked += viewportController_Poked;

            view.SetViewport(viewportController.View);
            view.SetCapturedFilesView(capturedFiles.View);

            InitializeCaptureFilenames();
            InitializeTools();
            InitializeMetadata();

            delayCompositer             = new DelayCompositer(delayer);
            delayCompositeConfiguration = PreferencesManager.CapturePreferences.DelayCompositeConfiguration;
            delayComposite = GetComposite(delayCompositeConfiguration);
            delayCompositer.SetComposite(delayComposite);

            view.SetToolbarView(drawingToolbarPresenter.View);

            IntPtr forceHandleCreation = dummy.Handle; // Needed to show that the main thread "owns" this Control.

            nonGrabbingInteractionTimer.Interval = 40;
            nonGrabbingInteractionTimer.Tick    += NonGrabbingInteractionTimer_Tick;

            grabTimer.Tick += grabTimer_Tick;

            pipelineManager.FrameSignaled += pipelineManager_FrameSignaled;
        }
コード例 #10
0
        public DelayCompositeSlowMotionControl(DelayCompositeConfiguration current)
        {
            InitializeComponent();

            lblImageCount.Text       = ScreenManagerLang.FormConfigureComposite_ImageCount;
            lblSlowMotionFactor.Text = ScreenManagerLang.FormConfigureComposite_SlowMotionFactor;

            Configuration = new DelayCompositeConfiguration();
            Configuration.CompositeType = DelayCompositeType.SlowMotion;

            if (current.CompositeType == DelayCompositeType.SlowMotion)
            {
                Configuration.ImageCount  = current.ImageCount;
                Configuration.RefreshRate = current.RefreshRate;
            }
            else
            {
                Configuration.ImageCount  = 4;
                Configuration.RefreshRate = 0.5f;
            }

            InitializeUI();
        }
コード例 #11
0
 public DelayCompositeSlowMotion(DelayCompositeConfiguration configuration)
 {
     imageCount  = configuration.ImageCount;
     refreshRate = configuration.RefreshRate;
 }
コード例 #12
0
 public DelayCompositeMultiReview(DelayCompositeConfiguration configuration)
 {
     this.imageCount = configuration.ImageCount;
 }
コード例 #13
0
 public FormConfigureComposite(DelayCompositeConfiguration current)
 {
     InitializeComponent();
     InitializeUI(current);
 }
コード例 #14
0
        private int period;   // amount of time between refreshes, in frames. (all images are refreshed at once).

        public DelayCompositeFrozenMosaic(DelayCompositeConfiguration configuration)
        {
            imageCount = configuration.ImageCount;
            start      = configuration.Start;
            interval   = configuration.Interval;
        }