aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-07-20 15:33:37 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-07-20 15:33:37 +0300
commit2405a27b29abf5382da56e67cc46cc338d2d0f89 (patch)
tree157df0b7416a60219b9342bda86c9f86434dfdaf /Software/Visual_Studio
parentbd51a682dbd8ffef086715011c171d531cf05b5c (diff)
downloadTango-2405a27b29abf5382da56e67cc46cc338d2d0f89.tar.gz
Tango-2405a27b29abf5382da56e67cc46cc338d2d0f89.zip
Refactored total liquid volume exceeds the max calc to nl/cm based.
Fixed notes for New Environment. Applied possible fix for PPC power up message stuck.
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs4
-rw-r--r--Software/Visual_Studio/Notes/Tango.Notes/Azure/New Environment.txt4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs11
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs17
4 files changed, 22 insertions, 14 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs
index f583fa15e..d9ba419e0 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs
@@ -314,11 +314,11 @@ namespace Tango.MachineStudio.RML.ViewModels
try
{
var tables = RML.GetActiveProcessGroup().ProcessParametersTables.OrderBy(x => x.TableIndex).ToList();
- return (tables[1].MaxInkUptake / tables[0].MaxInkUptake) * 100;
+ return tables.Max(x => x.MaxInkUptake);
}
catch
{
- return BrushStop.MAX_TOTAL_LIQUID_VOLUME;
+ return BrushStop.MAX_INK_UPTAKE;
}
}
diff --git a/Software/Visual_Studio/Notes/Tango.Notes/Azure/New Environment.txt b/Software/Visual_Studio/Notes/Tango.Notes/Azure/New Environment.txt
index 710cdcb2d..212da09a2 100644
--- a/Software/Visual_Studio/Notes/Tango.Notes/Azure/New Environment.txt
+++ b/Software/Visual_Studio/Notes/Tango.Notes/Azure/New Environment.txt
@@ -41,8 +41,8 @@ EXEC sp_addrolemember N'db_datawriter', N'BackupUser'
CREATE USER [Tango] FROM EXTERNAL PROVIDER WITH DEFAULT_SCHEMA=[dbo]
GO
-EXEC sp_addrolemember N'db_datareader', N'BackupUser'
-EXEC sp_addrolemember N'db_datawriter', N'BackupUser'
+EXEC sp_addrolemember N'db_datareader', N'Tango'
+EXEC sp_addrolemember N'db_datawriter', N'Tango'
9. Create a new storage blob container for the machine studio versions.
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs
index e84fd81a1..3b45a0c2b 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs
@@ -35,6 +35,7 @@ namespace Tango.PPC.UI.ViewModels
private bool _isPowerUpDialogShown;
private bool _isThreadLoadingShown;
private PowerUpAppBarItem _powerUpAppBar;
+ private bool _started;
private DateTime _currentDateTime;
/// <summary>
@@ -79,6 +80,7 @@ namespace Tango.PPC.UI.ViewModels
private void MachineOperator_PowerUpEnded(object sender, EventArgs e)
{
+ _started = false;
_powerUpAppBar?.Close();
_powerUpAppBar = null;
}
@@ -93,6 +95,8 @@ namespace Tango.PPC.UI.ViewModels
private void MachineOperator_PowerUpStarted(object sender, PMR.Power.StartPowerUpResponse e)
{
+ _started = true;
+
InvokeUI(() =>
{
if (_powerUpAppBar != null)
@@ -100,8 +104,11 @@ namespace Tango.PPC.UI.ViewModels
_powerUpAppBar.Close();
}
- _powerUpAppBar = NotificationProvider.PushAppBarItem<PowerUpAppBarItem>();
- _powerUpAppBar.Priority = AppBarPriority.Low;
+ if (_started)
+ {
+ _powerUpAppBar = NotificationProvider.PushAppBarItem<PowerUpAppBarItem>();
+ _powerUpAppBar.Priority = AppBarPriority.Low;
+ }
});
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
index 6633d9eed..4ad21d4cd 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
@@ -28,7 +28,7 @@ namespace Tango.BL.Entities
private bool _ignorePropChanged;
private ActionTimer _syncTimer;
private static List<String> _colorPropertyNames;
- public const double MAX_TOTAL_LIQUID_VOLUME = 200;
+ public const double MAX_INK_UPTAKE = 400;
#region Enums
@@ -104,7 +104,7 @@ namespace Tango.BL.Entities
#region Properties
/// <summary>
- /// Gets or sets a value indicating whether the total value of liquid volumes has exceeded the maximum range of <see cref="MAX_TOTAL_LIQUID_VOLUME"/>.
+ /// Gets or sets a value indicating whether the total value of liquid volumes has exceeded the maximum range of <see cref="MAX_INK_UPTAKE"/>.
/// </summary>
[NotMapped]
[JsonIgnore]
@@ -112,7 +112,7 @@ namespace Tango.BL.Entities
{
get
{
- return LiquidVolumes != null ? LiquidVolumes.Where(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.StandardColor.ToInt32()).Sum(x => x.Volume) > GetTotalMaximumLiquidVolumeLimit() : false;
+ return LiquidVolumes != null ? LiquidVolumes.Where(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.StandardColor.ToInt32()).Sum(x => x.NanoliterPerCentimeter) > GetTotalMaximumLiquidNlPerCMLimit() : false;
}
}
@@ -780,23 +780,24 @@ namespace Tango.BL.Entities
#region Private Methods
- private double GetTotalMaximumLiquidVolumeLimit()
+ private double GetTotalMaximumLiquidNlPerCMLimit()
{
try
{
var tables = Segment.Job.Rml.GetActiveProcessGroup().ProcessParametersTables.OrderBy(x => x.TableIndex).ToList();
- if (tables.Count > 1)
+
+ if (tables.Count > 0)
{
- return (tables[1].MaxInkUptake / tables[0].MaxInkUptake) * 100;
+ return tables.Max(x => x.MaxInkUptake);
}
else
{
- return MAX_TOTAL_LIQUID_VOLUME;
+ return MAX_INK_UPTAKE;
}
}
catch
{
- return MAX_TOTAL_LIQUID_VOLUME;
+ return MAX_INK_UPTAKE;
}
}