示例#1
0
        public void Set(string name, object val)
        {
            Pref p = this.Find(name);

            if (p == null)
            {
                throw new Exception("No such pref: " + name);
            }
            this.__setregkey(p.m_name, val, p.m_defval);
        }
示例#2
0
        public object Get(string name)
        {
            Pref p = this.Find(name);

            if (p == null)
            {
                throw new Exception("No such pref: " + name);
            }
            object o = this.__getregvalue(p.m_name);

            if (o == null)
            {
                o = p.m_defval;
            }
            else
            {
                if (p.m_type == false.GetType())
                {
                    o = ("True" == o.ToString());
                }
            }
            return(o);
        }
示例#3
0
文件: prefs.cs 项目: saveenr/saveenr
		public void Add( Pref p )
		{
			this.m_list.Add(p);
		}
示例#4
0
 public void Add(Pref p)
 {
     this.m_list.Add(p);
 }