aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-05-03 16:00:01 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-05-03 16:00:01 +0300
commit09862076bf6569468e722dd5a8a236f7020ab7b5 (patch)
treeecb78c76c586c7dc10c87cd3c5fcea61bb8ec878 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels
parent52ada8c6fa887d0dc418194655bea0f8e88e9805 (diff)
downloadTango-09862076bf6569468e722dd5a8a236f7020ab7b5.tar.gz
Tango-09862076bf6569468e722dd5a8a236f7020ab7b5.zip
Lots of work !!
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs46
1 files changed, 29 insertions, 17 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
index 421f2daa7..a1da10db9 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
@@ -479,26 +479,38 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
foreach (var pack in Configuration.IdsPacks)
{
- if (pack.Name.IsNullOrWhiteSpace())
+ if (pack.LiquidType != null || pack.CartridgeType != null || pack.DispenserType != null || pack.IdsPackFormula != null || pack.MidTankType != null)
{
- errors.Add(String.Format("Name is required on IDS pack number '{0}'.", Configuration.IdsPacks.IndexOf(pack) + 1));
- continue;
- }
- if (pack.CartridgeType == null)
- {
- errors.Add(String.Format("Cartridge type is required on IDS pack '{0}'.", pack.Name));
- }
- if (pack.DispenserType == null)
- {
- errors.Add(String.Format("Dispenser type is required on IDS pack '{0}'.", pack.Name));
- }
- if (pack.LiquidType == null)
- {
- errors.Add(String.Format("Liquid type is required on IDS pack '{0}'.", pack.Name));
+ if (pack.Name.IsNullOrWhiteSpace())
+ {
+ errors.Add(String.Format("Name is required on IDS pack number '{0}'.", Configuration.IdsPacks.IndexOf(pack) + 1));
+ continue;
+ }
+ if (pack.CartridgeType == null)
+ {
+ errors.Add(String.Format("Cartridge type is required on IDS pack '{0}'.", pack.Name));
+ }
+ if (pack.DispenserType == null)
+ {
+ errors.Add(String.Format("Dispenser type is required on IDS pack '{0}'.", pack.Name));
+ }
+ if (pack.LiquidType == null)
+ {
+ errors.Add(String.Format("Liquid type is required on IDS pack '{0}'.", pack.Name));
+ }
+ if (pack.MidTankType == null)
+ {
+ errors.Add(String.Format("Mid Tank type is required on IDS pack '{0}'.", pack.Name));
+ }
+ if (pack.IdsPackFormula == null)
+ {
+ errors.Add(String.Format("Formula type is required on IDS pack '{0}'.", pack.Name));
+ }
}
- if (pack.MidTankType == null)
+ else
{
- errors.Add(String.Format("Mid Tank type is required on IDS pack '{0}'.", pack.Name));
+ pack.IsEmpty = true;
+ pack.Name = String.Empty;
}
}