예제 #1
0
        /// <summary>
        /// Reads the ini value.
        /// </summary>
        /// <param name="Section">The section.</param>
        /// <param name="Key">The key.</param>
        /// <returns>System.String.</returns>
        public string ReadIniValue(string Section, string Key)
        {
            System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(500);
            int privateProfileString = IniHelper.GetPrivateProfileString(Section, Key, "", stringBuilder, 500, this.m_sIniFilepath);

            return(stringBuilder.ToString());
        }
예제 #2
0
        //public static int TASK_ID;
        //public static TaskState TASK_STATE;

        /// <summary>
        /// Initializes static members of the <see cref="ConstDef" /> class.
        /// </summary>
        static ConstDef()
        {
            ConstDef.FILE_SYSTEMCONFIG =
                Path.Combine(STARTPATH, "GFS.ini");

            ConstDef.PATH_TEMP =
                Path.Combine(STARTPATH, "temp");

            ConstDef.FILE_STYLE =
                Path.Combine(STARTPATH, "styles", "System.ServerStyle");

            ConstDef.FILE_RENCENTFILES =
                Path.Combine(STARTPATH, "taskHistory.xml");

            ConstDef.FILE_HELPFILE =
                Path.Combine(STARTPATH, "help", "help.chm");

            ConstDef.PATH_IDL =
                Path.Combine(STARTPATH, "IDL");
            ConstDef.FILE_BANDS =
                Path.Combine(PATH_IDL, "bands.txt");

            //读取运管服务地址
            IniHelper ini = new IniHelper(ConstDef.FILE_SYSTEMCONFIG);

            ConstDef.URL_UPDATETASK = ini.ReadIniValue("UpdateTaskStatus", "url");
        }
예제 #3
0
 /// <summary>
 /// Writes the ini value.
 /// </summary>
 /// <param name="Section">The section.</param>
 /// <param name="Key">The key.</param>
 /// <param name="Value">The value.</param>
 public void WriteIniValue(string Section, string Key, string Value)
 {
     IniHelper.WritePrivateProfileString(Section, Key, Value, this.m_sIniFilepath);
 }