Ejemplo n.º 1
0
 /// <inheritdoc/>
 public override string ModelSummary()
 {
     using (StringWriter htmlWriter = new StringWriter())
     {
         htmlWriter.Write("\r\n<div class=\"filter\">");
         htmlWriter.Write("Perform when ");
         htmlWriter.Write(DisplaySummaryValueSnippet(GrazeFoodStoreTypeName, "Resource not set", HTMLSummaryStyle.Resource));
         htmlWriter.Write(" is between <span class=\"setvalueextra\">");
         htmlWriter.Write(MinimumPastureLevel.ToString());
         htmlWriter.Write("</span> and ");
         if (MaximumPastureLevel <= MinimumPastureLevel)
         {
             htmlWriter.Write("<span class=\"resourcelink\">must be > MinimumPastureLevel</span> ");
         }
         else
         {
             htmlWriter.Write("<span class=\"setvalueextra\">");
             htmlWriter.Write(MaximumPastureLevel.ToString());
             htmlWriter.Write("</span> ");
         }
         htmlWriter.Write(" kg per hectare</div>");
         if (!this.Enabled)
         {
             htmlWriter.Write(" - DISABLED!");
         }
         return(htmlWriter.ToString());
     }
 }
        /// <summary>
        /// Provides the description of the model settings for summary (GetFullSummary)
        /// </summary>
        /// <param name="formatForParentControl">Use full verbose description</param>
        /// <returns></returns>
        public override string ModelSummary(bool formatForParentControl)
        {
            string html = "";

            html += "\n<div class=\"filterborder clearfix\">";
            html += "\n<div class=\"filter\">";
            html += "Perform when ";
            html += "<span class=\"resourcelink\">" + GrazeFoodStoreTypeName + "</span>";
            html += " is between <span class=\"setvalueextra\">";
            html += MinimumPastureLevel.ToString();
            html += "</span> and <span class=\"setvalueextra\">";
            html += MaximumPastureLevel.ToString();
            html += "</span> kg per hectare</div>";
            html += "\n</div>";
            return(html);
        }