Exemple #1
0
        private void LightsOff()
        {
            if (MysticLightSDK.Ready())
            {
                MysticLightSDK.setLEDs(System.Windows.Media.Color.FromRgb(0, 0, 0));
            }

            if (LogitechGSDK.Ready())
            {
                //LogitechGSDK.LogiLedSetLighting(0, 0, 0);
            }
        }
Exemple #2
0
        private void UpdateLights()
        {
            Random rnd = new Random();
            int    r, g, b;

            HsvToRgb(rnd.Next(0, 360), 1, 1, out r, out g, out b);

            //START OF EFFECT
            if (MysticLightSDK.Ready())
            {
                MysticLightSDK.setLEDs(System.Windows.Media.Color.FromRgb((byte)r, (byte)g, (byte)b));
            }

            if (LogitechGSDK.Ready())
            {
                LogitechGSDK.LogiLedSetLighting(r * 100 / 255, g * 100 / 255, b * 100 / 255);
            }

            Thread.Sleep(FIRERATE_MS);

            //END OF EFFECT
            LightsOff();
        }
Exemple #3
0
        private void BtnStop_Click(object sender, EventArgs e)
        {
            if (mainLoop.IsBusy)
            {
                NumBoxX.Enabled     = true;
                NumBoxY.Enabled     = true;
                NumBoxScale.Enabled = true;
                ComboRes.Enabled    = true;

                if (MysticLightSDK.Ready())
                {
                    MysticLightSDK.Shutdown();
                }

                if (LogitechGSDK.Ready())
                {
                    LogitechGSDK.Shutdown();
                }

                mainLoop.CancelAsync();
                StatusLabel.Text = "Stopped.";
            }
            LightsOff();
        }