Ejemplo n.º 1
0
        private void btn_unknown_Click(object sender, EventArgs e)
        {
            //Open dialog
            DialogResult result = cdg_unknown.ShowDialog();

            if (result == DialogResult.OK)
            {
                //Set button color
                btn_unknown.BackColor = cdg_unknown.Color;
                //Demonstrate color
                var controller = new Busylight.SDK();
                controller.Light(new Busylight.BusylightColor()
                {
                    RedRgbValue = cdg_unknown.Color.R, GreenRgbValue = cdg_unknown.Color.G, BlueRgbValue = cdg_unknown.Color.B
                });
            }
        }
Ejemplo n.º 2
0
 private void box_sound_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         //Play sound
         var controller = new Busylight.SDK();
         controller.Alert(new Busylight.BusylightColor {
             RedRgbValue = 0, GreenRgbValue = 0, BlueRgbValue = 0
         },
                          dictSound[box_sound.SelectedItem.ToString()],
                          dictVol[track_volume.Value]);
         Thread.Sleep(3000);
         controller.Terminate();
     }
     catch (KeyNotFoundException)
     {
         SimpleLoggerHelper.Log(Properties.Settings.Default.log_mode, "Something went wrong when defining the sound based on the form's current selection", Properties.Settings.Default.log_level, 2);
     }
 }
Ejemplo n.º 3
0
        private void track_volume_Scroll(object sender, EventArgs e)
        {
            SimpleLoggerHelper.Log(Properties.Settings.Default.log_mode, string.Format("Value is '{0}', setting will be '{1}'", track_volume.Value, dictVol[track_volume.Value].ToString()), Properties.Settings.Default.log_level, 2);

            try
            {
                //Demonstrate
                var controller = new Busylight.SDK();
                controller.Alert(new Busylight.BusylightColor {
                    RedRgbValue = 0, GreenRgbValue = 0, BlueRgbValue = 0
                }, dictSound[box_sound.SelectedItem.ToString()],
                                 dictVol[track_volume.Value]
                                 );

                //Set label
                lbl_track_volume.Text = dictVol[track_volume.Value].ToString();
            }
            catch (KeyNotFoundException)
            {
                SimpleLoggerHelper.Log(Properties.Settings.Default.log_mode, "Something went wrong when defining the volume based on the form's current selection", Properties.Settings.Default.log_level, 2);
            }
        }
Ejemplo n.º 4
0
 public Fml()
 {
     //Initialize controller
     controller = new Busylight.SDK();
 }