Exemplo n.º 1
0
        public void GetOptions()
        {
            try
            {
                ArrayList a = DB.GetVars("KeyboardOptions");
                a.Sort();

                foreach (string s in a)
                {
                    string[] vals = s.Split('/');
                    string name = vals[0];

                    if (vals.Length > 2)
                    {
                        for (int i = 2; i < vals.Length; i++)
                            vals[1] += "/" + vals[i];
                    }

                    string val = vals[1];

                    if (s.StartsWith("btn1text"))
                    {
                        txtButton1.Text = vals[1];
                    }
                    else if (s.StartsWith("btn2text"))
                    {
                        txtButton2.Text = vals[1];
                    }
                    else if (s.StartsWith("btn3text"))
                    {
                        txtButton3.Text = vals[1];
                    }
                    else if (s.StartsWith("btn4text"))
                    {
                        txtButton4.Text = vals[1];
                    }
                    else if (s.StartsWith("btn5text"))
                    {
                        txtButton5.Text = vals[1];
                    }
                    else if (s.StartsWith("btn6text"))
                    {
                        txtButton6.Text = vals[1];
                    }
                    else if (s.StartsWith("btn7text"))
                    {
                        txtButton7.Text = vals[1];
                    }
                    else if (s.StartsWith("btn8text"))
                    {
                        txtButton8.Text = vals[1];
                    }
                    else if (s.StartsWith("btn1cmd"))
                    {
                        btn1cmd.Text = vals[1];
                    }
                    else if (s.StartsWith("btn2cmd"))
                    {
                        btn2cmd.Text = vals[1];
                    }
                    else if (s.StartsWith("btn3cmd"))
                    {
                        btn3cmd.Text = vals[1];
                    }
                    else if (s.StartsWith("btn4cmd"))
                    {
                        btn4cmd.Text = vals[1];
                    }
                    else if (s.StartsWith("btn5cmd"))
                    {
                        btn5cmd.Text = vals[1];
                    }
                    else if (s.StartsWith("btn6cmd"))
                    {
                        btn6cmd.Text = vals[1];
                    }
                    else if (s.StartsWith("btn7cmd"))
                    {
                        btn7cmd.Text = vals[1];
                    }
                    else if (s.StartsWith("btn8cmd"))
                    {
                        btn8cmd.Text = vals[1];
                    }
                }
            }
            catch (Exception ex)
            {
                Debug.Write(ex.ToString());
            }
        }