Beispiel #1
0
        private void _slider_ValueChanged(object sender, EventArgs <float> e)
        {
            float value     = e.Data;
            int   cycleTime = (int)(MinCycleTime * Math.Pow(Base, Alpha * value)); // it gives cycleTime in range [minTime; maxTime] for value in range [0; 1]

            _photonLedControllerCommunicator.WriteCycleTime(cycleTime);
            _photonLedControllerCommunicator.ReadCycleTime();
        }
        public void Start()
        {
            _photonLedControllerCommunicator = new FakePhotonLedControllerCommunicator();
            _photonLedControllerCommunicator.CycleTimeRead       += _photonLedControllerCommunicator_CycleTimeRead;
            _photonLedControllerCommunicator.TimeProgressRead    += _photonLedControllerCommunicator_TimeProgressRead;
            _photonLedControllerCommunicator.ColorTimePointsRead += _photonLedControllerCommunicator_ColorTimePointsRead;
            _photonLedControllerCommunicator.Start();

            _rootSurface = new RootSurfaceComponent(_photonLedControllerCommunicator);

            _photonLedControllerCommunicator.ReadCycleTime();
            _photonLedControllerCommunicator.ReadColorTimePoints();
            _photonLedControllerPollingService = new PhotonLedControllerPollingService(_photonLedControllerCommunicator);
            _photonLedControllerPollingService.Start();

            _engine.Start();
        }