Esempio n. 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);
        }
        /// <summary>
        /// Show the correct control based on display type.
        /// </summary>
        public void ConfigureDisplayControl(DelayCompositeType type)
        {
            delayCompositeType = type;

            sldrDelay.Visible       = false;
            lblDelay.Visible        = false;
            sldrRefreshRate.Visible = false;
            lblRefreshRate.Visible  = false;
            btnSlomoSync.Visible    = false;
            lblSlomoSync.Visible    = false;

            sldrRefreshRate.Enabled = true;
            lblRefreshRate.Enabled  = true;
            lblSlomoSync.Enabled    = true;

            switch (type)
            {
            case DelayCompositeType.Basic:
                sldrDelay.Visible = true;
                lblDelay.Visible  = true;
                break;

            case DelayCompositeType.SlowMotion:
                sldrRefreshRate.Visible = true;
                lblRefreshRate.Visible  = true;
                btnSlomoSync.Visible    = true;
                lblSlomoSync.Visible    = true;
                break;

            default:
                break;
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Show the correct control based on display type.
        /// </summary>
        public void ConfigureDisplayControl(DelayCompositeType type)
        {
            delayCompositeType = type;

            sldrDelay.Visible = false;
            lblDelay.Visible  = false;

            switch (type)
            {
            case DelayCompositeType.Basic:
                sldrDelay.Visible = true;
                lblDelay.Visible  = true;
                break;

            default:
                break;
            }
        }
Esempio n. 4
0
        private void cbType_SelectedIndexChanged(object sender, EventArgs e)
        {
            DelayCompositeType t = (DelayCompositeType)cbType.SelectedIndex;

            gbConfiguration.Controls.Clear();

            switch (t)
            {
            case DelayCompositeType.MultiReview:
                gbConfiguration.Enabled = true;
                gbConfiguration.Controls.Add(configurationPanels[DelayCompositeType.MultiReview]);
                break;

            case DelayCompositeType.SlowMotion:
                gbConfiguration.Enabled = true;
                gbConfiguration.Controls.Add(configurationPanels[DelayCompositeType.SlowMotion]);
                break;

            case DelayCompositeType.FrozenMosaic:
                gbConfiguration.Enabled = true;
                gbConfiguration.Controls.Add(configurationPanels[DelayCompositeType.FrozenMosaic]);
                break;

            case DelayCompositeType.Basic:
            case DelayCompositeType.Mixed:
            default:
                gbConfiguration.Enabled = false;
                break;
            }

            if (gbConfiguration.Controls.Count == 1)
            {
                Control panel = gbConfiguration.Controls[0];
                panel.Top    = 20;
                panel.Left   = 10;
                panel.Width  = 288;
                panel.Height = 125;
            }
        }