コード例 #1
0
 void DisplayLink.SetInitialDisplay(PostBackValueDictionary formControlValues)
 {
     if (getControlsToggled(hiddenFieldValue.Value))
     {
         if (textControl != null)
         {
             if (getAlternateText().Any())
             {
                 textControl.Controls.Clear();
                 textControl.Controls.Add(new PlaceHolder().AddControlsReturnThis(getAlternateText().ToComponents().GetControls()));
             }
             else
             {
                 this.SetInitialDisplay(false);
             }
         }
         foreach (var webControl in controlsToToggle)
         {
             if (toggleClasses != null)
             {
                 foreach (var i in toggleClasses)
                 {
                     webControl.CssClass = webControl.CssClass.Contains(i) ? webControl.CssClass.Replace(i, "") : webControl.CssClass.ConcatenateWithSpace(i);
                 }
             }
             else
             {
                 webControl.ToggleInitialDisplay();
             }
         }
     }
 }
コード例 #2
0
 void DisplayLink.SetInitialDisplay(PostBackValueDictionary formControlValues)
 {
     foreach (var i in controls)
     {
         DisplayLinkingOps.SetControlDisplay(i, controlsDisplayedPredicate());
     }
 }
コード例 #3
0
        /// <summary>
        /// Gets the post back value.
        /// </summary>
        public RsFile GetPostBackValue(PostBackValueDictionary postBackValues)
        {
            if (postBackValue == null)
            {
                var value = formValue.GetValue(postBackValues);
                if (value == null)
                {
                    return(null);
                }

                using (var ms = new MemoryStream()) {
                    value.InputStream.CopyTo(ms);
                    postBackValue = new RsFile(ms.ToArray(), Path.GetFileName(value.FileName), contentType: value.ContentType);
                }
            }
            return(postBackValue);
        }
コード例 #4
0
 /// <summary>
 /// Returns true if the value changed on this post back.
 /// </summary>
 public bool ValueChangedOnPostBack(PostBackValueDictionary postBackValues)
 {
     return(formValue.ValueChangedOnPostBack(postBackValues));
 }
コード例 #5
0
 /// <summary>
 /// Gets the post back value.
 /// </summary>
 private string getPostBackValue(PostBackValueDictionary postBackValues)
 {
     return(formValue.GetValue(postBackValues));
 }
コード例 #6
0
 /// <summary>
 /// Returns true if the value changed on this post back.
 /// </summary>
 public bool ValueChangedOnPostBack(PostBackValueDictionary postBackValues)
 {
     return(checkBoxFormValue != null?checkBoxFormValue.ValueChangedOnPostBack(postBackValues) : radioButtonFormValue.ValueChangedOnPostBack(postBackValues));
 }
コード例 #7
0
 /// <summary>
 /// Gets whether the box is checked in the post back.
 /// </summary>
 public bool IsCheckedInPostBack(PostBackValueDictionary postBackValues)
 {
     return(checkBoxFormValue != null?checkBoxFormValue.GetValue(postBackValues) : radioButtonFormValue.GetValue(postBackValues) == this);
 }
コード例 #8
0
 /// <summary>
 /// Gets the selected item IDs in the post back.
 /// </summary>
 public IEnumerable <ItemIdType> GetSelectedItemIdsInPostBack(PostBackValueDictionary postBackValues)
 {
     return(items.Where(i => checkBoxesByItem[i].IsCheckedInPostBack(postBackValues)).Select(i => i.Id).ToArray());
 }
コード例 #9
0
 /// <summary>
 /// Returns true if the selections changed on this post back.
 /// </summary>
 public bool SelectionsChangedOnPostBack(PostBackValueDictionary postBackValues)
 {
     return(items.Any(i => checkBoxesByItem[i].ValueChangedOnPostBack(postBackValues)));
 }
コード例 #10
0
 /// <summary>
 /// Validates the HTML.
 /// </summary>
 public void Validate(PostBackValueDictionary postBackValues, Validator validator, ValidationErrorHandler errorHandler)
 {
     mod.Html = validator.GetString(errorHandler, wysiwygEditor.GetPostBackValue(postBackValues), true);
 }
コード例 #11
0
 /// <summary>
 /// Gets the post back value.
 /// </summary>
 public string GetPostBackValue(PostBackValueDictionary postBackValues)
 {
     return(formValue.GetValue(postBackValues));
 }