Example #1
0
        public static string convertTextItToIng(string ing)
        {
            int indx = Array.IndexOf((Const.getRow(Const.ColorBackGroundPossibile, 0)), ing);

            if (indx == -1)
            {
                return(Const.BackgroundColor.Name);
            }

            return(Const.ColorBackGroundPossibile[Const.isItalian, indx]);
        }
Example #2
0
        public static Color parseStringToColor(string s)
        {
            if (Const.isItalian == 0)
            {
                int indx = Array.IndexOf((Const.getRow(Const.ColorBackGroundPossibile, 0)), s);

                if (indx == -1)
                {
                    return(Const.BackgroundColor);
                }

                return(Color.FromName(Const.ColorBackGroundPossibile[1, indx]));
            }
            else
            {
                return(Color.FromName(s));
            }
        }
Example #3
0
        public void defineCBox()
        {
            //vado a impostare adesso i  vari colori selzionabili nelle varie barre
            cBoxLeanguage.Items.AddRange(Const.getRow(Const.LanguagePossible, Const.isItalian));
            cBoxLeanguage.SelectedItem = Const.getRow(Const.LanguagePossible, Const.isItalian)[Const.isItalian];

            cBoxLevel.Items.AddRange(Const.LevelPossible);
            cBoxLevel.SelectedItem = Const.currentLevel.difficulty.ToString();

            cBoxBackground.Items.AddRange(Const.getRow(Const.ColorBackGroundPossibile, Const.isItalian));
            cBoxBackground.SelectedItem = Const.convertTextIngToIT(Const.BackgroundColor.Name);

            cBoxBBeckground.Items.AddRange(Const.getRow(Const.ColorButtonBackground, Const.isItalian));
            cBoxBBeckground.SelectedItem = Const.convertTextIngToIT(Const.ButtonColor.Name);

            cBoxBText.Items.AddRange(Const.getRow(Const.ColorButtonText, Const.isItalian));
            cBoxBText.SelectedItem = Const.convertTextIngToIT(Const.TextColor.Name);
        }