Exemplo n.º 1
0
        private void NewProfileButton_Click(object sender, EventArgs e)
        {
            // TODO: Open window with possibility to choose the mode
            Console.WriteLine("Opening window to create new profile...");

            if (ProfileComboBox.Text == "Monolight")
            {
                MonoLight newProf = new MonoLight();
                newProf.Color = new byte[] { 0x00, 0x00, 0x00 };
                MonolightForm secForm = new MonolightForm(newProf);
                secForm.Show();
            }
            else if (ProfileComboBox.Text == "Multilight")
            {
                MultiLight     newProf   = new MultiLight();
                MultiLightForm multiForm = new MultiLightForm(newProf);
                multiForm.Show();
            }
            else if (ProfileComboBox.Text == "Ambilight")
            {
                Ambilight     newProf  = new Ambilight();
                AmbilightForm ambiForm = new AmbilightForm(newProf);
                ambiForm.Show();
            }
            else
            {
                Console.WriteLine("No profile selected...");
            }
        }
Exemplo n.º 2
0
        public void ChangeProfile(string profstr)
        {
            LoadProfile(profstr);

            switch (active)
            {
            // Ambilight is active
            case 1:

                // Open form window and show data
                AmbilightForm newAmbiForm = new AmbilightForm(ambiProfile);
                newAmbiForm.Show();

                //ambiProfile.ActivateProfile();
                break;

            // Monolight is active
            case 2:
                // Open form window and show data
                MonolightForm newMonForm = new MonolightForm(monProfile);
                newMonForm.Show();

                //monProfile.ActivateProfile();
                break;

            case 3:
                // Open form window and show data
                MultiLightForm newMultForm = new MultiLightForm(multProfile);
                newMultForm.Show();

                //multProfile.ActivateProfile();
                break;

            default:
                break;
            }
        }