/// <summary> /// Initializes a new instance of the <see cref="EditField_DialogEntry" /> class. /// </summary> /// <param name="ID">The identifier.</param> /// <param name="text">The text.</param> /// <param name="help">The help.</param> /// <param name="parentEntry">The parent entry.</param> /// <param name="parentDialog">The parent dialog.</param> /// <param name="status">The status.</param> /// <param name="minimizeType">Type of the minimize.</param> /// <param name="boxHeightType">Type of the box height.</param> /// <param name="maxTextLength">Maximum length of the text.</param> /// <param name="characterRestriction">The character restriction.</param> /// <param name="directValidation">if set to <c>true</c> field will be validated directly. if <c>false</c> only when saved. Manual validation is needed!.</param> public EditField_DialogEntry( string ID, string text, string help = "...", DialogEntry parentEntry = null, Dialog parentDialog = null, DialogEntryStatus status = DialogEntryStatus.Unknown, MinimizeTypes minimizeType = MinimizeTypes.Unknown, BoxHeightTypes boxHeightType = BoxHeightTypes.Unknown, Boolean isGraphical = true, int maxTextLength = 20, InputRestrictionTypes characterRestriction = InputRestrictionTypes.Unrestricted, Boolean directValidation = true ) : base(ID, text, help, DialogEntryType.EditField, status, parentEntry, parentDialog) { InputBox = new EditField_InputBox(minimizeType, boxHeightType, isGraphical); EventManager = new EditField_EventManager(); if (!validateForSpaces(Title)) { Title = ""; } InputManager = new EditField_InputManager(Title); Validator = new EditField_Validator(maxTextLength, characterRestriction, directValidation); }
/// <summary> /// Initializes a new instance of the <see cref="EditField_DialogEntry"/> class. /// </summary> /// <param name="entry">The entry.</param> /// <param name="minimizeType">Type of the minimize.</param> /// <param name="boxHeightType">Type of the box height.</param> /// <param name="maxTextLength">Maximum length of the text.</param> /// <param name="characterRestriction">The character restriction.</param> /// <param name="directValidation">if set to <c>true</c> field will be validated directly. if <c>false</c> only when saved. Manual validation is needed!.</param> public EditField_DialogEntry( DialogEntry entry, MinimizeTypes minimizeType = MinimizeTypes.Unknown, BoxHeightTypes boxHeightType = BoxHeightTypes.Unknown, Boolean isGraphical = true, int maxTextLength = 20, InputRestrictionTypes characterRestriction = InputRestrictionTypes.Unrestricted, Boolean directValidation = true) : base(entry.ID, entry.Title, entry.Help, DialogEntryType.EditField, entry.Status, entry.ParentEntry, entry.ParentDialog) { InputBox = new EditField_InputBox(minimizeType, boxHeightType, isGraphical); EventManager = new EditField_EventManager(); if (!validateForSpaces(Title)) { Title = ""; } InputManager = new EditField_InputManager(Title); Validator = new EditField_Validator(maxTextLength, characterRestriction, directValidation); }