Example #1
0
        }       //	SaveProperties

        /// <summary>
        /// Set Property
        /// </summary>
        /// <param name="key">Key</param>
        /// <param name="value">Value</param>
        public static void SetProperty(string key, string value)
        {
            if (s_prop == null)
            {
                s_prop = new VAdvantage.Utility.Properties();
            }
            if (key.Equals(P_WARNING))
            {
                s_prop.SetProperty(key, value);
            }
            else if (!IsClient())
            {
                s_prop.SetProperty(key, SecureEngineUtility.Secure.CLEARVALUE_START + value + SecureEngineUtility.Secure.CLEARVALUE_END);
            }
            else
            {
                if (value == null)
                {
                    s_prop.SetProperty(key, "");
                }
                else
                {
                    String eValue = SecureEngine.Encrypt(value);
                    if (eValue == null)
                    {
                        s_prop.SetProperty(key, "");
                    }
                    else
                    {
                        s_prop.SetProperty(key, eValue);
                    }
                }
            }
        }
Example #2
0
 /// <summary>
 /// Creates an empty property list with the specified defaults.
 /// </summary>
 /// <param name="defaults">the defaults.</param>
 public Properties(Properties defaults)
 {
     this.defaults = defaults;
 }