Example #1
0
        private void BtnDupeStepDSte_Click(object sender, EventArgs e)
        {
            if (lightTypesArray.Count - 1 < 0)
            {
                MessageBox.Show(@"Please add at least one step", @"Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                return;
            }

            var type = lightTypesArray[lightTypesArray.Count - 1];

            if (type == null)
            {
                MessageBox.Show(@"No previous step to copy from", @"Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                return;
            }

            var lightTypes = new UcLightTypes();

            if (type.Par56SlidersDSte != null)
            {
                var newPar = new UcPar56Sliders(1)
                {
                    Shown          = false,
                    RedDMXValue    = type.Par56SlidersDSte.RedDMXValue,
                    GreenDMXValue  = type.Par56SlidersDSte.GreenDMXValue,
                    BlueDMXValue   = type.Par56SlidersDSte.BlueDMXValue,
                    StrobeDMXValue = type.Par56SlidersDSte.StrobeDMXValue
                };


                lightTypes.Par56SlidersDSte = newPar;
            }

            lightTypes.Par56SlidersEnabledDSte = type.Par56SlidersEnabledDSte;

            if (type.MovingHeadSlidersDSte != null)
            {
                var newHead = new UcMovingHeadSliders(7)
                {
                    Shown                = false,
                    XAxisDMXValue        = type.MovingHeadSlidersDSte.XAxisDMXValue,
                    YAxisDMXValue        = type.MovingHeadSlidersDSte.YAxisDMXValue,
                    DimmerStrobeDMXValue = type.MovingHeadSlidersDSte.DimmerStrobeDMXValue,
                    ColorDMXValue        = type.MovingHeadSlidersDSte.ColorDMXValue,
                    GoboDMXValue         = type.MovingHeadSlidersDSte.GoboDMXValue
                };


                lightTypes.MovingHeadSlidersDSte = newHead;
            }

            lightTypes.MovingHeadSlidersEnabledDSte = type.MovingHeadSlidersEnabledDSte;

            AddLightType(lightTypes);
        }
Example #2
0
        private void AddLightType(UcLightTypes lightTypes)
        {
            var panel    = pnlStepsDste;
            var controls = panel.Controls;
            var count    = controls.Count;

            lightTypes.BackColor = GetColorForStep(count);

            if (count > 0)
            {
                var prevType = lightTypesArray[count - 1];

                lightTypes.Top = prevType.Bottom + 5;
            }

            lightTypes.ArrayIndexDSte    = count;
            lightTypes.SliderControlSet += OnLightTypeSliderControlChanged;

            lightTypesArray.Add(lightTypes);

            controls.Add(lightTypes);

            CheckStepsForAutoStep();
        }
Example #3
0
        private void BtnAddControl_Click(object sender, EventArgs e)
        {
            var lightTypes = new UcLightTypes();

            AddLightType(lightTypes);
        }