Beispiel #1
0
 private static void CfgSetBool(AceCustomConfig cfg, string strKey,
                                bool bValue, bool bDefault)
 {
     if (bValue != bDefault)
     {
         cfg.SetBool(strKey, bValue);
     }
     else
     {
         try { cfg.SetString(strKey, null); }
         catch (Exception) { Debug.Assert(false); cfg.SetBool(strKey, bValue); }
     }
 }
Beispiel #2
0
        public Configuration(AceCustomConfig config)
        {
            _config = config;

            if (_config.GetString(KeyIdName, null) != null)
            {
                return;
            }
            _config.SetString(KeyIdName, "");
            _config.SetString(ApplicationKeyName, "");
            _config.SetBool(SyncOnSaveName, false);
            _config.SetBool(SyncOnLoadName, false);
        }
Beispiel #3
0
        public static void Write()
        {
            bool test = Testmode;

            Testmode = false;
            const string ConfigPrefix = "ColoredPassword.";

            m_Config.SetBool(ConfigPrefix + "FirstRun", FirstRun);
            m_Config.SetBool(ConfigPrefix + "Active", Active);
            m_Config.SetBool(ConfigPrefix + "ColorEntryView", ColorEntryView);
            m_Config.SetBool(ConfigPrefix + "ListViewKeepBackgroundColor", ListViewKeepBackgroundColor);
            m_Config.SetString(ConfigPrefix + "ForeColorDefault", ColorToName(ForeColorDefault));
            m_Config.SetString(ConfigPrefix + "BackColorDefault", ColorToName(BackColorDefault));
            m_Config.SetString(ConfigPrefix + "ForeColorDigit", ColorToName(ForeColorDigit));
            m_Config.SetString(ConfigPrefix + "BackColorDigit", ColorToName(BackColorDigit));
            m_Config.SetString(ConfigPrefix + "ForeColorSpecial", ColorToName(ForeColorSpecial));
            m_Config.SetString(ConfigPrefix + "BackColorSpecial", ColorToName(BackColorSpecial));
            m_Config.SetBool(ConfigPrefix + "LowercaseDifferent", LowercaseDifferent);
            m_Config.SetString(ConfigPrefix + "ForeColorLower", ColorToName(ForeColorLower));
            m_Config.SetString(ConfigPrefix + "BackColorLower", ColorToName(BackColorLower));
            m_Config.SetBool(ConfigPrefix + "SinglePwDisplay", SinglePwDisplayActive);
            m_Config.SetBool(ConfigPrefix + "ColorPwGen", ColorPwGen);
            Testmode = test;
        }
 public void SetAutomaticPrefixURLs(bool value)
 {
     m_automaticPrefixURLs = value;
     config.SetBool(automaticPrefixURLs, value);
 }