public static UserControlFactory GetFactory(ApplicationConfig config) { LazyInitializer.EnsureInitialized(ref _factory, () => new UserControlFactory(config)); return _factory; }
public SettingsForm(ApplicationConfig settings) : this() { _settings = settings; var factory = UserControlFactory.GetFactory(settings); cB_PlaySound.Checked = _settings.GeneralSettings.PlaySoundAfterPrintScreen; comboBox_ImageFormat.Text = _settings.ImageSettings.PictureFormat; tBox_SavingFolder.Text = _settings.ImageSettings.PictureSaveFolder; cB__AutoStart.Checked = AutoStart.IsAutoStartEnabled; cB__AutoStart.CheckedChanged += cB__AutoStart_CheckedChanged; _hotKeySettingTab = new HotKeySettingTab(flpHotkeys, Program.HotkeyManager,_settings.HotKeysConfig, factory); _hotKeySettingTab.AddControls(); checkBox_Enabled.Checked = _hotKeySettingTab.IsHotKeysEnable; ChangeLanguage(_settings.GeneralSettings.Language); InitializeLanguageMenu(); ready = true; }
protected UserControlFactory(ApplicationConfig config) { HotkeySelectionControl.HotKeysConfig = config.HotKeysConfig; }
private static void Load() { Settings = ApplicationConfig.Load(ApplicationConfigFilePath); }