예제 #1
0
 public void Save(XmlTextWriter writer)
 {
     writer.WriteElementString("firstRoundSeconds", FirstRoundSeconds.ToString());
     writer.WriteElementString("roundSeconds", RoundSeconds.ToString());
     writer.WriteElementString("showNumericFeedback", ShowNumericFeedback.ToString());
     writer.WriteElementString("usePreviousRoundInput", UsePreviousRoundInput.ToString());
     writer.WriteElementString("rangeStart", RangeStart.ToString());
     writer.WriteElementString("rangeEnd", RangeEnd.ToString());
 }
        protected override void SaveFields(XmlTextWriter output)
        {
            base.SaveFields(output);

            output.WriteAttributeString("required", Required ? "true" : "false");
            output.WriteAttributeString("datatype", DataType.ToString());
            output.WriteAttributeString("stringlength", StringLength.ToString(CultureInfo.CurrentCulture));
            output.WriteAttributeString("regularexpression", RegularExpression);
            output.WriteAttributeString("rangestart", RangeStart.ToString(CultureInfo.CurrentCulture));
            output.WriteAttributeString("rangeend", RangeEnd.ToString(CultureInfo.CurrentCulture));
        }
예제 #3
0
        public IDictionary <string, string> GetArguments()
        {
            var arguments = new Dictionary <string, string>();

            arguments["first-round-seconds"] = FirstRoundSeconds.ToString();
            arguments["round-seconds"]       = RoundSeconds.ToString();
            arguments["range-start"]         = RangeStart.ToString();
            arguments["range-end"]           = RangeEnd.ToString();

            if (ShowNumericFeedback)
            {
                arguments["numeric-feedback"] = string.Empty;
            }

            if (UsePreviousRoundInput)
            {
                arguments["previous-input"] = string.Empty;
            }

            return(arguments);
        }