From feb1a475c29a1dc502dd6fb047c16bd31ddeec42 Mon Sep 17 00:00:00 2001 From: rcktrncn Date: Mon, 2 Aug 2021 21:59:03 +0900 Subject: [PATCH] Add textbox attribute --- taskt/Core/Automation/Attributes/Attributes.cs | 18 ++++++++++++++++++ .../Commands/Excel/ExcelSetCellRCCommand.cs | 1 + 2 files changed, 19 insertions(+) diff --git a/taskt/Core/Automation/Attributes/Attributes.cs b/taskt/Core/Automation/Attributes/Attributes.cs index 3d7049560..ab4f2a8e7 100644 --- a/taskt/Core/Automation/Attributes/Attributes.cs +++ b/taskt/Core/Automation/Attributes/Attributes.cs @@ -211,6 +211,24 @@ public PropertyShowSampleUsageInDescription(bool opt) } } [System.AttributeUsage(AttributeTargets.Property)] + public sealed class PropertyTextBoxSetting : System.Attribute + { + public int height = 1; + public bool allowNewLine = true; + public PropertyTextBoxSetting(int height = 1, bool allowNewLine = true) + { + if (height < 0) + { + this.height = 1; + } + else + { + this.height = height; + } + this.allowNewLine = allowNewLine; + } + } + [System.AttributeUsage(AttributeTargets.Property)] public sealed class PropertyDataGridViewSetting : System.Attribute { public bool allowAddRow = true; diff --git a/taskt/Core/Automation/Commands/Excel/ExcelSetCellRCCommand.cs b/taskt/Core/Automation/Commands/Excel/ExcelSetCellRCCommand.cs index 0090a1a0a..1feb8efc3 100644 --- a/taskt/Core/Automation/Commands/Excel/ExcelSetCellRCCommand.cs +++ b/taskt/Core/Automation/Commands/Excel/ExcelSetCellRCCommand.cs @@ -21,6 +21,7 @@ public class ExcelSetCellRCCommand : ScriptCommand [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **{{{vInstance}}}**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] + [Attributes.PropertyAttributes.PropertyTextBoxSetting(1, false)] public string v_InstanceName { get; set; } [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter text to set (ex. Hello, {{{vText}}})")]