Beispiel #1
0
        public NetTest(string question, string answer, NetTestType testType, NetUnit baseUnit)
        {
            this.Question = question;
            this.Answer   = answer;

            this.TestType = testType;
            this.BaseUnit = baseUnit;
        }
        /// <summary>
        /// Считывание атрибутов из XmlNode.
        /// </summary>
        /// <param name="xmlNode"></param>
        public override void LoadAttributesFromXml(XmlNode xmlNode)
        {
            base.LoadAttributesFromXml(xmlNode);

            XmlAttribute attr;

            attr = xmlNode.Attributes[xmlFieldTestType];
            if (attr != null && !string.IsNullOrEmpty(attr.Value))
            {
                this.testType = (NetTestType)Enum.Parse(typeof(NetTestType), attr.Value);
            }

            attr = xmlNode.Attributes[xmlFieldNetName];
            if (attr != null && !string.IsNullOrEmpty(attr.Value))
            {
                this.NetName = attr.Value;
            }
        }
        public ExerciseAttemptNetTrain(NetTestType locType, DateTime dateStart, double time, bool autoCheck, string question, string answer, string netName, bool answerIsRight, string userAnswer)
        {
            this.type     = TrainType.NetTrain;
            this.testType = locType;

            this.DateStart = dateStart;

            this.Time            = time;
            this.AutoAnswerCheck = autoCheck;

            this.Question = question;
            this.Answer   = answer;
            this.NetName  = netName;

            this.answerIsRight = answerIsRight;

            if (!answerIsRight)
            {
                this.UserAnswer = userAnswer;
            }
        }
Beispiel #4
0
 public NetTest(string question, string answer, NetTestType testType, NetUnit baseUnit, Color?questionColor) :
     this(question, answer, testType, baseUnit)
 {
     this.QuestionColor = questionColor;
 }