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();
             }
         }
     }
 }
 void DisplayLink.SetInitialDisplay(PostBackValueDictionary formControlValues)
 {
     foreach (var i in controls)
     {
         DisplayLinkingOps.SetControlDisplay(i, controlsDisplayedPredicate());
     }
 }
        /// <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);
        }
 /// <summary>
 /// Returns true if the value changed on this post back.
 /// </summary>
 public bool ValueChangedOnPostBack(PostBackValueDictionary postBackValues)
 {
     return(formValue.ValueChangedOnPostBack(postBackValues));
 }
 /// <summary>
 /// Gets the post back value.
 /// </summary>
 private string getPostBackValue(PostBackValueDictionary postBackValues)
 {
     return(formValue.GetValue(postBackValues));
 }
 /// <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));
 }
 /// <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);
 }
Beispiel #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());
 }
Beispiel #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)));
 }
Beispiel #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);
 }
 /// <summary>
 /// Gets the post back value.
 /// </summary>
 public string GetPostBackValue(PostBackValueDictionary postBackValues)
 {
     return(formValue.GetValue(postBackValues));
 }