Пример #1
0
        public void WriteString(string paramname, string value)
        {
            ParamItem param = Find(paramname);

            if (param == null)
            {
                Props.Add(new ParamItem(paramname, value));
            }
            else
            {
                param.Value = value;
            }
        }
Пример #2
0
        public void WriteString(string section, string paramname, string value)
        {
            ParamItem param = GetSection(section).Find(paramname);

            if (param == null)
            {
                GetSection(section).Props.Add(new ParamItem(paramname, value));
            }
            else
            {
                param.Value = value;
            }
            _isWantSave = true;
        }
Пример #3
0
        public string ReadString(string paramname, string defvalue)
        {
            ParamItem param = Find(paramname);

            if (param == null)
            {
                Props.Add(new ParamItem(paramname, defvalue));
                return(defvalue);
            }
            else
            {
                return(param.Value);
            }
        }
Пример #4
0
        public string ReadString(string section, string paramname, string defvalue)
        {
            ParamItem param = GetSection(section).Find(paramname);

            if (param == null)
            {
                GetSection(section).Props.Add(new ParamItem(paramname, defvalue));
                _isWantSave = true;
                return(defvalue);
            }
            else
            {
                return(param.Value);
            }
        }