public AnimationSettingsPage(MainMenuPage _MainMenu)
        {
            InitializeComponent();
            MainMenu = _MainMenu;

            MainMenu.SendData("GETANIMATIONCONFIGS()");
            string Response = MainMenu.ReceiveData();

            AnimationConfigNamePicker.Items.Clear();
            AnimationConfigNamePicker.Items.Add("None");
            AnimationConfigNamePicker.SelectedIndex = 0;
            foreach (string Config in Response.Split(';'))
            {
                if (Config != "")
                {
                    AnimationConfigNamePicker.Items.Add(Config);
                }
            }
        }
Esempio n. 2
0
        public InstructionsPage(MainMenuPage _MainMenu)
        {
            InitializeComponent();
            MainMenu = _MainMenu;

            MainMenu.SendData("GETINSTRUCTIONSCONFIGS()");
            string Response = MainMenu.ReceiveData();

            InstructionsConfigNamePicker.Items.Clear();
            InstructionsConfigNamePicker.Items.Add("None");
            InstructionsConfigNamePicker.SelectedIndex = 0;
            foreach (string Config in Response.Split(';'))
            {
                if (Config != "")
                {
                    InstructionsConfigNamePicker.Items.Add(Config);
                }
            }
        }
Esempio n. 3
0
        public VisualizerSettingsPage(MainMenuPage _MainMenu)
        {
            InitializeComponent();
            MainMenu = _MainMenu;

            MainMenu.SendData("GETVISUALIZERCONFIGS()$");
            string Response = MainMenu.ReceiveData();

            VisualizerConfigNamePicker.Items.Clear();
            VisualizerConfigNamePicker.Items.Add("None");
            VisualizerConfigNamePicker.SelectedIndex = 0;
            foreach (string Config in Response.Split(';'))
            {
                if (Config != "")
                {
                    VisualizerConfigNamePicker.Items.Add(Config);
                }
            }
        }
Esempio n. 4
0
        public AmbilightSettingsPage(MainMenuPage _MainMenu)
        {
            InitializeComponent();

            MainMenu = _MainMenu;

            MainMenu.SendData("GETAMBILIGHTCONFIGS()");
            string Response = MainMenu.ReceiveData();

            AmbilightConfigNamePicker.Items.Clear();
            AmbilightConfigNamePicker.Items.Add("None");
            AmbilightConfigNamePicker.SelectedIndex = 0;
            foreach (string Config in Response.Split(';'))
            {
                if (Config != "")
                {
                    AmbilightConfigNamePicker.Items.Add(Config);
                }
            }
            AmbilightConfigNamePicker.Items.RemoveAt(AmbilightConfigNamePicker.Items.Count - 1);
        }
Esempio n. 5
0
        public FadeColorsPage(MainMenuPage _MainMenu)
        {
            InitializeComponent();
            MainMenu = _MainMenu;

            FadeSpeedPicker.Items.Clear();
            FadeFactorPicker.Items.Clear();
            FromIDPicker.Items.Clear();
            ToIDPicker.Items.Clear();

            for (int i = 0; i < 100; i++)
            {
                FadeSpeedPicker.Items.Add(i.ToString());
            }

            for (double i = 0; i <= 1; i += 0.05)
            {
                FadeFactorPicker.Items.Add(i.ToString());
            }

            for (int i = 0; i < MainMenu.TotalLEDCount; i++)
            {
                FromIDPicker.Items.Add(i.ToString());
            }

            for (int i = -1; i < MainMenu.TotalLEDCount; i++)
            {
                ToIDPicker.Items.Add(i.ToString());
            }

            MainMenu.SendData("GETTRACKBARVALUE(FadeColorsRedTrackBar,0)");
            RedSlider.Value = Convert.ToDouble(MainMenu.ReceiveData());
            MainMenu.SendData("GETTRACKBARVALUE(FadeColorsGreenTrackBar,0)");
            GreenSlider.Value = Convert.ToDouble(MainMenu.ReceiveData());
            MainMenu.SendData("GETTRACKBARVALUE(FadeColorsBlueTrackBar,0)");
            BlueSlider.Value = Convert.ToDouble(MainMenu.ReceiveData());
            MainMenu.SendData("GETCONTROLTEXT(FadeColorsFadeSpeedNumericUpDown,0)");
            string Recived = MainMenu.ReceiveData();

            for (int i = 0; i < FadeSpeedPicker.Items.Count; i++)
            {
                if (FadeSpeedPicker.Items[i].ToString() == Recived)
                {
                    FadeSpeedPicker.SelectedIndex = i;
                    break;
                }
            }
            MainMenu.SendData("GETCONTROLTEXT(FadeColorsFadeFactorNumericUpDown,0)");
            Recived = MainMenu.ReceiveData();
            for (int i = 0; i < FadeFactorPicker.Items.Count; i++)
            {
                if (Convert.ToDouble(FadeFactorPicker.Items[i].ToString().Replace(',', '.')) == Convert.ToDouble(Recived.Replace(',', '.')))
                {
                    FadeFactorPicker.SelectedIndex = i;
                    break;
                }
                else
                if (Convert.ToDouble(FadeFactorPicker.Items[i].ToString().Replace('.', ',')) == Convert.ToDouble(Recived.Replace('.', ',')))
                {
                    FadeFactorPicker.SelectedIndex = i;
                    break;
                }
            }
            MainMenu.SendData("GETCONTROLTEXT(FadeLEDPanelFromIDNumericUpDown,0)");
            Recived = MainMenu.ReceiveData();
            for (int i = 0; i < FromIDPicker.Items.Count; i++)
            {
                if (FromIDPicker.Items[i].ToString() == Recived)
                {
                    FromIDPicker.SelectedIndex = i;
                    break;
                }
            }
            MainMenu.SendData("GETCONTROLTEXT(FadeLEDPanelToIDNumericUpDown,0)");
            Recived = MainMenu.ReceiveData();
            for (int i = 0; i < ToIDPicker.Items.Count; i++)
            {
                if (ToIDPicker.Items[i].ToString() == Recived)
                {
                    ToIDPicker.SelectedIndex = i;
                    break;
                }
            }

            RedSliderValueLabel.Text   = Math.Round(RedSlider.Value, 0).ToString();
            GreenSliderValueLabel.Text = Math.Round(GreenSlider.Value, 0).ToString();
            BlueSliderValueLabel.Text  = Math.Round(BlueSlider.Value, 0).ToString();

            Loading = false;
        }