/// <summary> /// 初期化參數 /// </summary> public override void InitParameter() { AnswerIsRight = Convert.ToBoolean(Reserve.GetPropertyByJson("AnswerIsRight")); // 四則運算結合實例化 Formulas = new List <ArithmeticOperationsFormula>(); }
/// <summary> /// 初期化參數 /// </summary> public override void InitParameter() { object topicType = Reserve.GetPropertyByJson("TopicType"); TopicTypes = Convert.ToString(topicType).Split(new char[] { ',' }, StringSplitOptions.None).Select(s => (TopicType)Enum.Parse(typeof(TopicType), s)).ToList(); // 遞等式計算集合實例化 Formulas = new List <RecursionEquationFormula>(); }
/// <summary> /// 初期化參數 /// </summary> public override void InitParameter() { object topicType = Reserve.GetPropertyByJson("TopicType"); TopicTypes = Convert.ToString(topicType).Split(new char[] { ',' }, StringSplitOptions.None).Select(s => int.Parse(s)).ToArray(); SubTopicTypes = new int[] { }; if (Reserve.ContainsKey("SubTopicType")) { object subTopicType = Reserve.GetPropertyByJson("SubTopicType"); SubTopicTypes = Convert.ToString(subTopicType).Split(new char[] { ',' }, StringSplitOptions.None).Select(s => int.Parse(s)).ToArray(); } // 巧算集合實例化 Formulas = new List <CleverCalculationFormula>(); }