private void OptionsFormShown(object sender, Tools.OptionsFormsEventArgs e) { Options options = new Options(); options.cgbCheckTFA.Checked = Config.CheckTFA; options.hkcKPOTP.HotKey = Config.Hotkey; options.tbPlaceholder.Text = Config.Placeholder; Dictionary <PwDatabase, Options.DBSettings> dDB = new Dictionary <PwDatabase, Options.DBSettings>(); foreach (PwDatabase db in m_host.MainWindow.DocumentManager.GetOpenDatabases()) { dDB[db] = new Options.DBSettings { UseOTPDB = db.UseDBForOTPSeeds(), Preload = db.PreloadOTPDB() } } ; options.InitEx(dDB, m_host.Database); Tools.AddPluginToOptionsForm(this, options); }
private void OptionsFormShown(object sender, Tools.OptionsFormsEventArgs e) { PluginDebug.AddInfo("Prepare options page", 0); Options options = new Options(); options.cgbCheckTFA.Checked = Config.CheckTFA; options.hkcKPOTP.HotKey = Config.Hotkey; options.cbAutoSubmit.Checked = Config.KPOTPAutoSubmit; options.tbPlaceholder.Text = Config.Placeholder; Dictionary <PwDatabase, Options.DBSettings> dDB = new Dictionary <PwDatabase, Options.DBSettings>(); foreach (PwDatabase db in m_host.MainWindow.DocumentManager.GetOpenDatabases()) { dDB[db] = new Options.DBSettings { UseOTPDB = db.UseDBForOTPSeeds(), Preload = db.PreloadOTPDB() } } ; PluginDebug.AddInfo("Options page prepared, " + dDB.Count.ToString() + " open databases found", 0); options.InitEx(dDB, m_host.Database); PluginDebug.AddInfo(dDB.Count.ToString() + " open databases added to options page", 0); Tools.AddPluginToOptionsForm(this, options); }