/// <summary> /// XML參數建構式 /// <![CDATA[ /// <條件 Checked="False" Type="DailyBehavior" 表現程度="1" 項目="4"/> /// ]]> /// </summary> /// <param name="element"></param> public DailyBehaviorLastEval(XmlElement element) { _result = new EvaluationResult(); _amount = Framework.Int.Parse(element.GetAttribute("項目")); _degree = Framework.Int.Parse(element.GetAttribute("表現程度")); //<條件 Checked="False" Type="DailyBehavior" 表現程度="1" 項目="4"/> _mapper = new PerformanceDegreeMapper(); _DescToDegree = new HelperClass.DespToDegree(); }
/// <summary> /// 建構子 /// </summary> public DespToDegree() { _mapper = new PerformanceDegreeMapper(); //取得日常生活表現MappingTable Dictionary <int, string> mapping = _mapper.GetMappingTable(); _Dic = new Dictionary <string, int>(); //建立DescToDegree字典 foreach (int degree in mapping.Keys) { if (!_Dic.ContainsKey(mapping[degree])) { _Dic.Add(mapping[degree], degree); } } }