diff options
| author | Avi Levkovich <avi@twine-s.com> | 2018-05-06 09:19:00 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2018-05-06 09:19:00 +0300 |
| commit | ffe713f1081123ee6e9b24193b5d28f058ed7d38 (patch) | |
| tree | 601a3a15dfdbd2d46b36e3d41b771b23d074fd5d /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels | |
| parent | 1259efb89a2bbb17b7b1d42762737aa2c79fa020 (diff) | |
| parent | fef42b802216997a4970f8ed25fcde766327955c (diff) | |
| download | Tango-ffe713f1081123ee6e9b24193b5d28f058ed7d38.tar.gz Tango-ffe713f1081123ee6e9b24193b5d28f058ed7d38.zip | |
integration chsanges
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.cs | 46 |
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; } } |
