Exemplo n.º 1
0
        private void initSettings()
        {
            //initialise les langues
            cbLang.Items.Clear();
            foreach (Lang l in Configs.Langs)
            {
                cbLang.Items.Add(l);
            }
            cbLang.DisplayMemberPath = "Name";

            //affiche la langue dans le combo box
            Lang curentLang = new Lang("en-US", "English");

            foreach (Lang l in Configs.Langs)
            {
                if (l.Code == Configs.Data.Global["lang"])
                {
                    curentLang = l;
                }
            }
            cbLang.SelectedItem = curentLang;

            //coche la checkbox mainMenu
            bool c = false;

            if (Configs.Data.Global["mainMenu"] == "1")
            {
                c = true;
            }
            setMenu(c);
            allowMenu.IsChecked = c;

            //coche la checkbox darkMode
            c = false;
            if (Configs.Data.Global["darkMode"] == "1")
            {
                c = true;
            }
            Configs.SetDarkMode(c);
            allowDarkMode.IsChecked = c;

            DFhost.Text      = Configs.Data.Global["dbHost"];
            DFname.Text      = Configs.Data.Global["dbName"];
            DFuser.Text      = Configs.Data.Global["dbUser"];
            DFpass.Text      = Configs.Data.Global["dbPassword"];
            imgSrvUrl.Text   = Configs.Data.Global["imgSrvUrl"];
            accessToken.Text = Configs.Data.Global["accessToken"];
        }
Exemplo n.º 2
0
 private void CheckBoxLightTheme_Checked(object sender, RoutedEventArgs e)
 {
     Configs.SetDarkMode(false);
 }