aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Core/ExtensionMethods
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2020-01-22 18:00:55 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2020-01-22 18:00:55 +0200
commitbf432bf7b7faa7c51e74462e19eb3e50c28b4aa8 (patch)
tree2cce2090c2455f2cadc3f8288f05688ae60a9ed5 /Software/Visual_Studio/Tango.Core/ExtensionMethods
parent287af6d4bed5333087cb9d702d20035b1ad9a326 (diff)
downloadTango-bf432bf7b7faa7c51e74462e19eb3e50c28b4aa8.tar.gz
Tango-bf432bf7b7faa7c51e74462e19eb3e50c28b4aa8.zip
Implemented StringFormat control for db properties.
Added StringFormat 0.000 for FeederTension on ProcessParameters.
Diffstat (limited to 'Software/Visual_Studio/Tango.Core/ExtensionMethods')
-rw-r--r--Software/Visual_Studio/Tango.Core/ExtensionMethods/IParameterizedExtensions.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Core/ExtensionMethods/IParameterizedExtensions.cs b/Software/Visual_Studio/Tango.Core/ExtensionMethods/IParameterizedExtensions.cs
index 7107b9ee9..4850ccc25 100644
--- a/Software/Visual_Studio/Tango.Core/ExtensionMethods/IParameterizedExtensions.cs
+++ b/Software/Visual_Studio/Tango.Core/ExtensionMethods/IParameterizedExtensions.cs
@@ -9,6 +9,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Tango.Core;
+using Tango.Core.CustomAttributes;
/// <summary>
/// Contains extension methods for <see cref="IParameterized"/>.
@@ -112,6 +113,12 @@ public static class IParameterizedExtensions
item.Minimum = rangeAtt.Minimum;
item.Maximum = rangeAtt.Maximum;
}
+
+ StringFormatAttribute formatAtt = propertyInfo.GetCustomAttribute<StringFormatAttribute>();
+ if (formatAtt != null)
+ {
+ item.StringFormat = formatAtt.Format;
+ }
}
if (mode == ParameterItemMode.Event)