Ejemplo n.º 1
0
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //생성 :
        //추가 :
        //목적 : 설정 값 읽음
        //설명 :
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public void LoadValue(string strVariableName)
        {
            var    pValue   = m_objParameter.GetType().GetField(strVariableName);
            object objValue = pValue.GetValue(m_objParameter);
            Type   objType  = objValue.GetType();

            if (typeof(int) == objType)
            {
                pValue.SetValue(m_objParameter, m_objINI.GetInt32(m_strSection, strVariableName, 0));
            }
            else if (typeof(double) == objType)
            {
                pValue.SetValue(m_objParameter, m_objINI.GetDouble(m_strSection, strVariableName, 0.0));
            }
            else if (typeof(bool) == objType)
            {
                pValue.SetValue(m_objParameter, m_objINI.GetBool(m_strSection, strVariableName, false));
            }
            else if (typeof(string) == objType)
            {
                pValue.SetValue(m_objParameter, m_objINI.GetString(m_strSection, strVariableName, ""));
            }
            // enum
            else
            {
                pValue.SetValue(m_objParameter, m_objINI.GetInt32(m_strSection, strVariableName, 0));
            }
        }