Esempio n. 1
0
        private void StartupSettings_Load(object sender, EventArgs e)
        {
            _logger.Trace($"executing {nameof(StartupSettings_Load)}...");

            switch (SettingManager.System.VisualStyle)
            {
            case VisualStyleState.ClientAndNonClientAreasEnabled:
                visualstyle.CheckState = CheckState.Checked;
                break;

            case VisualStyleState.NoneEnabled:
                visualstyle.CheckState = CheckState.Unchecked;
                break;

            default:
                visualstyle.CheckState = CheckState.Indeterminate;
                break;
            }

#if DEBUG
            var clist = Globalization.GetSupportedCultures();
#else
            var clist = Globalization.GetInstalledCultures();
#endif
            for (int i = 0; i < clist.Length; ++i)
            {
                var l = new Locale(clist[i]);
                cmbxLang.Items.Add(l);
                if (clist[i].Name == SettingManager.System.Language.Name)
                {
                    cmbxLang.SelectedItem = l;
                }
            }
            if (cmbxLang.SelectedItem == null)
            {
                var l = new Locale(SettingManager.System.Language);
                cmbxLang.Items.Add(l);
                cmbxLang.SelectedItem = l;
            }

            allowRisky.Checked  = SettingManager.System.RiskySettings.AllowDangerSettings;
            showDelMenu.Enabled = SettingManager.System.RiskySettings.AllowDangerSettings;
            showDelMenu.Checked = SettingManager.System.RiskySettings.ShowDeleteMenu;

            _logger.Trace($"completed {nameof(StartupSettings_Load)}");
        }