/// <summary> /// Save the properties to form field info. /// </summary> /// <returns>True if success</returns> public bool Save() { if (FieldInfo != null) { // Save LocalizableTextBox controls LocalizableFormEngineUserControl descriptionControl = (LocalizableFormEngineUserControl)txtDescription.NestedControl; if (descriptionControl != null) { descriptionControl.Save(); } LocalizableFormEngineUserControl fieldCaptionControl = (LocalizableFormEngineUserControl)txtFieldCaption.NestedControl; if (fieldCaptionControl != null) { fieldCaptionControl.Save(); } LocalizableFormEngineUserControl explanationTextControl = (LocalizableFormEngineUserControl)txtExplanationText.NestedControl; if (explanationTextControl != null) { explanationTextControl.Save(); } FieldInfo.SetPropertyValue(FormFieldPropertyEnum.FieldCaption, ValidationHelper.GetString(txtFieldCaption.Value, String.Empty), txtFieldCaption.IsMacro); FieldInfo.SetPropertyValue(FormFieldPropertyEnum.FieldDescription, ValidationHelper.GetString(txtDescription.Value, String.Empty), txtDescription.IsMacro); FieldInfo.SetPropertyValue(FormFieldPropertyEnum.ExplanationText, ValidationHelper.GetString(txtExplanationText.Value, String.Empty), txtExplanationText.IsMacro); if (ShowInheritanceSettings) { FieldInfo.Inheritable = ControlInheritable; } return(true); } return(false); }
/// <summary> /// Save the properties to form field info. /// </summary> /// <returns>True if success</returns> public bool Save() { if (FieldInfo != null) { // Save LocalizableTextBox controls LocalizableFormEngineUserControl descriptionControl = (LocalizableFormEngineUserControl)txtDescription.NestedControl; if (descriptionControl != null) { descriptionControl.Save(); } LocalizableFormEngineUserControl fieldCaptionControl = (LocalizableFormEngineUserControl)txtFieldCaption.NestedControl; if (fieldCaptionControl != null) { fieldCaptionControl.Save(); } LocalizableFormEngineUserControl explanationTextControl = (LocalizableFormEngineUserControl)txtExplanationText.NestedControl; if (explanationTextControl != null) { explanationTextControl.Save(); } FieldInfo.SetPropertyValue(FormFieldPropertyEnum.FieldCaption, ValidationHelper.GetString(txtFieldCaption.Value, String.Empty), txtFieldCaption.IsMacro); FieldInfo.SetPropertyValue(FormFieldPropertyEnum.FieldDescription, ValidationHelper.GetString(txtDescription.Value, String.Empty), txtDescription.IsMacro); FieldInfo.SetPropertyValue(FormFieldPropertyEnum.ExplanationText, ValidationHelper.GetString(txtExplanationText.Value, String.Empty), txtExplanationText.IsMacro); if (ShowFieldVisibility) { FieldInfo.AllowUserToChangeVisibility = ChangeVisibility; FieldInfo.Visibility = Visibility; FieldInfo.VisibilityControl = VisibilityDDL; } if (ShowInheritanceSettings) { FieldInfo.Inheritable = ControlInheritable; } if ((Mode == FieldEditorModeEnum.BizFormDefinition) || (Mode == FieldEditorModeEnum.AlternativeBizFormDefinition) || DisplayedControls == FieldEditorControlsEnum.Bizforms) { FieldInfo.PublicField = PublicField; } else { FieldInfo.PublicField = false; } return(true); } return(false); }
/// <summary> /// Save the properties to form field info. /// </summary> /// <returns>True if success</returns> public bool Save() { if (CategoryInfo != null) { // Save LocalizableTextBox control LocalizableFormEngineUserControl fieldCaptionControl = (LocalizableFormEngineUserControl)txtCategoryCaption.NestedControl; fieldCaptionControl?.Save(); CategoryInfo.SetPropertyValue(FormCategoryPropertyEnum.Caption, ValidationHelper.GetString(txtCategoryCaption.Value, String.Empty).Replace("'", string.Empty), txtCategoryCaption.IsMacro); CategoryInfo.SetPropertyValue(FormCategoryPropertyEnum.Collapsible, Convert.ToString(chkCollapsible.Value), chkCollapsible.IsMacro); CategoryInfo.SetPropertyValue(FormCategoryPropertyEnum.CollapsedByDefault, Convert.ToString(chkCollapsedByDefault.Value), chkCollapsedByDefault.IsMacro); CategoryInfo.SetPropertyValue(FormCategoryPropertyEnum.Visible, Convert.ToString(chkVisible.Value), chkVisible.IsMacro); return(true); } return(false); }