コード例 #1
0
ファイル: ItemFormatterBase.cs プロジェクト: perl-easj/OOProg
 /// <summary>
 /// Checks that the sum of the element widths add up to TotalWidth.
 /// Is invoked from the constructor.
 /// </summary>
 private void CheckElementWidth()
 {
     if (ElementWidths != null && ElementWidths.Sum() == TotalWidth)
     {
         return;
     }
     throw new ArgumentException($"Width of elements does not add up to {TotalWidth}");
 }
コード例 #2
0
 public ViewComponentOptionsBase(string @class, string style, bool isHidden, bool removeDiv, ElementWidths elementWidths)
 {
     this.Class         = @class;
     this.Style         = style;
     this.IsHidden      = isHidden;
     this.RemoveDiv     = removeDiv;
     this.ElementWidths = elementWidths;
 }
コード例 #3
0
 public MemberOrderItemRedeemedConditionalOptions(
     string @class,
     string style,
     bool isHidden,
     bool removeDiv,
     ElementWidths elementWidths,
     bool not = false)
     : base(@class, style, isHidden, removeDiv, elementWidths)
 {
     this.Not = not;
 }
 public MemberOrderItemDetailsOptions(
     string @class,
     string style,
     bool isHidden,
     bool removeDiv,
     ElementWidths elementWidths,
     string selectedProperty,
     string dateFormat = null)
     : base(@class, style, isHidden, removeDiv, elementWidths)
 {
     this.SelectedProperty = selectedProperty;
     this.DateFormat       = dateFormat;
 }
コード例 #5
0
 public MemberOrderItemExpirationCountdownOptions(
     string @class,
     string style,
     bool isHidden,
     bool removeDiv,
     ElementWidths elementWidths,
     string layout   = "{o<} {on} {ol} {o>} {w<} {wn} {wl} {w>} {d<} {dn} {dl} {d>} {h<} {hn} {hl} {h>} {m<} {mn} {ml} {m>} {s<} {sn} {sl} {s>}",
     int significant = 3,
     string format   = "dhms")
     : base(@class, style, isHidden, removeDiv, elementWidths)
 {
     this.Layout      = layout;
     this.Significant = significant;
     this.Format      = format;
 }
 public MemberOrderItemListOptions(
     string @class,
     string style,
     bool isHidden,
     bool removeDiv,
     ElementWidths elementWidths,
     bool onlyShowUnredeemed,
     bool onlyShowRedeemed,
     int skip,
     int take,
     bool hideExpiredItems = true)
     : base(@class, style, isHidden, removeDiv, elementWidths)
 {
     this.OnlyShowUnredeemed = onlyShowUnredeemed;
     this.OnlyShowRedeemed   = onlyShowRedeemed;
     this.Skip             = skip;
     this.Take             = take;
     this.HideExpiredItems = hideExpiredItems;
 }
コード例 #7
0
 public HtmlElementOptions(string @class, string style, bool isHidden, bool removeDiv, ElementWidths elementWidths, string htmlElement)
     : base(@class, style, isHidden, removeDiv, elementWidths)
 {
     this.HtmlElement = htmlElement;
 }