Пример #1
0
        public PrintParameter()
        {
            INIClass ini = new INIClass(Application.StartupPath + "\\TSconfig.ini");

            background = Application.StartupPath + @"\Photo\" + ini.IniReadValue("PRINT", "BackGround");
            photoPos   = ini.IniReadValue("PRINT", "PhotoPos");
            position   = ini.IniReadValue("PRINT", "StrPos").Split('|');
        }
Пример #2
0
 //单例
 static INIClass getInstance()
 {
     if (ini != null)
     {
         return(ini);
     }
     lock (locker)
     {
         if (ini == null)
         {
             ini = new INIClass();
         }
     }
     return(ini);
 }
Пример #3
0
 //获取指定key的value
 public static string getDicValue(string key)
 {
     if (ini == null)
     {
         ini = getInstance();
     }
     if (ini.iniDic.ContainsKey(key))
     {
         return(ini.iniDic[key]);
     }
     else
     {
         return(null);
     }
 }