Example #1
0
        static TimingsEditor()
        {
            var glassesCmds = new GlassesCommand[4];

            for (int i = 0; i < glassesCmds.Length; i++)
            {
                glassesCmds[i].cmdIdx = (byte)(i + 1);
            }

            defaultGlassesCmds = glassesCmds;
        }
Example #2
0
        public void ApplyGlassesTimings(GlassesTimings tim)
        {
            sliderZ.Maximum = int_DefaultSliderMaximum;
            sliderX.Maximum = sliderZ.Maximum;
            sliderY.Maximum = sliderZ.Maximum;
            sliderW.Maximum = sliderZ.Maximum;

            sliderZ.Value = (int)tim.z;
            sliderW.Value = (int)tim.w;
            sliderX.Value = (int)tim.x;
            sliderY.Value = (int)tim.y;

            var newDataSrc = new GlassesCommand[defaultGlassesCmds.Count()];

            newDataSrc[0] = defaultGlassesCmds.FirstOrDefault(s => s.cmdIdx == tim.cmd1);
            newDataSrc[1] = defaultGlassesCmds.FirstOrDefault(s => s.cmdIdx == tim.cmd2);
            newDataSrc[2] = defaultGlassesCmds.FirstOrDefault(s => s.cmdIdx == tim.cmd3);
            newDataSrc[3] = defaultGlassesCmds.FirstOrDefault(s => s.cmdIdx == tim.cmd4);

            listWaveforms.SelectedIndex = 0;
            listWaveforms.DataSource    = newDataSrc;
            UpdateListBoxButtons();
            UpdateSliderParams();
        }