aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-09-25 15:20:42 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-09-25 15:20:42 +0300
commite6febb2cda232a2c89467690d9e1fbb82423618a (patch)
treeb2a6c6e2c2d8ce36e5e43b78fbe1672bf7ff7d33 /Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
parentf3d5875915904417ac5dddc2e16add4d81b9e393 (diff)
downloadTango-e6febb2cda232a2c89467690d9e1fbb82423618a.tar.gz
Tango-e6febb2cda232a2c89467690d9e1fbb82423618a.zip
Implemented MultiGraph data series colors from configuration.
Added dispensers & mid-tanks diagnostics monitors.
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs')
-rw-r--r--Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
index b5442e72b..78a9d0380 100644
--- a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
+++ b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
@@ -11,6 +11,7 @@ using Tango.BL;
using static Tango.Core.Components.DataBaseDescriptionsHelper;
using Tango.Core.Components;
using System.ComponentModel.DataAnnotations.Schema;
+using Newtonsoft.Json;
namespace Tango.PMRGenerator.CLI
{
@@ -747,7 +748,22 @@ namespace Tango.PMRGenerator.CLI
if (db_des != null)
{
- return db_des.ColumnDescription.ToLines().Take(1).Concat(db_des.ColumnDescription.ToLines().Skip(1).Select(x => "//" + x)).Join(Environment.NewLine);
+ RangeDescriptionModel rangeDescription = null;
+
+ try
+ {
+ rangeDescription = JsonConvert.DeserializeObject<RangeDescriptionModel>(db_des.ColumnDescription);
+ }
+ catch { }
+
+ if (rangeDescription != null && rangeDescription.Description != null)
+ {
+ return rangeDescription.Description.ToLines().Take(1).Concat(rangeDescription.Description.ToLines().Skip(1).Select(x => "//" + x)).Join(Environment.NewLine);
+ }
+ else
+ {
+ return db_des.ColumnDescription.ToLines().Take(1).Concat(db_des.ColumnDescription.ToLines().Skip(1).Select(x => "//" + x)).Join(Environment.NewLine);
+ }
}
return null;