From 09686240419bf92d2963564fb4a56f6e566468ce Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 24 Feb 2020 18:53:10 +0200 Subject: Added RmlQualification and HeadType enums to machine and RML. Filtered RML by head type on PPC. Updated SQLExaminer configurations.. Added all new rml and machine parameters to machine designer and RML modules. --- .../Modules/Tango.MachineStudio.Developer/Views/JobView.xaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index bf8eddd91..70422a8ca 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -680,7 +680,7 @@ - + @@ -792,7 +792,7 @@ - + MEDIA LIQUIDS ( Max Nanolitter/CM ) @@ -898,7 +898,7 @@ - + - - - - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj index 2ff9ab0a3..9f3a95e0b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj @@ -118,6 +118,9 @@ RmlView.xaml + + SpoolsView.xaml + ResXFileCodeGenerator Resources.Designer.cs @@ -223,6 +226,10 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs index 3b3a307ad..b75d65fe0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs @@ -87,6 +87,13 @@ namespace Tango.MachineStudio.RML.ViewModels set { _fiberSynths = value; RaisePropertyChangedAuto(); } } + private ObservableCollection _spoolTypes; + public ObservableCollection SpoolTypes + { + get { return _spoolTypes; } + set { _spoolTypes = value; RaisePropertyChangedAuto(); } + } + private Rml _selectedRML; public Rml SelectedRML { @@ -150,6 +157,14 @@ namespace Tango.MachineStudio.RML.ViewModels set { _colorConversionViewVM = value; RaisePropertyChangedAuto(); } } + private RmlsSpool _selectedSpool; + public RmlsSpool SelectedSpool + { + get { return _selectedSpool; } + set { _selectedSpool = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } + } + + /// /// Gets or sets the manage RML command. /// @@ -192,6 +207,16 @@ namespace Tango.MachineStudio.RML.ViewModels public RelayCommand ImportRMLFileCommand { get; set; } + /// + /// Gets or sets the add spool command. + /// + public RelayCommand AddSpoolCommand { get; set; } + + /// + /// Gets or sets the remove spool command. + /// + public RelayCommand RemoveSpoolCommand { get; set; } + public MainViewVM(INotificationProvider notificationProvider, IAuthenticationProvider authentication, IActionLogManager actionLogManager) { _notification = notificationProvider; @@ -215,6 +240,9 @@ namespace Tango.MachineStudio.RML.ViewModels ExportRMLFileCommand = new RelayCommand(ExportRmlFile, () => SelectedRML != null && IsFree); ImportRMLFileCommand = new RelayCommand(ImportRmlFile, () => IsFree); + + AddSpoolCommand = new RelayCommand(AddNewSpool); + RemoveSpoolCommand = new RelayCommand(RemoveSpool, () => SelectedSpool != null); } public override void OnApplicationReady() @@ -281,6 +309,7 @@ namespace Tango.MachineStudio.RML.ViewModels .WithActiveParametersGroup() .WithLiquidFactors() .WithCCT() + .WithSpools() .BuildAsync(); if (ActiveRML.Cct != null) @@ -382,6 +411,7 @@ namespace Tango.MachineStudio.RML.ViewModels LinearMassDensityUnits = _active_context.LinearMassDensityUnits.ToObservableCollection(); FiberShapes = _active_context.FiberShapes.ToObservableCollection(); FiberSynths = _active_context.FiberSynths.ToObservableCollection(); + SpoolTypes = _active_context.SpoolTypes.ToObservableCollection(); } private async void AddNewRml() @@ -495,7 +525,7 @@ namespace Tango.MachineStudio.RML.ViewModels using (var context = ObservablesContext.CreateDefault()) { - var rml = await new RmlBuilder(context).Set(SelectedRML.Guid).WithActiveParametersGroup().WithLiquidFactors().BuildAsync(); + var rml = await new RmlBuilder(context).Set(SelectedRML.Guid).WithActiveParametersGroup().WithLiquidFactors().WithSpools().BuildAsync(); Rml cloned = new Rml(); rml.MapPropertiesTo(cloned, MappingFlags.NoReferenceTypes); @@ -532,6 +562,15 @@ namespace Tango.MachineStudio.RML.ViewModels cloned.LiquidTypesRmls.Add(l); } + foreach (var spool in rml.RmlsSpools) + { + RmlsSpool s = new RmlsSpool(); + spool.MapPropertiesTo(s, MappingFlags.ValueTypesOnly); + s.RmlGuid = cloned.Guid; + s.SpoolTypeGuid = spool.SpoolTypeGuid; + cloned.RmlsSpools.Add(s); + } + context.Rmls.Add(cloned); await context.SaveChangesAsync(); @@ -709,17 +748,19 @@ namespace Tango.MachineStudio.RML.ViewModels _actionLogManager.InsertLog(BL.Enumerations.ActionLogType.RmlSaved, _authentication.CurrentUser, _rmlBeforeSave.Name, _rmlBeforeSave, rmlAfter, "RML saved using Machine Studio."); _rmlBeforeSave = rmlAfter; + + LoadActiveRML(ActiveRML.Guid); } } catch (Exception ex) { LogManager.Log(ex, $"Error saving RML {ActiveRML.Name}"); - _notification.ShowError($"An error occurred while trying to save the current RML.\n{ex.Message}"); + _notification.ShowError($"An error occurred while trying to save the current RML.\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; } - - LoadActiveRML(ActiveRML.Guid); - - IsFree = true; } private void BackToRmls() @@ -905,5 +946,26 @@ namespace Tango.MachineStudio.RML.ViewModels } #endregion + + #region Spools + + private void AddNewSpool() + { + _active_context.RmlsSpools.Add(new RmlsSpool() + { + Rml = ActiveRML, + }); + } + + private void RemoveSpool() + { + if (SelectedSpool != null) + { + _active_context.RmlsSpools.Remove(SelectedSpool); + ActiveRML.RmlsSpools.Remove(SelectedSpool); + } + } + + #endregion } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml index cae614aeb..03bf65522 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml @@ -32,7 +32,7 @@ - ACTIVE PROCESS GROUP + ACTIVE PROCESS GROUP diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml index 2c8d538d0..6ee41ac38 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml @@ -159,18 +159,18 @@ - + - COLOR CONVERSION + COLOR CONVERSION - + @@ -211,6 +211,9 @@ + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml new file mode 100644 index 000000000..6eae05c76 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + SPOOLS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml.cs new file mode 100644 index 000000000..6e363681c --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.RML.Views +{ + /// + /// Interaction logic for SpoolsView.xaml + /// + public partial class SpoolsView : UserControl + { + public SpoolsView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs index 18ca6bd1f..efaf98966 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs @@ -468,7 +468,7 @@ namespace Tango.PPC.Jobs.ViewModels Job.ValidateOnPropertyChanged = true; LogManager.Log("Loading RMLS..."); - Rmls = (await new RmlsCollectionBuilder(_db).SetAll().WithActiveParametersGroup().WithCAT(Job.MachineGuid).WithCCT().WithLiquidFactors().ForHeadType(MachineProvider.Machine.MachineHeadType).ForSite(MachineProvider.Machine.SiteGuid).BuildAsync()).ToList(); + Rmls = (await new RmlsCollectionBuilder(_db).SetAll().WithActiveParametersGroup().WithCAT(Job.MachineGuid).WithCCT().WithLiquidFactors().WithSpools().ForHeadType(MachineProvider.Machine.MachineHeadType).ForSite(MachineProvider.Machine.SiteGuid).BuildAsync()).ToList(); LogManager.Log("Loading Color Spaces..."); ColorSpaces = await _db.ColorSpaces.ToListAsync(); LogManager.Log("Loading Spool Types..."); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs index 0475f43ac..acdf20fa8 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs @@ -276,7 +276,7 @@ namespace Tango.PPC.Common.Connection public async Task SaveMachine() { await _context.SaveChangesAsync(); - Machine = await new MachineBuilder(_context).SetFirst().WithSettings().BuildAsync(); + Machine = await new MachineBuilder(_context).SetFirst().BuildAsync(); TangoMessenger.Default.Send(new MachineSettingsSavedMessage() { Machine = Machine }); } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs index 003938303..62799c09c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -268,7 +268,7 @@ namespace Tango.PPC.UI.PPCApplication ObservablesStaticCollections.Instance.Initialize(); LogManager.Log("Loading machine from database..."); _machineContext = ObservablesContext.CreateDefault(); - _machine = new MachineBuilder(_machineContext).SetFirst().WithVersion().WithSettings().WithOrganization().WithConfiguration().WithSpools().WithCats().Build(); + _machine = new MachineBuilder(_machineContext).SetFirst().WithVersion().WithOrganization().WithConfiguration().WithSpools().WithCats().Build(); } diff --git a/Software/Visual_Studio/Tango.BL/ActionLogs/DefaultActionLogComparer.cs b/Software/Visual_Studio/Tango.BL/ActionLogs/DefaultActionLogComparer.cs index 0b29dcc8c..1504bab2d 100644 --- a/Software/Visual_Studio/Tango.BL/ActionLogs/DefaultActionLogComparer.cs +++ b/Software/Visual_Studio/Tango.BL/ActionLogs/DefaultActionLogComparer.cs @@ -57,11 +57,11 @@ namespace Tango.BL.ActionLogs scannedObjects.Add(after); } - foreach (var prop in GetProperties(before, after).OrderByDescending(x => x.PropertyType.IsPrimitive || x.PropertyType.IsValueType || x.PropertyType == typeof(String))) + foreach (var prop in GetProperties(before, after).OrderByDescending(x => x.PropertyType.IsValueTypeOrString())) { if (prop.PropertyType == typeof(byte[]) || GetShouldIgnore(prop, before, after)) continue; - if (prop.PropertyType.IsPrimitive || prop.PropertyType.IsValueType || prop.PropertyType == typeof(String)) + if (prop.PropertyType.IsValueTypeOrString()) { object beforeValue = null; object afterValue = null; diff --git a/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs index e64ad3fd5..c74a5af3d 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs @@ -64,6 +64,7 @@ namespace Tango.BL.Builders WithActiveParametersGroup(). WithCCT(). WithCAT(Entity.MachineGuid). + WithSpools(). WithLiquidFactors().Build(); }); } diff --git a/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs index e3bf4f98c..fd9d14baa 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs @@ -15,17 +15,9 @@ namespace Tango.BL.Builders } - public virtual MachineBuilder WithSettings() - { - return AddQueryStep(1, (query) => - { - return query.Include(x => x.DefaultColorSpace).Include(x => x.DefaultRml).Include(x => x.DefaultSpoolType); - }); - } - public virtual MachineBuilder WithVersion() { - return AddQueryStep(2, (query) => + return AddQueryStep(1, (query) => { return query.Include(x => x.MachineVersion); }); diff --git a/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs index ec777e599..d71f50f7a 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs @@ -35,6 +35,14 @@ namespace Tango.BL.Builders }); } + public virtual RmlBuilder WithSpools() + { + return AddQueryStep(2, (query) => + { + return query.Include(x => x.RmlsSpools); + }); + } + public virtual RmlBuilder WithAllParametersGroup() { return AddStep(1, () => diff --git a/Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs index 8a5b4b00c..630f43495 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs @@ -55,6 +55,14 @@ namespace Tango.BL.Builders }); } + public virtual RmlsCollectionBuilder WithSpools() + { + return AddQueryStep(4, (query) => + { + return query.Include(x => x.RmlsSpools); + }); + } + public virtual RmlsCollectionBuilder WithAllParametersGroup() { return AddStep(1, () => diff --git a/Software/Visual_Studio/Tango.BL/DTO/ProcessParametersTableDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ProcessParametersTableDTOBase.cs index 060aa8889..2d431b9df 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/ProcessParametersTableDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/ProcessParametersTableDTOBase.cs @@ -245,22 +245,6 @@ namespace Tango.BL.DTO get; set; } - /// - /// st sp zone1 temp - /// - public Double StSpZone1Temp - { - get; set; - } - - /// - /// st sp zone2 temp - /// - public Double StSpZone2Temp - { - get; set; - } - /// /// r blower flow /// diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlsSpoolDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlsSpoolDTO.cs new file mode 100644 index 000000000..c2839f8a0 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlsSpoolDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class RmlsSpoolDTO : RmlsSpoolDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlsSpoolDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlsSpoolDTOBase.cs new file mode 100644 index 000000000..1598a321f --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlsSpoolDTOBase.cs @@ -0,0 +1,73 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RmlsSpoolDTOBase : ObservableEntityDTO + { + + /// + /// spool type guid + /// + public String SpoolTypeGuid + { + get; set; + } + + /// + /// rml guid + /// + public String RmlGuid + { + get; set; + } + + /// + /// rotations per passage + /// + public Nullable RotationsPerPassage + { + get; set; + } + + /// + /// length + /// + public Nullable Length + { + get; set; + } + + /// + /// backing rate + /// + public Nullable BackingRate + { + get; set; + } + + /// + /// bottom backing rate + /// + public Nullable BottomBackingRate + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/SpoolDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/SpoolDTOBase.cs index 346fc4e6d..c25b254da 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/SpoolDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/SpoolDTOBase.cs @@ -40,7 +40,7 @@ namespace Tango.BL.DTO /// /// start offset pulses /// - public Int32 StartOffsetPulses + public Nullable StartOffsetPulses { get; set; } @@ -48,7 +48,7 @@ namespace Tango.BL.DTO /// /// backing rate /// - public Int32 BackingRate + public Nullable BackingRate { get; set; } @@ -56,7 +56,7 @@ namespace Tango.BL.DTO /// /// segment offset pulses /// - public Int32 SegmentOffsetPulses + public Nullable SegmentOffsetPulses { get; set; } @@ -64,7 +64,15 @@ namespace Tango.BL.DTO /// /// bottom backing rate /// - public Int32 BottomBackingRate + public Nullable BottomBackingRate + { + get; set; + } + + /// + /// limit switch start point offset + /// + public Nullable LimitSwitchStartPointOffset { get; set; } diff --git a/Software/Visual_Studio/Tango.BL/DTO/SpoolTypeDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/SpoolTypeDTOBase.cs index 6edd26e22..5b02cb536 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/SpoolTypeDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/SpoolTypeDTOBase.cs @@ -69,5 +69,45 @@ namespace Tango.BL.DTO get; set; } + /// + /// start offset pulses + /// + public Int32 StartOffsetPulses + { + get; set; + } + + /// + /// backing rate + /// + public Int32 BackingRate + { + get; set; + } + + /// + /// segment offset pulses + /// + public Int32 SegmentOffsetPulses + { + get; set; + } + + /// + /// bottom backing rate + /// + public Int32 BottomBackingRate + { + get; set; + } + + /// + /// limit switch start point offset + /// + public Int32 LimitSwitchStartPointOffset + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorSpaceBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorSpaceBase.cs index b35ca0431..b21332829 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ColorSpaceBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorSpaceBase.cs @@ -39,8 +39,6 @@ namespace Tango.BL.Entities public event EventHandler> JobsChanged; - public event EventHandler> MachinesChanged; - protected Int32 _code; /// @@ -199,31 +197,6 @@ namespace Tango.BL.Entities } } - protected SynchronizedObservableCollection _machines; - - /// - /// Gets or sets the colorspacebase machines. - /// - - public virtual SynchronizedObservableCollection Machines - { - get - { - return _machines; - } - - set - { - if (_machines != value) - { - _machines = value; - - OnMachinesChanged(value); - - } - } - } - /// /// Called when the Code has changed. /// @@ -278,15 +251,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Jobs)); } - /// - /// Called when the Machines has changed. - /// - protected virtual void OnMachinesChanged(SynchronizedObservableCollection machines) - { - MachinesChanged?.Invoke(this, machines); - RaisePropertyChanged(nameof(Machines)); - } - /// /// Initializes a new instance of the class. /// @@ -297,8 +261,6 @@ namespace Tango.BL.Entities Jobs = new SynchronizedObservableCollection(); - Machines = new SynchronizedObservableCollection(); - } } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs index 56e6ebe24..a80e78fec 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs @@ -75,8 +75,6 @@ namespace Tango.BL.Entities public event EventHandler> CatsChanged; - public event EventHandler DefaultColorSpaceChanged; - public event EventHandler ConfigurationChanged; public event EventHandler> JobsChanged; @@ -87,10 +85,6 @@ namespace Tango.BL.Entities public event EventHandler OrganizationChanged; - public event EventHandler DefaultRmlChanged; - - public event EventHandler DefaultSpoolTypeChanged; - public event EventHandler> SpoolsChanged; protected String _serialnumber; @@ -284,7 +278,6 @@ namespace Tango.BL.Entities /// [Column("DEFAULT_RML_GUID")] - [ForeignKey("DefaultRml")] public String DefaultRmlGuid { @@ -389,7 +382,6 @@ namespace Tango.BL.Entities /// [Column("DEFAULT_COLOR_SPACE_GUID")] - [ForeignKey("DefaultColorSpace")] public String DefaultColorSpaceGuid { @@ -442,7 +434,6 @@ namespace Tango.BL.Entities /// [Column("DEFAULT_SPOOL_TYPE_GUID")] - [ForeignKey("DefaultSpoolType")] public String DefaultSpoolTypeGuid { @@ -945,38 +936,6 @@ namespace Tango.BL.Entities } } - protected ColorSpace _defaultcolorspace; - - /// - /// Gets or sets the machinebase color spaces. - /// - - [XmlIgnore] - [JsonIgnore] - public virtual ColorSpace DefaultColorSpace - { - get - { - return _defaultcolorspace; - } - - set - { - if (_defaultcolorspace != value) - { - _defaultcolorspace = value; - - if (DefaultColorSpace != null) - { - DefaultColorSpaceGuid = DefaultColorSpace.Guid; - } - - OnDefaultColorSpaceChanged(value); - - } - } - } - protected Configuration _configuration; /// @@ -1123,70 +1082,6 @@ namespace Tango.BL.Entities } } - protected Rml _defaultrml; - - /// - /// Gets or sets the machinebase rml. - /// - - [XmlIgnore] - [JsonIgnore] - public virtual Rml DefaultRml - { - get - { - return _defaultrml; - } - - set - { - if (_defaultrml != value) - { - _defaultrml = value; - - if (DefaultRml != null) - { - DefaultRmlGuid = DefaultRml.Guid; - } - - OnDefaultRmlChanged(value); - - } - } - } - - protected SpoolType _defaultspooltype; - - /// - /// Gets or sets the machinebase spool types. - /// - - [XmlIgnore] - [JsonIgnore] - public virtual SpoolType DefaultSpoolType - { - get - { - return _defaultspooltype; - } - - set - { - if (_defaultspooltype != value) - { - _defaultspooltype = value; - - if (DefaultSpoolType != null) - { - DefaultSpoolTypeGuid = DefaultSpoolType.Guid; - } - - OnDefaultSpoolTypeChanged(value); - - } - } - } - protected SynchronizedObservableCollection _spools; /// @@ -1428,15 +1323,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Cats)); } - /// - /// Called when the DefaultColorSpace has changed. - /// - protected virtual void OnDefaultColorSpaceChanged(ColorSpace defaultcolorspace) - { - DefaultColorSpaceChanged?.Invoke(this, defaultcolorspace); - RaisePropertyChanged(nameof(DefaultColorSpace)); - } - /// /// Called when the Configuration has changed. /// @@ -1482,24 +1368,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Organization)); } - /// - /// Called when the DefaultRml has changed. - /// - protected virtual void OnDefaultRmlChanged(Rml defaultrml) - { - DefaultRmlChanged?.Invoke(this, defaultrml); - RaisePropertyChanged(nameof(DefaultRml)); - } - - /// - /// Called when the DefaultSpoolType has changed. - /// - protected virtual void OnDefaultSpoolTypeChanged(SpoolType defaultspooltype) - { - DefaultSpoolTypeChanged?.Invoke(this, defaultspooltype); - RaisePropertyChanged(nameof(DefaultSpoolType)); - } - /// /// Called when the Spools has changed. /// diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs index 3f386beb2..7b90623d8 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs @@ -40,11 +40,13 @@ namespace Tango.BL.Entities EntitySerializationFlags.IgnoreGuids | EntitySerializationFlags.IgnoreReferenceTypes); } - public Machine CreatePrototypeMachine(ObservablesContext context) + public async Task CreatePrototypeMachine(ObservablesContext context) { Machine m = new Machine(); - Machine machine = Machine.FromJson(PrototypeMachineData, new EntitySerializationStrategy() + String protoTypeData = (await context.MachineVersions.SingleOrDefaultAsync(x => x.Guid == Guid)).PrototypeMachineData; + + Machine machine = Machine.FromJson(protoTypeData, new EntitySerializationStrategy() .Include(() => m.Configuration) .Ignore(() => m.Name) .Ignore(() => m.MachinesEvents) diff --git a/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTable.cs b/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTable.cs index f8d39862d..0a78dbc93 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTable.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTable.cs @@ -62,8 +62,8 @@ namespace Tango.BL.Entities heaters.Add(HeadZone10Temp); heaters.Add(HeadZone11Temp); heaters.Add(HeadZone12Temp); - heaters.Add(StSpZone1Temp); - heaters.Add(StSpZone2Temp); + heaters.Add(LBlowerTemp); + heaters.Add(RBlowerTemp); return heaters.Average(); } diff --git a/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTableBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTableBase.cs index 1d70aee98..2d9f1e4fb 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTableBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ProcessParametersTableBase.cs @@ -81,10 +81,6 @@ namespace Tango.BL.Entities public event EventHandler HeadZone12TempChanged; - public event EventHandler StSpZone1TempChanged; - - public event EventHandler StSpZone2TempChanged; - public event EventHandler RBlowerFlowChanged; public event EventHandler RBlowerTempChanged; @@ -954,68 +950,6 @@ namespace Tango.BL.Entities } } - protected Double _stspzone1temp; - - /// - /// Gets or sets the processparameterstablebase st sp zone1 temp. - /// - - [Column("ST_SP_ZONE1_TEMP")] - - [StringFormat("0.0")] - - [PropertyIndex(21)] - - public Double StSpZone1Temp - { - get - { - return _stspzone1temp; - } - - set - { - if (_stspzone1temp != value) - { - _stspzone1temp = value; - - OnStSpZone1TempChanged(value); - - } - } - } - - protected Double _stspzone2temp; - - /// - /// Gets or sets the processparameterstablebase st sp zone2 temp. - /// - - [Column("ST_SP_ZONE2_TEMP")] - - [StringFormat("0.0")] - - [PropertyIndex(22)] - - public Double StSpZone2Temp - { - get - { - return _stspzone2temp; - } - - set - { - if (_stspzone2temp != value) - { - _stspzone2temp = value; - - OnStSpZone2TempChanged(value); - - } - } - } - protected Double _rblowerflow; /// @@ -1415,24 +1349,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(HeadZone12Temp)); } - /// - /// Called when the StSpZone1Temp has changed. - /// - protected virtual void OnStSpZone1TempChanged(Double stspzone1temp) - { - StSpZone1TempChanged?.Invoke(this, stspzone1temp); - RaisePropertyChanged(nameof(StSpZone1Temp)); - } - - /// - /// Called when the StSpZone2Temp has changed. - /// - protected virtual void OnStSpZone2TempChanged(Double stspzone2temp) - { - StSpZone2TempChanged?.Invoke(this, stspzone2temp); - RaisePropertyChanged(nameof(StSpZone2Temp)); - } - /// /// Called when the RBlowerFlow has changed. /// diff --git a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs index ddaacfbd0..679226fd2 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs @@ -103,12 +103,13 @@ namespace Tango.BL.Entities { return Task.Factory.StartNew(() => { - var rml = new RmlBuilder(context).Set(Guid).WithActiveParametersGroup().WithCCT().WithLiquidFactors().Build(); + var rml = new RmlBuilder(context).Set(Guid).WithActiveParametersGroup().WithCCT().WithLiquidFactors().WithSpools().Build(); String result = rml.ToJson(new EntitySerializationStrategy() .Include(() => rml.Cct) .Include(() => rml.LiquidTypesRmls) .Include(() => rml.ProcessParametersTablesGroups) + .Include(() => rml.RmlsSpools) .Include(typeof(ProcessParametersTablesGroup).GetProperty(nameof(ProcessParametersTablesGroup.ProcessParametersTables))), EntitySerializationFlags.IgnoreCollections | EntitySerializationFlags.IgnoreReferenceTypes | EntitySerializationFlags.Indented); diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs index 41ae660ee..a592fc694 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs @@ -91,8 +91,6 @@ namespace Tango.BL.Entities public event EventHandler> LiquidTypesRmlsChanged; - public event EventHandler> MachinesChanged; - public event EventHandler MediaConditionChanged; public event EventHandler MediaMaterialChanged; @@ -101,6 +99,8 @@ namespace Tango.BL.Entities public event EventHandler> ProcessParametersTablesGroupsChanged; + public event EventHandler> RmlsSpoolsChanged; + public event EventHandler> SitesRmlsChanged; protected String _name; @@ -1161,31 +1161,6 @@ namespace Tango.BL.Entities } } - protected SynchronizedObservableCollection _machines; - - /// - /// Gets or sets the rmlbase machines. - /// - - public virtual SynchronizedObservableCollection Machines - { - get - { - return _machines; - } - - set - { - if (_machines != value) - { - _machines = value; - - OnMachinesChanged(value); - - } - } - } - protected MediaCondition _mediacondition; /// @@ -1307,6 +1282,31 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection _rmlsspools; + + /// + /// Gets or sets the rmlbase rmls spools. + /// + + public virtual SynchronizedObservableCollection RmlsSpools + { + get + { + return _rmlsspools; + } + + set + { + if (_rmlsspools != value) + { + _rmlsspools = value; + + OnRmlsSpoolsChanged(value); + + } + } + } + protected SynchronizedObservableCollection _sitesrmls; /// @@ -1620,15 +1620,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(LiquidTypesRmls)); } - /// - /// Called when the Machines has changed. - /// - protected virtual void OnMachinesChanged(SynchronizedObservableCollection machines) - { - MachinesChanged?.Invoke(this, machines); - RaisePropertyChanged(nameof(Machines)); - } - /// /// Called when the MediaCondition has changed. /// @@ -1665,6 +1656,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(ProcessParametersTablesGroups)); } + /// + /// Called when the RmlsSpools has changed. + /// + protected virtual void OnRmlsSpoolsChanged(SynchronizedObservableCollection rmlsspools) + { + RmlsSpoolsChanged?.Invoke(this, rmlsspools); + RaisePropertyChanged(nameof(RmlsSpools)); + } + /// /// Called when the SitesRmls has changed. /// @@ -1688,10 +1688,10 @@ namespace Tango.BL.Entities LiquidTypesRmls = new SynchronizedObservableCollection(); - Machines = new SynchronizedObservableCollection(); - ProcessParametersTablesGroups = new SynchronizedObservableCollection(); + RmlsSpools = new SynchronizedObservableCollection(); + SitesRmls = new SynchronizedObservableCollection(); } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlsSpool.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlsSpool.cs new file mode 100644 index 000000000..633180541 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlsSpool.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.Entities +{ + public class RmlsSpool : RmlsSpoolBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlsSpoolBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlsSpoolBase.cs new file mode 100644 index 000000000..fee4ef6b4 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlsSpoolBase.cs @@ -0,0 +1,327 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RMLS_SPOOLS")] + public abstract class RmlsSpoolBase : ObservableEntity + { + + public event EventHandler> RotationsPerPassageChanged; + + public event EventHandler> LengthChanged; + + public event EventHandler> BackingRateChanged; + + public event EventHandler> BottomBackingRateChanged; + + public event EventHandler RmlChanged; + + public event EventHandler SpoolTypeChanged; + + protected String _spooltypeguid; + + /// + /// Gets or sets the rmlsspoolbase spool type guid. + /// + + [Column("SPOOL_TYPE_GUID")] + [ForeignKey("SpoolType")] + + public String SpoolTypeGuid + { + get + { + return _spooltypeguid; + } + + set + { + if (_spooltypeguid != value) + { + _spooltypeguid = value; + + } + } + } + + protected String _rmlguid; + + /// + /// Gets or sets the rmlsspoolbase rml guid. + /// + + [Column("RML_GUID")] + [ForeignKey("Rml")] + + public String RmlGuid + { + get + { + return _rmlguid; + } + + set + { + if (_rmlguid != value) + { + _rmlguid = value; + + } + } + } + + protected Nullable _rotationsperpassage; + + /// + /// Gets or sets the rmlsspoolbase rotations per passage. + /// + + [Column("ROTATIONS_PER_PASSAGE")] + + public Nullable RotationsPerPassage + { + get + { + return _rotationsperpassage; + } + + set + { + if (_rotationsperpassage != value) + { + _rotationsperpassage = value; + + OnRotationsPerPassageChanged(value); + + } + } + } + + protected Nullable _length; + + /// + /// Gets or sets the rmlsspoolbase length. + /// + + [Column("LENGTH")] + + public Nullable Length + { + get + { + return _length; + } + + set + { + if (_length != value) + { + _length = value; + + OnLengthChanged(value); + + } + } + } + + protected Nullable _backingrate; + + /// + /// Gets or sets the rmlsspoolbase backing rate. + /// + + [Column("BACKING_RATE")] + + public Nullable BackingRate + { + get + { + return _backingrate; + } + + set + { + if (_backingrate != value) + { + _backingrate = value; + + OnBackingRateChanged(value); + + } + } + } + + protected Nullable _bottombackingrate; + + /// + /// Gets or sets the rmlsspoolbase bottom backing rate. + /// + + [Column("BOTTOM_BACKING_RATE")] + + public Nullable BottomBackingRate + { + get + { + return _bottombackingrate; + } + + set + { + if (_bottombackingrate != value) + { + _bottombackingrate = value; + + OnBottomBackingRateChanged(value); + + } + } + } + + protected Rml _rml; + + /// + /// Gets or sets the rmlsspoolbase rml. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual Rml Rml + { + get + { + return _rml; + } + + set + { + if (_rml != value) + { + _rml = value; + + if (Rml != null) + { + RmlGuid = Rml.Guid; + } + + OnRmlChanged(value); + + } + } + } + + protected SpoolType _spooltype; + + /// + /// Gets or sets the rmlsspoolbase spool types. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual SpoolType SpoolType + { + get + { + return _spooltype; + } + + set + { + if (_spooltype != value) + { + _spooltype = value; + + if (SpoolType != null) + { + SpoolTypeGuid = SpoolType.Guid; + } + + OnSpoolTypeChanged(value); + + } + } + } + + /// + /// Called when the RotationsPerPassage has changed. + /// + protected virtual void OnRotationsPerPassageChanged(Nullable rotationsperpassage) + { + RotationsPerPassageChanged?.Invoke(this, rotationsperpassage); + RaisePropertyChanged(nameof(RotationsPerPassage)); + } + + /// + /// Called when the Length has changed. + /// + protected virtual void OnLengthChanged(Nullable length) + { + LengthChanged?.Invoke(this, length); + RaisePropertyChanged(nameof(Length)); + } + + /// + /// Called when the BackingRate has changed. + /// + protected virtual void OnBackingRateChanged(Nullable backingrate) + { + BackingRateChanged?.Invoke(this, backingrate); + RaisePropertyChanged(nameof(BackingRate)); + } + + /// + /// Called when the BottomBackingRate has changed. + /// + protected virtual void OnBottomBackingRateChanged(Nullable bottombackingrate) + { + BottomBackingRateChanged?.Invoke(this, bottombackingrate); + RaisePropertyChanged(nameof(BottomBackingRate)); + } + + /// + /// Called when the Rml has changed. + /// + protected virtual void OnRmlChanged(Rml rml) + { + RmlChanged?.Invoke(this, rml); + RaisePropertyChanged(nameof(Rml)); + } + + /// + /// Called when the SpoolType has changed. + /// + protected virtual void OnSpoolTypeChanged(SpoolType spooltype) + { + SpoolTypeChanged?.Invoke(this, spooltype); + RaisePropertyChanged(nameof(SpoolType)); + } + + /// + /// Initializes a new instance of the class. + /// + public RmlsSpoolBase() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/SpoolBase.cs b/Software/Visual_Studio/Tango.BL/Entities/SpoolBase.cs index 303f2ecbb..b1ac62815 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/SpoolBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/SpoolBase.cs @@ -27,13 +27,15 @@ namespace Tango.BL.Entities public abstract class SpoolBase : ObservableEntity { - public event EventHandler StartOffsetPulsesChanged; + public event EventHandler> StartOffsetPulsesChanged; - public event EventHandler BackingRateChanged; + public event EventHandler> BackingRateChanged; - public event EventHandler SegmentOffsetPulsesChanged; + public event EventHandler> SegmentOffsetPulsesChanged; - public event EventHandler BottomBackingRateChanged; + public event EventHandler> BottomBackingRateChanged; + + public event EventHandler> LimitSwitchStartPointOffsetChanged; public event EventHandler MachineChanged; @@ -91,7 +93,7 @@ namespace Tango.BL.Entities } } - protected Int32 _startoffsetpulses; + protected Nullable _startoffsetpulses; /// /// Gets or sets the spoolbase start offset pulses. @@ -99,7 +101,7 @@ namespace Tango.BL.Entities [Column("START_OFFSET_PULSES")] - public Int32 StartOffsetPulses + public Nullable StartOffsetPulses { get { @@ -118,7 +120,7 @@ namespace Tango.BL.Entities } } - protected Int32 _backingrate; + protected Nullable _backingrate; /// /// Gets or sets the spoolbase backing rate. @@ -126,7 +128,7 @@ namespace Tango.BL.Entities [Column("BACKING_RATE")] - public Int32 BackingRate + public Nullable BackingRate { get { @@ -145,7 +147,7 @@ namespace Tango.BL.Entities } } - protected Int32 _segmentoffsetpulses; + protected Nullable _segmentoffsetpulses; /// /// Gets or sets the spoolbase segment offset pulses. @@ -153,7 +155,7 @@ namespace Tango.BL.Entities [Column("SEGMENT_OFFSET_PULSES")] - public Int32 SegmentOffsetPulses + public Nullable SegmentOffsetPulses { get { @@ -172,7 +174,7 @@ namespace Tango.BL.Entities } } - protected Int32 _bottombackingrate; + protected Nullable _bottombackingrate; /// /// Gets or sets the spoolbase bottom backing rate. @@ -180,7 +182,7 @@ namespace Tango.BL.Entities [Column("BOTTOM_BACKING_RATE")] - public Int32 BottomBackingRate + public Nullable BottomBackingRate { get { @@ -199,6 +201,33 @@ namespace Tango.BL.Entities } } + protected Nullable _limitswitchstartpointoffset; + + /// + /// Gets or sets the spoolbase limit switch start point offset. + /// + + [Column("LIMIT_SWITCH_START_POINT_OFFSET")] + + public Nullable LimitSwitchStartPointOffset + { + get + { + return _limitswitchstartpointoffset; + } + + set + { + if (_limitswitchstartpointoffset != value) + { + _limitswitchstartpointoffset = value; + + OnLimitSwitchStartPointOffsetChanged(value); + + } + } + } + protected Machine _machine; /// @@ -266,7 +295,7 @@ namespace Tango.BL.Entities /// /// Called when the StartOffsetPulses has changed. /// - protected virtual void OnStartOffsetPulsesChanged(Int32 startoffsetpulses) + protected virtual void OnStartOffsetPulsesChanged(Nullable startoffsetpulses) { StartOffsetPulsesChanged?.Invoke(this, startoffsetpulses); RaisePropertyChanged(nameof(StartOffsetPulses)); @@ -275,7 +304,7 @@ namespace Tango.BL.Entities /// /// Called when the BackingRate has changed. /// - protected virtual void OnBackingRateChanged(Int32 backingrate) + protected virtual void OnBackingRateChanged(Nullable backingrate) { BackingRateChanged?.Invoke(this, backingrate); RaisePropertyChanged(nameof(BackingRate)); @@ -284,7 +313,7 @@ namespace Tango.BL.Entities /// /// Called when the SegmentOffsetPulses has changed. /// - protected virtual void OnSegmentOffsetPulsesChanged(Int32 segmentoffsetpulses) + protected virtual void OnSegmentOffsetPulsesChanged(Nullable segmentoffsetpulses) { SegmentOffsetPulsesChanged?.Invoke(this, segmentoffsetpulses); RaisePropertyChanged(nameof(SegmentOffsetPulses)); @@ -293,12 +322,21 @@ namespace Tango.BL.Entities /// /// Called when the BottomBackingRate has changed. /// - protected virtual void OnBottomBackingRateChanged(Int32 bottombackingrate) + protected virtual void OnBottomBackingRateChanged(Nullable bottombackingrate) { BottomBackingRateChanged?.Invoke(this, bottombackingrate); RaisePropertyChanged(nameof(BottomBackingRate)); } + /// + /// Called when the LimitSwitchStartPointOffset has changed. + /// + protected virtual void OnLimitSwitchStartPointOffsetChanged(Nullable limitswitchstartpointoffset) + { + LimitSwitchStartPointOffsetChanged?.Invoke(this, limitswitchstartpointoffset); + RaisePropertyChanged(nameof(LimitSwitchStartPointOffset)); + } + /// /// Called when the Machine has changed. /// diff --git a/Software/Visual_Studio/Tango.BL/Entities/SpoolTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/SpoolTypeBase.cs index 778369948..a3e59bbc7 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/SpoolTypeBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/SpoolTypeBase.cs @@ -39,9 +39,19 @@ namespace Tango.BL.Entities public event EventHandler RotationsPerPassageChanged; + public event EventHandler StartOffsetPulsesChanged; + + public event EventHandler BackingRateChanged; + + public event EventHandler SegmentOffsetPulsesChanged; + + public event EventHandler BottomBackingRateChanged; + + public event EventHandler LimitSwitchStartPointOffsetChanged; + public event EventHandler> JobsChanged; - public event EventHandler> MachinesChanged; + public event EventHandler> RmlsSpoolsChanged; public event EventHandler> SpoolsChanged; @@ -207,6 +217,141 @@ namespace Tango.BL.Entities } } + protected Int32 _startoffsetpulses; + + /// + /// Gets or sets the spooltypebase start offset pulses. + /// + + [Column("START_OFFSET_PULSES")] + + public Int32 StartOffsetPulses + { + get + { + return _startoffsetpulses; + } + + set + { + if (_startoffsetpulses != value) + { + _startoffsetpulses = value; + + OnStartOffsetPulsesChanged(value); + + } + } + } + + protected Int32 _backingrate; + + /// + /// Gets or sets the spooltypebase backing rate. + /// + + [Column("BACKING_RATE")] + + public Int32 BackingRate + { + get + { + return _backingrate; + } + + set + { + if (_backingrate != value) + { + _backingrate = value; + + OnBackingRateChanged(value); + + } + } + } + + protected Int32 _segmentoffsetpulses; + + /// + /// Gets or sets the spooltypebase segment offset pulses. + /// + + [Column("SEGMENT_OFFSET_PULSES")] + + public Int32 SegmentOffsetPulses + { + get + { + return _segmentoffsetpulses; + } + + set + { + if (_segmentoffsetpulses != value) + { + _segmentoffsetpulses = value; + + OnSegmentOffsetPulsesChanged(value); + + } + } + } + + protected Int32 _bottombackingrate; + + /// + /// Gets or sets the spooltypebase bottom backing rate. + /// + + [Column("BOTTOM_BACKING_RATE")] + + public Int32 BottomBackingRate + { + get + { + return _bottombackingrate; + } + + set + { + if (_bottombackingrate != value) + { + _bottombackingrate = value; + + OnBottomBackingRateChanged(value); + + } + } + } + + protected Int32 _limitswitchstartpointoffset; + + /// + /// Gets or sets the spooltypebase limit switch start point offset. + /// + + [Column("LIMIT_SWITCH_START_POINT_OFFSET")] + + public Int32 LimitSwitchStartPointOffset + { + get + { + return _limitswitchstartpointoffset; + } + + set + { + if (_limitswitchstartpointoffset != value) + { + _limitswitchstartpointoffset = value; + + OnLimitSwitchStartPointOffsetChanged(value); + + } + } + } + protected SynchronizedObservableCollection _jobs; /// @@ -232,26 +377,26 @@ namespace Tango.BL.Entities } } - protected SynchronizedObservableCollection _machines; + protected SynchronizedObservableCollection _rmlsspools; /// - /// Gets or sets the spooltypebase machines. + /// Gets or sets the spooltypebase rmls spools. /// - public virtual SynchronizedObservableCollection Machines + public virtual SynchronizedObservableCollection RmlsSpools { get { - return _machines; + return _rmlsspools; } set { - if (_machines != value) + if (_rmlsspools != value) { - _machines = value; + _rmlsspools = value; - OnMachinesChanged(value); + OnRmlsSpoolsChanged(value); } } @@ -336,6 +481,51 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(RotationsPerPassage)); } + /// + /// Called when the StartOffsetPulses has changed. + /// + protected virtual void OnStartOffsetPulsesChanged(Int32 startoffsetpulses) + { + StartOffsetPulsesChanged?.Invoke(this, startoffsetpulses); + RaisePropertyChanged(nameof(StartOffsetPulses)); + } + + /// + /// Called when the BackingRate has changed. + /// + protected virtual void OnBackingRateChanged(Int32 backingrate) + { + BackingRateChanged?.Invoke(this, backingrate); + RaisePropertyChanged(nameof(BackingRate)); + } + + /// + /// Called when the SegmentOffsetPulses has changed. + /// + protected virtual void OnSegmentOffsetPulsesChanged(Int32 segmentoffsetpulses) + { + SegmentOffsetPulsesChanged?.Invoke(this, segmentoffsetpulses); + RaisePropertyChanged(nameof(SegmentOffsetPulses)); + } + + /// + /// Called when the BottomBackingRate has changed. + /// + protected virtual void OnBottomBackingRateChanged(Int32 bottombackingrate) + { + BottomBackingRateChanged?.Invoke(this, bottombackingrate); + RaisePropertyChanged(nameof(BottomBackingRate)); + } + + /// + /// Called when the LimitSwitchStartPointOffset has changed. + /// + protected virtual void OnLimitSwitchStartPointOffsetChanged(Int32 limitswitchstartpointoffset) + { + LimitSwitchStartPointOffsetChanged?.Invoke(this, limitswitchstartpointoffset); + RaisePropertyChanged(nameof(LimitSwitchStartPointOffset)); + } + /// /// Called when the Jobs has changed. /// @@ -346,12 +536,12 @@ namespace Tango.BL.Entities } /// - /// Called when the Machines has changed. + /// Called when the RmlsSpools has changed. /// - protected virtual void OnMachinesChanged(SynchronizedObservableCollection machines) + protected virtual void OnRmlsSpoolsChanged(SynchronizedObservableCollection rmlsspools) { - MachinesChanged?.Invoke(this, machines); - RaisePropertyChanged(nameof(Machines)); + RmlsSpoolsChanged?.Invoke(this, rmlsspools); + RaisePropertyChanged(nameof(RmlsSpools)); } /// @@ -371,7 +561,7 @@ namespace Tango.BL.Entities Jobs = new SynchronizedObservableCollection(); - Machines = new SynchronizedObservableCollection(); + RmlsSpools = new SynchronizedObservableCollection(); Spools = new SynchronizedObservableCollection(); diff --git a/Software/Visual_Studio/Tango.BL/Entities/SysdiagramBase.cs b/Software/Visual_Studio/Tango.BL/Entities/SysdiagramBase.cs index 6be908bb4..5480d47f1 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/SysdiagramBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/SysdiagramBase.cs @@ -27,17 +27,19 @@ namespace Tango.BL.Entities public abstract class SysdiagramBase : ObservableEntity { - public event EventHandler> VersionChanged; + public event EventHandler> VersionChanged; public event EventHandler DefinitionChanged; - protected SynchronizedObservableCollection _version; + protected Nullable _version; /// /// Gets or sets the sysdiagrambase version. /// - public virtual SynchronizedObservableCollection Version + [Column("version")] + + public Nullable Version { get { @@ -86,7 +88,7 @@ namespace Tango.BL.Entities /// /// Called when the Version has changed. /// - protected virtual void OnVersionChanged(SynchronizedObservableCollection version) + protected virtual void OnVersionChanged(Nullable version) { VersionChanged?.Invoke(this, version); RaisePropertyChanged(nameof(Version)); @@ -106,9 +108,6 @@ namespace Tango.BL.Entities /// public SysdiagramBase() : base() { - - Version = new SynchronizedObservableCollection(); - } } } diff --git a/Software/Visual_Studio/Tango.BL/ObservableEntity.cs b/Software/Visual_Studio/Tango.BL/ObservableEntity.cs index e3bba77bd..a6dcdbbec 100644 --- a/Software/Visual_Studio/Tango.BL/ObservableEntity.cs +++ b/Software/Visual_Studio/Tango.BL/ObservableEntity.cs @@ -283,7 +283,7 @@ namespace Tango.BL foreach (var prop in typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.SetMethod != null)) { - if (!prop.PropertyType.IsGenericType) + if (!prop.PropertyType.IsGenericTypeAndNotNullable()) { prop.SetValue(cloned, prop.GetValue(this)); } @@ -378,7 +378,7 @@ namespace Tango.BL if (flags.HasFlag(EntitySerializationFlags.IgnoreReferenceTypes)) { - var props = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => !x.PropertyType.IsPrimitive && !x.PropertyType.IsGenericType && x.PropertyType != typeof(byte[]) && x.PropertyType != typeof(String) && x.PropertyType != typeof(DateTime)).ToList(); + var props = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => !x.PropertyType.IsPrimitive && !x.PropertyType.IsGenericType && !x.PropertyType.IsNullable() && x.PropertyType != typeof(byte[]) && x.PropertyType != typeof(String) && x.PropertyType != typeof(DateTime)).ToList(); foreach (var prop in props) { @@ -388,7 +388,7 @@ namespace Tango.BL if (flags.HasFlag(EntitySerializationFlags.IgnoreCollections)) { - var props = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericType).ToList(); + var props = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericTypeAndNotNullable()).ToList(); foreach (var prop in props) { diff --git a/Software/Visual_Studio/Tango.BL/ObservableEntityDTO.cs b/Software/Visual_Studio/Tango.BL/ObservableEntityDTO.cs index 4c5ca6ae4..ce4cb3550 100644 --- a/Software/Visual_Studio/Tango.BL/ObservableEntityDTO.cs +++ b/Software/Visual_Studio/Tango.BL/ObservableEntityDTO.cs @@ -53,7 +53,7 @@ namespace Tango.BL var observableProp = typeof(T).GetProperty(prop.Name); if (observableProp != null) { - if (prop.PropertyType.IsPrimitive || prop.PropertyType.IsValueType || prop.PropertyType == typeof(String) || prop.PropertyType == typeof(byte[])) + if (prop.PropertyType.IsValueTypeOrString() || prop.PropertyType == typeof(byte[])) { prop.SetValue(dto, observableProp.GetValue(observable)); } @@ -114,7 +114,7 @@ namespace Tango.BL var observableProp = typeof(T).GetProperty(prop.Name); if (observableProp != null) { - if (prop.PropertyType.IsPrimitive || prop.PropertyType.IsValueType || prop.PropertyType == typeof(String) || prop.PropertyType == typeof(byte[])) + if (prop.PropertyType.IsValueTypeOrString() || prop.PropertyType == typeof(byte[])) { observableProp.SetValue(observable, prop.GetValue(this)); } @@ -189,7 +189,7 @@ namespace Tango.BL var observableProp = typeof(T).GetProperty(prop.Name); if (observableProp != null) { - if (prop.PropertyType.IsPrimitive || prop.PropertyType.IsValueType || prop.PropertyType == typeof(String) || prop.PropertyType == typeof(byte[])) + if (prop.PropertyType.IsValueTypeOrString() || prop.PropertyType == typeof(byte[])) { var observableValue = observableProp.GetValue(observable); var dtoValue = prop.GetValue(this); diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs index 3511a7624..b2881c741 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs @@ -494,6 +494,14 @@ namespace Tango.BL get; set; } + /// + /// Gets or sets the RmlsSpools. + /// + public DbSet RmlsSpools + { + get; set; + } + /// /// Gets or sets the Roles. /// diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs index cccc2fcae..59b5253bc 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs @@ -2141,6 +2141,42 @@ namespace Tango.BL } + private ObservableCollection _rmlsspools; + /// + /// Gets or sets the RmlsSpools. + /// + public ObservableCollection RmlsSpools + { + get + { + return _rmlsspools; + } + + set + { + _rmlsspools = value; RaisePropertyChanged(nameof(RmlsSpools)); + } + + } + + private ICollectionView _rmlsspoolsViewSource; + /// + /// Gets or sets the RmlsSpools View Source. + /// + public ICollectionView RmlsSpoolsViewSource + { + get + { + return _rmlsspoolsViewSource; + } + + set + { + _rmlsspoolsViewSource = value; RaisePropertyChanged(nameof(RmlsSpoolsViewSource)); + } + + } + private ObservableCollection _roles; /// /// Gets or sets the Roles. @@ -2985,6 +3021,8 @@ namespace Tango.BL RmlsViewSource = CreateCollectionView(Rmls); + RmlsSpoolsViewSource = CreateCollectionView(RmlsSpools); + RolesViewSource = CreateCollectionView(Roles); RolesPermissionsViewSource = CreateCollectionView(RolesPermissions); diff --git a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs index 4e108deb2..178a62595 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs @@ -2141,6 +2141,42 @@ namespace Tango.BL } + private ObservableCollection _rmlsspools; + /// + /// Gets or sets the RmlsSpools. + /// + public ObservableCollection RmlsSpools + { + get + { + return _rmlsspools; + } + + set + { + _rmlsspools = value; RaisePropertyChanged(nameof(RmlsSpools)); + } + + } + + private ICollectionView _rmlsspoolsViewSource; + /// + /// Gets or sets the RmlsSpools View Source. + /// + public ICollectionView RmlsSpoolsViewSource + { + get + { + return _rmlsspoolsViewSource; + } + + set + { + _rmlsspoolsViewSource = value; RaisePropertyChanged(nameof(RmlsSpoolsViewSource)); + } + + } + private ObservableCollection _roles; /// /// Gets or sets the Roles. @@ -2985,6 +3021,8 @@ namespace Tango.BL RmlsViewSource = CreateCollectionView(Rmls); + RmlsSpoolsViewSource = CreateCollectionView(RmlsSpools); + RolesViewSource = CreateCollectionView(Roles); RolesPermissionsViewSource = CreateCollectionView(RolesPermissions); diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index 2a5090c2e..f222f8ff6 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -248,6 +248,8 @@ + + @@ -358,6 +360,8 @@ + + @@ -610,7 +614,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs b/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs index e8ef9addd..cee991507 100644 --- a/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs +++ b/Software/Visual_Studio/Tango.Core/ExtensionMethods/ObjectExtensions.cs @@ -35,9 +35,9 @@ namespace Tango.Core.ExtensionMethods NoReferenceTypes = 8, /// - /// Map only primitive values. + /// Map only value types. /// - PrimitivesOnly, + ValueTypesOnly, } /// @@ -59,7 +59,7 @@ namespace Tango.Core.ExtensionMethods foreach (var prop in typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.SetMethod != null)) { - if (!prop.PropertyType.IsGenericType) + if (!prop.PropertyType.IsGenericTypeAndNotNullable()) { prop.SetValue(cloned, prop.GetValue(obj)); } @@ -78,7 +78,7 @@ namespace Tango.Core.ExtensionMethods { foreach (var prop in typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.SetMethod != null)) { - if (!prop.PropertyType.IsGenericType) + if (!prop.PropertyType.IsGenericTypeAndNotNullable()) { prop.SetValue(destination, prop.GetValue(source)); } @@ -104,7 +104,7 @@ namespace Tango.Core.ExtensionMethods if (!condition(prop)) continue; } - if (!propType.IsPrimitive && flags.HasFlag(MappingFlags.PrimitivesOnly)) + if (!propType.IsValueType && flags.HasFlag(MappingFlags.ValueTypesOnly)) { continue; } @@ -141,7 +141,7 @@ namespace Tango.Core.ExtensionMethods /// The destination. public static void MapPrimitivesTo(this object source, object destination) { - source.MapPropertiesTo(destination, MappingFlags.PrimitivesOnly); + source.MapPropertiesTo(destination, MappingFlags.ValueTypesOnly); } /// diff --git a/Software/Visual_Studio/Tango.Core/ExtensionMethods/TypeExtensions.cs b/Software/Visual_Studio/Tango.Core/ExtensionMethods/TypeExtensions.cs index c6fd3d811..66978ec19 100644 --- a/Software/Visual_Studio/Tango.Core/ExtensionMethods/TypeExtensions.cs +++ b/Software/Visual_Studio/Tango.Core/ExtensionMethods/TypeExtensions.cs @@ -122,4 +122,19 @@ public static class TypeExtensions { return type.GetProperties().Where(x => x.GetCustomAttribute() != null); } + + public static bool IsGenericTypeAndNotNullable(this Type type) + { + return type.IsGenericType && Nullable.GetUnderlyingType(type) == null; + } + + public static bool IsNullable(this Type type) + { + return Nullable.GetUnderlyingType(type) != null; + } + + public static bool IsValueTypeOrString(this Type type) + { + return type.IsValueType || type == typeof(String); + } } diff --git a/Software/Visual_Studio/Tango.Core/Tango.Core.csproj b/Software/Visual_Studio/Tango.Core/Tango.Core.csproj index 891c5e58f..7c794c276 100644 --- a/Software/Visual_Studio/Tango.Core/Tango.Core.csproj +++ b/Software/Visual_Studio/Tango.Core/Tango.Core.csproj @@ -205,7 +205,7 @@ - + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_SPACES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_SPACES.cs index d2a9c4479..e1a81b759 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_SPACES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_SPACES.cs @@ -19,7 +19,6 @@ namespace Tango.DAL.Remote.DB { this.BRUSH_STOPS = new HashSet(); this.JOBS = new HashSet(); - this.MACHINES = new HashSet(); } public int ID { get; set; } @@ -34,7 +33,5 @@ namespace Tango.DAL.Remote.DB public virtual ICollection BRUSH_STOPS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection JOBS { get; set; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection MACHINES { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs index 7f4aa62a9..d4bf7c867 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs @@ -60,7 +60,6 @@ namespace Tango.DAL.Remote.DB [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection CATS { get; set; } - public virtual COLOR_SPACES COLOR_SPACES { get; set; } public virtual CONFIGURATION CONFIGURATION { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection JOBS { get; set; } @@ -68,8 +67,6 @@ namespace Tango.DAL.Remote.DB [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection MACHINES_EVENTS { get; set; } public virtual ORGANIZATION ORGANIZATION { get; set; } - public virtual RML RML { get; set; } - public virtual SPOOL_TYPES SPOOL_TYPES { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection SPOOLS { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/PROCESS_PARAMETERS_TABLES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/PROCESS_PARAMETERS_TABLES.cs index bfa6bbe58..2a04633bf 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/PROCESS_PARAMETERS_TABLES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/PROCESS_PARAMETERS_TABLES.cs @@ -45,8 +45,6 @@ namespace Tango.DAL.Remote.DB public double HEAD_ZONE10_TEMP { get; set; } public double HEAD_ZONE11_TEMP { get; set; } public double HEAD_ZONE12_TEMP { get; set; } - public double ST_SP_ZONE1_TEMP { get; set; } - public double ST_SP_ZONE2_TEMP { get; set; } public double R_BLOWER_FLOW { get; set; } public double R_BLOWER_TEMP { get; set; } public double L_BLOWER_FLOW { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs index 2c0ac2a33..2772e1958 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs @@ -21,8 +21,8 @@ namespace Tango.DAL.Remote.DB this.COLOR_CATALOGS_ITEMS_RECIPES = new HashSet(); this.JOBS = new HashSet(); this.LIQUID_TYPES_RMLS = new HashSet(); - this.MACHINES = new HashSet(); this.PROCESS_PARAMETERS_TABLES_GROUPS = new HashSet(); + this.RMLS_SPOOLS = new HashSet(); this.SITES_RMLS = new HashSet(); } @@ -73,14 +73,14 @@ namespace Tango.DAL.Remote.DB public virtual LINEAR_MASS_DENSITY_UNITS LINEAR_MASS_DENSITY_UNITS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection LIQUID_TYPES_RMLS { get; set; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection MACHINES { get; set; } public virtual MEDIA_CONDITIONS MEDIA_CONDITIONS { get; set; } public virtual MEDIA_MATERIALS MEDIA_MATERIALS { get; set; } public virtual MEDIA_PURPOSES MEDIA_PURPOSES { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection PROCESS_PARAMETERS_TABLES_GROUPS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_SPOOLS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection SITES_RMLS { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_SPOOLS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_SPOOLS.cs new file mode 100644 index 000000000..a314530ec --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_SPOOLS.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class RMLS_SPOOLS + { + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string SPOOL_TYPE_GUID { get; set; } + public string RML_GUID { get; set; } + public Nullable ROTATIONS_PER_PASSAGE { get; set; } + public Nullable LENGTH { get; set; } + public Nullable BACKING_RATE { get; set; } + public Nullable BOTTOM_BACKING_RATE { get; set; } + + public virtual RML RML { get; set; } + public virtual SPOOL_TYPES SPOOL_TYPES { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs index 2a158ad49..62ae00ce7 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs @@ -84,6 +84,7 @@ namespace Tango.DAL.Remote.DB public virtual DbSet PROCESS_PARAMETERS_TABLES { get; set; } public virtual DbSet PROCESS_PARAMETERS_TABLES_GROUPS { get; set; } public virtual DbSet RMLS { get; set; } + public virtual DbSet RMLS_SPOOLS { get; set; } public virtual DbSet ROLES { get; set; } public virtual DbSet ROLES_PERMISSIONS { get; set; } public virtual DbSet SEGMENTS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index bed5ba7eb..4bccfc804 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -878,8 +878,6 @@ - - @@ -936,6 +934,20 @@ + + + + + + + + + + + + + + @@ -1013,6 +1025,11 @@ + + + + + @@ -1023,10 +1040,11 @@ - - - - + + + + + @@ -1851,18 +1869,6 @@ - - - - - - - - - - - - @@ -1943,30 +1949,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -2107,6 +2089,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2390,6 +2400,7 @@ + @@ -2611,10 +2622,6 @@ - - - - @@ -2639,14 +2646,6 @@ - - - - - - - - @@ -2691,6 +2690,14 @@ + + + + + + + + @@ -2824,6 +2831,7 @@ + @@ -2932,10 +2940,6 @@ - - - - @@ -3112,14 +3116,6 @@ - - - - - - - - @@ -3160,10 +3156,18 @@ + + + + + + + + @@ -3439,7 +3443,6 @@ - @@ -4062,14 +4065,11 @@ - - - @@ -4199,8 +4199,6 @@ - - @@ -4267,13 +4265,29 @@ - + + + + + + + + + + + + + + + + + @@ -4364,8 +4378,13 @@ + + + + + - + @@ -4377,10 +4396,11 @@ - - - - + + + + + @@ -4847,18 +4867,6 @@ - - - - - - - - - - - - @@ -5433,30 +5441,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -5585,6 +5569,20 @@ + + + + + + + + + + + + + + @@ -5599,6 +5597,20 @@ + + + + + + + + + + + + + + @@ -6608,8 +6620,6 @@ - - @@ -6697,6 +6707,21 @@ + + + + + + + + + + + + + + + @@ -6770,6 +6795,11 @@ + + + + + @@ -6785,6 +6815,7 @@ + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index b7e5e116a..354839477 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,84 +5,85 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -105,7 +106,6 @@ - @@ -150,8 +150,6 @@ - - @@ -162,7 +160,9 @@ + + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL.cs index 74996acd0..d983a5d69 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL.cs @@ -19,10 +19,11 @@ namespace Tango.DAL.Remote.DB public System.DateTime LAST_UPDATED { get; set; } public string SPOOL_TYPE_GUID { get; set; } public string MACHINE_GUID { get; set; } - public int START_OFFSET_PULSES { get; set; } - public int BACKING_RATE { get; set; } - public int SEGMENT_OFFSET_PULSES { get; set; } - public int BOTTOM_BACKING_RATE { get; set; } + public Nullable START_OFFSET_PULSES { get; set; } + public Nullable BACKING_RATE { get; set; } + public Nullable SEGMENT_OFFSET_PULSES { get; set; } + public Nullable BOTTOM_BACKING_RATE { get; set; } + public Nullable LIMIT_SWITCH_START_POINT_OFFSET { get; set; } public virtual MACHINE MACHINE { get; set; } public virtual SPOOL_TYPES SPOOL_TYPES { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL_TYPES.cs index 1d8b75f90..af2355553 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL_TYPES.cs @@ -18,7 +18,7 @@ namespace Tango.DAL.Remote.DB public SPOOL_TYPES() { this.JOBS = new HashSet(); - this.MACHINES = new HashSet(); + this.RMLS_SPOOLS = new HashSet(); this.SPOOLS = new HashSet(); } @@ -31,11 +31,16 @@ namespace Tango.DAL.Remote.DB public double WEIGHT { get; set; } public double DIAMETER { get; set; } public double ROTATIONS_PER_PASSAGE { get; set; } + public int START_OFFSET_PULSES { get; set; } + public int BACKING_RATE { get; set; } + public int SEGMENT_OFFSET_PULSES { get; set; } + public int BOTTOM_BACKING_RATE { get; set; } + public int LIMIT_SWITCH_START_POINT_OFFSET { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection JOBS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection MACHINES { get; set; } + public virtual ICollection RMLS_SPOOLS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection SPOOLS { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj index 0a0cad6e2..7ea9a77a7 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj +++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj @@ -255,6 +255,9 @@ RemoteADO.tt + + RemoteADO.tt + RemoteADO.tt @@ -368,7 +371,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 5711882a3..4084e4ee7 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -2189,8 +2189,8 @@ namespace Tango.Integration.Operation tiLiquid.Volume = 100; } } - //Modify transparent brush stops. + //Modify transparent brush stops. if (EnableJobLiquidQuantityValidation) { ValidateJobLiquidQuantity(job, processParameters, job.Machine.Configuration); @@ -2236,23 +2236,28 @@ namespace Tango.Integration.Operation ticket.NumberOfUnits = (uint)Math.Max(job.NumberOfUnits, 1); } + //Spool parameters ticket.Spool = new JobSpool(); - job.SpoolType.MapPrimitivesTo(ticket.Spool); + ticket.Spool.JobSpoolType = (JobSpoolType)job.SpoolType.Code; - var spool = job.Machine.Spools.SingleOrDefault(x => x.SpoolType == job.SpoolType); - - if (spool == null) + //Override spool parameters from RML Spool calibration + var rmlSpool = job.Rml.RmlsSpools.FirstOrDefault(x => x.SpoolType.Guid == job.SpoolType.Guid); + if (rmlSpool != null) { - throw new InvalidOperationException("Job spool type is not registered with this machine."); + ticket.Spool.RotationsPerPassage = rmlSpool.RotationsPerPassage != null ? rmlSpool.RotationsPerPassage.Value : ticket.Spool.RotationsPerPassage; + ticket.Spool.Length = rmlSpool.Length != null ? rmlSpool.Length.Value : ticket.Spool.Length; + ticket.Spool.BackingRate = rmlSpool.BackingRate != null ? rmlSpool.BackingRate.Value : ticket.Spool.BackingRate; + ticket.Spool.BottomBackingRate = rmlSpool.BottomBackingRate != null ? rmlSpool.BottomBackingRate.Value : ticket.Spool.BottomBackingRate; } - else + + //Override spool parameters from Machine Spool calibration + var machineSpool = job.Machine.Spools.FirstOrDefault(x => x.SpoolType.Guid == job.SpoolType.Guid); + if (machineSpool != null) { - spool.MapPrimitivesTo(ticket.Spool); + ticket.Spool.LimitSwitchStartPointOffset = machineSpool.LimitSwitchStartPointOffset != null ? machineSpool.LimitSwitchStartPointOffset.Value : ticket.Spool.LimitSwitchStartPointOffset; } - ticket.Spool.JobSpoolType = (JobSpoolType)job.SpoolType.Code; - ProcessParameters process = new ProcessParameters(); processParameters.MapPrimitivesTo(process); ticket.ProcessParameters = process; diff --git a/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs b/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs index 7261ba19b..c716906e6 100644 --- a/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs +++ b/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs @@ -23,17 +23,18 @@ namespace Tango.PMR.Printing { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "Cg5Kb2JTcG9vbC5wcm90bxISVGFuZ28uUE1SLlByaW50aW5nGhJKb2JTcG9v", - "bFR5cGUucHJvdG8i+QEKCEpvYlNwb29sEjYKDEpvYlNwb29sVHlwZRgBIAEo", + "bFR5cGUucHJvdG8ingIKCEpvYlNwb29sEjYKDEpvYlNwb29sVHlwZRgBIAEo", "DjIgLlRhbmdvLlBNUi5QcmludGluZy5Kb2JTcG9vbFR5cGUSDgoGTGVuZ3Ro", "GAIgASgBEg4KBldlaWdodBgDIAEoARIQCghEaWFtZXRlchgEIAEoARIbChNS", "b3RhdGlvbnNQZXJQYXNzYWdlGAUgASgBEhkKEVN0YXJ0T2Zmc2V0UHVsc2Vz", "GAYgASgFEhMKC0JhY2tpbmdSYXRlGAcgASgFEhsKE1NlZ21lbnRPZmZzZXRQ", - "dWxzZXMYCCABKAUSGQoRQm90dG9tQmFja2luZ1JhdGUYCSABKAVCHgocY29t", - "LnR3aW5lLnRhbmdvLnBtci5wcmludGluZ2IGcHJvdG8z")); + "dWxzZXMYCCABKAUSGQoRQm90dG9tQmFja2luZ1JhdGUYCSABKAUSIwobTGlt", + "aXRTd2l0Y2hTdGFydFBvaW50T2Zmc2V0GAogASgFQh4KHGNvbS50d2luZS50", + "YW5nby5wbXIucHJpbnRpbmdiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobSpoolTypeReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobSpool), global::Tango.PMR.Printing.JobSpool.Parser, new[]{ "JobSpoolType", "Length", "Weight", "Diameter", "RotationsPerPassage", "StartOffsetPulses", "BackingRate", "SegmentOffsetPulses", "BottomBackingRate" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobSpool), global::Tango.PMR.Printing.JobSpool.Parser, new[]{ "JobSpoolType", "Length", "Weight", "Diameter", "RotationsPerPassage", "StartOffsetPulses", "BackingRate", "SegmentOffsetPulses", "BottomBackingRate", "LimitSwitchStartPointOffset" }, null, null, null) })); } #endregion @@ -73,6 +74,7 @@ namespace Tango.PMR.Printing { backingRate_ = other.backingRate_; segmentOffsetPulses_ = other.segmentOffsetPulses_; bottomBackingRate_ = other.bottomBackingRate_; + limitSwitchStartPointOffset_ = other.limitSwitchStartPointOffset_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -179,6 +181,17 @@ namespace Tango.PMR.Printing { } } + /// Field number for the "LimitSwitchStartPointOffset" field. + public const int LimitSwitchStartPointOffsetFieldNumber = 10; + private int limitSwitchStartPointOffset_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int LimitSwitchStartPointOffset { + get { return limitSwitchStartPointOffset_; } + set { + limitSwitchStartPointOffset_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as JobSpool); @@ -201,6 +214,7 @@ namespace Tango.PMR.Printing { if (BackingRate != other.BackingRate) return false; if (SegmentOffsetPulses != other.SegmentOffsetPulses) return false; if (BottomBackingRate != other.BottomBackingRate) return false; + if (LimitSwitchStartPointOffset != other.LimitSwitchStartPointOffset) return false; return true; } @@ -216,6 +230,7 @@ namespace Tango.PMR.Printing { if (BackingRate != 0) hash ^= BackingRate.GetHashCode(); if (SegmentOffsetPulses != 0) hash ^= SegmentOffsetPulses.GetHashCode(); if (BottomBackingRate != 0) hash ^= BottomBackingRate.GetHashCode(); + if (LimitSwitchStartPointOffset != 0) hash ^= LimitSwitchStartPointOffset.GetHashCode(); return hash; } @@ -262,6 +277,10 @@ namespace Tango.PMR.Printing { output.WriteRawTag(72); output.WriteInt32(BottomBackingRate); } + if (LimitSwitchStartPointOffset != 0) { + output.WriteRawTag(80); + output.WriteInt32(LimitSwitchStartPointOffset); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -294,6 +313,9 @@ namespace Tango.PMR.Printing { if (BottomBackingRate != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(BottomBackingRate); } + if (LimitSwitchStartPointOffset != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(LimitSwitchStartPointOffset); + } return size; } @@ -329,6 +351,9 @@ namespace Tango.PMR.Printing { if (other.BottomBackingRate != 0) { BottomBackingRate = other.BottomBackingRate; } + if (other.LimitSwitchStartPointOffset != 0) { + LimitSwitchStartPointOffset = other.LimitSwitchStartPointOffset; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -375,6 +400,10 @@ namespace Tango.PMR.Printing { BottomBackingRate = input.ReadInt32(); break; } + case 80: { + LimitSwitchStartPointOffset = input.ReadInt32(); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Printing/ProcessParameters.cs b/Software/Visual_Studio/Tango.PMR/Printing/ProcessParameters.cs index 33521d40b..ef290e431 100644 --- a/Software/Visual_Studio/Tango.PMR/Printing/ProcessParameters.cs +++ b/Software/Visual_Studio/Tango.PMR/Printing/ProcessParameters.cs @@ -23,7 +23,7 @@ namespace Tango.PMR.Printing { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChdQcm9jZXNzUGFyYW1ldGVycy5wcm90bxISVGFuZ28uUE1SLlByaW50aW5n", - "IucFChFQcm9jZXNzUGFyYW1ldGVycxITCgtEeWVpbmdTcGVlZBgBIAEoARIU", + "IrkFChFQcm9jZXNzUGFyYW1ldGVycxITCgtEeWVpbmdTcGVlZBgBIAEoARIU", "CgxNaW5JbmtVcHRha2UYAiABKAESFAoMTWF4SW5rVXB0YWtlGAMgASgBEhUK", "DUZlZWRlclRlbnNpb24YBCABKAESFQoNUHVsbGVyVGVuc2lvbhgFIAEoARIV", "Cg1XaW5kZXJUZW5zaW9uGAYgASgBEhEKCU1peGVyVGVtcBgHIAEoARIVCg1I", @@ -36,15 +36,14 @@ namespace Tango.PMR.Printing { "EyABKAESEgoKVGFibGVJbmRleBgUIAEoBRIVCg1IZWFkWm9uZTdUZW1wGBUg", "ASgBEhUKDUhlYWRab25lOFRlbXAYFiABKAESFQoNSGVhZFpvbmU5VGVtcBgX", "IAEoARIWCg5IZWFkWm9uZTEwVGVtcBgYIAEoARIWCg5IZWFkWm9uZTExVGVt", - "cBgZIAEoARIWCg5IZWFkWm9uZTEyVGVtcBgaIAEoARIVCg1TdFNwWm9uZTFU", - "ZW1wGBsgASgBEhUKDVN0U3Bab25lMlRlbXAYHCABKAESEwoLUkJsb3dlckZs", - "b3cYHSABKAESEwoLUkJsb3dlclRlbXAYHiABKAESEwoLTEJsb3dlckZsb3cY", - "HyABKAESEwoLTEJsb3dlclRlbXAYICABKAFCHgocY29tLnR3aW5lLnRhbmdv", - "LnBtci5wcmludGluZ2IGcHJvdG8z")); + "cBgZIAEoARIWCg5IZWFkWm9uZTEyVGVtcBgaIAEoARITCgtSQmxvd2VyRmxv", + "dxgbIAEoARITCgtSQmxvd2VyVGVtcBgcIAEoARITCgtMQmxvd2VyRmxvdxgd", + "IAEoARITCgtMQmxvd2VyVGVtcBgeIAEoAUIeChxjb20udHdpbmUudGFuZ28u", + "cG1yLnByaW50aW5nYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.ProcessParameters), global::Tango.PMR.Printing.ProcessParameters.Parser, new[]{ "DyeingSpeed", "MinInkUptake", "MaxInkUptake", "FeederTension", "PullerTension", "WinderTension", "MixerTemp", "HeadZone1Temp", "HeadZone2Temp", "HeadZone3Temp", "HeadZone4Temp", "HeadZone5Temp", "HeadZone6Temp", "DryerAirFlow", "DryerZone1Temp", "DryerZone2Temp", "DryerZone3Temp", "DryerBufferLength", "HeadAirFlow", "TableIndex", "HeadZone7Temp", "HeadZone8Temp", "HeadZone9Temp", "HeadZone10Temp", "HeadZone11Temp", "HeadZone12Temp", "StSpZone1Temp", "StSpZone2Temp", "RBlowerFlow", "RBlowerTemp", "LBlowerFlow", "LBlowerTemp" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.ProcessParameters), global::Tango.PMR.Printing.ProcessParameters.Parser, new[]{ "DyeingSpeed", "MinInkUptake", "MaxInkUptake", "FeederTension", "PullerTension", "WinderTension", "MixerTemp", "HeadZone1Temp", "HeadZone2Temp", "HeadZone3Temp", "HeadZone4Temp", "HeadZone5Temp", "HeadZone6Temp", "DryerAirFlow", "DryerZone1Temp", "DryerZone2Temp", "DryerZone3Temp", "DryerBufferLength", "HeadAirFlow", "TableIndex", "HeadZone7Temp", "HeadZone8Temp", "HeadZone9Temp", "HeadZone10Temp", "HeadZone11Temp", "HeadZone12Temp", "RBlowerFlow", "RBlowerTemp", "LBlowerFlow", "LBlowerTemp" }, null, null, null) })); } #endregion @@ -101,8 +100,6 @@ namespace Tango.PMR.Printing { headZone10Temp_ = other.headZone10Temp_; headZone11Temp_ = other.headZone11Temp_; headZone12Temp_ = other.headZone12Temp_; - stSpZone1Temp_ = other.stSpZone1Temp_; - stSpZone2Temp_ = other.stSpZone2Temp_; rBlowerFlow_ = other.rBlowerFlow_; rBlowerTemp_ = other.rBlowerTemp_; lBlowerFlow_ = other.lBlowerFlow_; @@ -400,30 +397,8 @@ namespace Tango.PMR.Printing { } } - /// Field number for the "StSpZone1Temp" field. - public const int StSpZone1TempFieldNumber = 27; - private double stSpZone1Temp_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double StSpZone1Temp { - get { return stSpZone1Temp_; } - set { - stSpZone1Temp_ = value; - } - } - - /// Field number for the "StSpZone2Temp" field. - public const int StSpZone2TempFieldNumber = 28; - private double stSpZone2Temp_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double StSpZone2Temp { - get { return stSpZone2Temp_; } - set { - stSpZone2Temp_ = value; - } - } - /// Field number for the "RBlowerFlow" field. - public const int RBlowerFlowFieldNumber = 29; + public const int RBlowerFlowFieldNumber = 27; private double rBlowerFlow_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double RBlowerFlow { @@ -434,7 +409,7 @@ namespace Tango.PMR.Printing { } /// Field number for the "RBlowerTemp" field. - public const int RBlowerTempFieldNumber = 30; + public const int RBlowerTempFieldNumber = 28; private double rBlowerTemp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double RBlowerTemp { @@ -445,7 +420,7 @@ namespace Tango.PMR.Printing { } /// Field number for the "LBlowerFlow" field. - public const int LBlowerFlowFieldNumber = 31; + public const int LBlowerFlowFieldNumber = 29; private double lBlowerFlow_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double LBlowerFlow { @@ -456,7 +431,7 @@ namespace Tango.PMR.Printing { } /// Field number for the "LBlowerTemp" field. - public const int LBlowerTempFieldNumber = 32; + public const int LBlowerTempFieldNumber = 30; private double lBlowerTemp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double LBlowerTemp { @@ -505,8 +480,6 @@ namespace Tango.PMR.Printing { if (HeadZone10Temp != other.HeadZone10Temp) return false; if (HeadZone11Temp != other.HeadZone11Temp) return false; if (HeadZone12Temp != other.HeadZone12Temp) return false; - if (StSpZone1Temp != other.StSpZone1Temp) return false; - if (StSpZone2Temp != other.StSpZone2Temp) return false; if (RBlowerFlow != other.RBlowerFlow) return false; if (RBlowerTemp != other.RBlowerTemp) return false; if (LBlowerFlow != other.LBlowerFlow) return false; @@ -543,8 +516,6 @@ namespace Tango.PMR.Printing { if (HeadZone10Temp != 0D) hash ^= HeadZone10Temp.GetHashCode(); if (HeadZone11Temp != 0D) hash ^= HeadZone11Temp.GetHashCode(); if (HeadZone12Temp != 0D) hash ^= HeadZone12Temp.GetHashCode(); - if (StSpZone1Temp != 0D) hash ^= StSpZone1Temp.GetHashCode(); - if (StSpZone2Temp != 0D) hash ^= StSpZone2Temp.GetHashCode(); if (RBlowerFlow != 0D) hash ^= RBlowerFlow.GetHashCode(); if (RBlowerTemp != 0D) hash ^= RBlowerTemp.GetHashCode(); if (LBlowerFlow != 0D) hash ^= LBlowerFlow.GetHashCode(); @@ -663,28 +634,20 @@ namespace Tango.PMR.Printing { output.WriteRawTag(209, 1); output.WriteDouble(HeadZone12Temp); } - if (StSpZone1Temp != 0D) { - output.WriteRawTag(217, 1); - output.WriteDouble(StSpZone1Temp); - } - if (StSpZone2Temp != 0D) { - output.WriteRawTag(225, 1); - output.WriteDouble(StSpZone2Temp); - } if (RBlowerFlow != 0D) { - output.WriteRawTag(233, 1); + output.WriteRawTag(217, 1); output.WriteDouble(RBlowerFlow); } if (RBlowerTemp != 0D) { - output.WriteRawTag(241, 1); + output.WriteRawTag(225, 1); output.WriteDouble(RBlowerTemp); } if (LBlowerFlow != 0D) { - output.WriteRawTag(249, 1); + output.WriteRawTag(233, 1); output.WriteDouble(LBlowerFlow); } if (LBlowerTemp != 0D) { - output.WriteRawTag(129, 2); + output.WriteRawTag(241, 1); output.WriteDouble(LBlowerTemp); } } @@ -770,12 +733,6 @@ namespace Tango.PMR.Printing { if (HeadZone12Temp != 0D) { size += 2 + 8; } - if (StSpZone1Temp != 0D) { - size += 2 + 8; - } - if (StSpZone2Temp != 0D) { - size += 2 + 8; - } if (RBlowerFlow != 0D) { size += 2 + 8; } @@ -874,12 +831,6 @@ namespace Tango.PMR.Printing { if (other.HeadZone12Temp != 0D) { HeadZone12Temp = other.HeadZone12Temp; } - if (other.StSpZone1Temp != 0D) { - StSpZone1Temp = other.StSpZone1Temp; - } - if (other.StSpZone2Temp != 0D) { - StSpZone2Temp = other.StSpZone2Temp; - } if (other.RBlowerFlow != 0D) { RBlowerFlow = other.RBlowerFlow; } @@ -1007,26 +958,18 @@ namespace Tango.PMR.Printing { break; } case 217: { - StSpZone1Temp = input.ReadDouble(); - break; - } - case 225: { - StSpZone2Temp = input.ReadDouble(); - break; - } - case 233: { RBlowerFlow = input.ReadDouble(); break; } - case 241: { + case 225: { RBlowerTemp = input.ReadDouble(); break; } - case 249: { + case 233: { LBlowerFlow = input.ReadDouble(); break; } - case 257: { + case 241: { LBlowerTemp = input.ReadDouble(); break; } diff --git a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/OverrideData.xml b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/OverrideData.xml index c0d3aa837..e340a65ca 100644 Binary files a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/OverrideData.xml and b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/OverrideData.xml differ diff --git a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml index d33b19137..b8c949c2a 100644 Binary files a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml and b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml differ diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/EmptyStringToNullConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/EmptyStringToNullConverter.cs new file mode 100644 index 000000000..8d62178c7 --- /dev/null +++ b/Software/Visual_Studio/Tango.SharedUI/Converters/EmptyStringToNullConverter.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace Tango.SharedUI.Converters +{ + public class EmptyStringToNullConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value != null) + { + if (String.IsNullOrWhiteSpace(value.ToString())) + { + return null; + } + } + + return value; + } + } +} diff --git a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj index dddaa750c..092afd777 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj +++ b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj @@ -100,6 +100,7 @@ + @@ -243,7 +244,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs index ac20feb04..208adf63f 100644 --- a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs +++ b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs @@ -154,6 +154,14 @@ namespace Tango.DBObservablesGenerator.CLI { codeField.Type = String.Format("Nullable<{0}>", "DateTime"); } + else if (field.PropertyType == typeof(Nullable)) + { + codeField.Type = String.Format("Nullable<{0}>", "Int32"); + } + else if (field.PropertyType == typeof(Nullable)) + { + codeField.Type = String.Format("Nullable<{0}>", "Double"); + } else { codeField.Type = String.Format("SynchronizedObservableCollection<{0}>", DalNameToStandardName(field.PropertyType.GenericTypeArguments.Single().Name).SingularizeMVC()); @@ -237,7 +245,7 @@ namespace Tango.DBObservablesGenerator.CLI //Generate Enumerations... using (RemoteDB db = new RemoteDB(SettingsManager.Default.GetOrCreate().DataSource)) { - foreach (var tableProp in db.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericType)) + foreach (var tableProp in db.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericTypeAndNotNullable())) { try { @@ -387,7 +395,7 @@ namespace Tango.DBObservablesGenerator.CLI codeField.Description = FirstCharacterToLower(DalNameToStandardName(name)); - if (field.PropertyType.IsGenericType) + if (field.PropertyType.IsGenericTypeAndNotNullable()) { continue; } @@ -435,7 +443,7 @@ namespace Tango.DBObservablesGenerator.CLI //Generate Enumerations... using (RemoteDB db = new RemoteDB(SettingsManager.Default.GetOrCreate().DataSource)) { - foreach (var tableProp in db.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericType)) + foreach (var tableProp in db.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => x.PropertyType.IsGenericTypeAndNotNullable())) { try { -- cgit v1.3.1 From 882a6d54d60f05f3bf542ab43c3681f64152df41 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 27 Feb 2020 00:34:46 +0200 Subject: Added thread parameters DB, PMR, MachineOperator merging, Machine Studio. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes Software/PMR/Messages/Printing/JobTicket.proto | 3 + .../PMR/Messages/Printing/ThreadParameters.proto | 19 + .../Controls/JobOutlineControl.cs | 14 + .../Tango.MachineStudio.RML.csproj | 7 + .../ViewModels/MainViewVM.cs | 154 ++++---- .../Tango.MachineStudio.RML/Views/MainView.xaml | 2 +- .../Tango.MachineStudio.RML/Views/RmlView.xaml | 5 +- .../Views/ThreadParametersView.xaml | 82 +++++ .../Views/ThreadParametersView.xaml.cs | 28 ++ .../Tango.PPC.Jobs/Controls/JobOutlineControl.cs | 14 + Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs | 72 ++++ .../Visual_Studio/Tango.BL/Entities/RmlBase.cs | 342 ++++++++++++++++++ Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs | 9 + .../Tango.DAL.Remote/DB/RemoteADO.Designer.cs | 2 +- .../Tango.DAL.Remote/DB/RemoteADO.edmx | 27 ++ .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 140 ++++---- .../Operation/IMachineOperator.cs | 9 - .../Tango.Integration/Operation/MachineOperator.cs | 224 +----------- .../Visual_Studio/Tango.PMR/Printing/JobTicket.cs | 66 +++- .../Tango.PMR/Printing/ThreadParameters.cs | 386 +++++++++++++++++++++ Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj | 3 +- 23 files changed, 1219 insertions(+), 389 deletions(-) create mode 100644 Software/PMR/Messages/Printing/ThreadParameters.proto create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Printing/ThreadParameters.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index acb091ff8..d291434cb 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 85ba181a9..15e009d48 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/PMR/Messages/Printing/JobTicket.proto b/Software/PMR/Messages/Printing/JobTicket.proto index 9824f6ef0..b442893cd 100644 --- a/Software/PMR/Messages/Printing/JobTicket.proto +++ b/Software/PMR/Messages/Printing/JobTicket.proto @@ -5,6 +5,7 @@ import "ProcessParameters.proto"; import "JobWindingMethod.proto"; import "JobSpool.proto"; import "JobUploadStrategy.proto"; +import "ThreadParameters.proto"; package Tango.PMR.Printing; option java_package = "com.twine.tango.pmr.printing"; @@ -35,4 +36,6 @@ message JobTicket //sample winding winds each segment densely on a small part of the spool, end moves one for the next segment bool SampleWinding = 14; + + ThreadParameters ThreadParameters = 15; } \ No newline at end of file diff --git a/Software/PMR/Messages/Printing/ThreadParameters.proto b/Software/PMR/Messages/Printing/ThreadParameters.proto new file mode 100644 index 000000000..f5d18d1fe --- /dev/null +++ b/Software/PMR/Messages/Printing/ThreadParameters.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package Tango.PMR.Printing; +option java_package = "com.twine.tango.pmr.printing"; + +message ThreadParameters +{ + int32 FeederP = 1; + int32 FeederI = 2; + int32 FeederD = 3; + + int32 PullerP = 4; + int32 PullerI = 5; + int32 PullerD = 6; + + int32 WinderP = 7; + int32 WinderI = 8; + int32 WinderD = 9; +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs index ee570ac34..5a3f5d337 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs @@ -136,6 +136,20 @@ namespace Tango.MachineStudio.Developer.Controls _sizeControl.Height += NORMAL_FONT_HEIGHT; } } + //JobTicket.ThreadParameters + if (job.ThreadParameters != null) + { + _sizeControl.Height += 20; + DrawHeaderText(drawingContext, "THREAD PARAMETERS", 17, LevelOffset.level_0); + _sizeControl.Height += TITLE_FONT_HEIGHT; + _sizeControl.Height += 5.0; + basicProps = GetNameValueList(job.ThreadParameters); + foreach (var prop in basicProps) + { + DrawNameValueText(drawingContext, prop, LevelOffset.level_1, PackIconKind.Settings); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + } //JobTicket.Segments if (job.Segments != null) { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj index 9f3a95e0b..f448932a0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj @@ -118,6 +118,9 @@ RmlView.xaml + + ThreadParametersView.xaml + SpoolsView.xaml @@ -226,6 +229,10 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer + MSBuild:Compile Designer diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs index b75d65fe0..1ceaf07df 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs @@ -283,102 +283,114 @@ namespace Tango.MachineStudio.RML.ViewModels { using (_notification.PushTaskItem("Loading RML...")) { - IsFree = false; - - if (_active_context != null) + try { - _active_context.Dispose(); - } - - _active_context = ObservablesContext.CreateDefault(); + IsFree = false; - CCTS = _active_context.Ccts - .Select(x => new CctModel() + if (_active_context != null) { - Guid = x.Guid, - FileName = x.FileName, + _active_context.Dispose(); + } - }).ToObservableCollection(); + _active_context = ObservablesContext.CreateDefault(); - CCTS.Where(x => String.IsNullOrWhiteSpace(x.FileName)).ToList().ForEach(x => x.FileName = x.Guid); + CCTS = _active_context.Ccts + .Select(x => new CctModel() + { + Guid = x.Guid, + FileName = x.FileName, - LoadRmlProperties(); + }).ToObservableCollection(); - ActiveRML = await new RmlBuilder(_active_context) - .Set(guid) - .WithActiveParametersGroup() - .WithLiquidFactors() - .WithCCT() - .WithSpools() - .BuildAsync(); + CCTS.Where(x => String.IsNullOrWhiteSpace(x.FileName)).ToList().ForEach(x => x.FileName = x.Guid); - if (ActiveRML.Cct != null) - { - SelectedCCT = CCTS.SingleOrDefault(x => x.Guid == ActiveRML.Cct.Guid); - } + LoadRmlProperties(); - if (ActiveRML.ProcessParametersTablesGroups.ToList().Count == 0) - { - if (!_notification.ShowQuestion("Could not find any process group for the selected RML. Would you like to create one?")) + ActiveRML = await new RmlBuilder(_active_context) + .Set(guid) + .WithActiveParametersGroup() + .WithLiquidFactors() + .WithCCT() + .WithSpools() + .BuildAsync(); + + if (ActiveRML.Cct != null) { - _notification.ShowError("Cannot load an RML with no process group."); - IsFree = true; - return; + SelectedCCT = CCTS.SingleOrDefault(x => x.Guid == ActiveRML.Cct.Guid); } - else + + if (ActiveRML.ProcessParametersTablesGroups.ToList().Count == 0) { - ProcessParametersTablesGroup group = new ProcessParametersTablesGroup(); - group.Name = "Active Group"; - group.Active = true; - group.ProcessParametersTables.Add(new ProcessParametersTable() + if (!_notification.ShowQuestion("Could not find any process group for the selected RML. Would you like to create one?")) + { + _notification.ShowError("Cannot load an RML with no process group."); + IsFree = true; + return; + } + else { - Name = "Process Table 1", - }); + ProcessParametersTablesGroup group = new ProcessParametersTablesGroup(); + group.Name = "Active Group"; + group.Active = true; + group.ProcessParametersTables.Add(new ProcessParametersTable() + { + Name = "Process Table 1", + }); - group.Rml = ActiveRML; + group.Rml = ActiveRML; - _active_context.ProcessParametersTablesGroups.Add(group); - _active_context.ProcessParametersTables.Add(group.ProcessParametersTables[0]); - await _active_context.SaveChangesAsync(); - LoadActiveRML(ActiveRML.Guid); - return; + _active_context.ProcessParametersTablesGroups.Add(group); + _active_context.ProcessParametersTables.Add(group.ProcessParametersTables[0]); + await _active_context.SaveChangesAsync(); + LoadActiveRML(ActiveRML.Guid); + return; + } } - } - - ActiveProcessParametersGroup = ActiveRML.ProcessParametersTablesGroups.ToList().FirstOrDefault(); - ActiveProcessParametersTableView = CollectionViewSource.GetDefaultView(ActiveProcessParametersGroup.ProcessParametersTables); - ActiveProcessParametersTableView.SortDescriptions.Add(new SortDescription(nameof(ProcessParametersTable.TableIndex), ListSortDirection.Ascending)); - CalibrationDataViewVM = new CalibrationDataViewVM(_notification); - LiquidTypesRmls = ActiveRML.LiquidTypesRmls; + ActiveProcessParametersGroup = ActiveRML.ProcessParametersTablesGroups.ToList().FirstOrDefault(); + ActiveProcessParametersTableView = CollectionViewSource.GetDefaultView(ActiveProcessParametersGroup.ProcessParametersTables); + ActiveProcessParametersTableView.SortDescriptions.Add(new SortDescription(nameof(ProcessParametersTable.TableIndex), ListSortDirection.Ascending)); - foreach (var liquidTypeRml in LiquidTypesRmls) - { - CalibrationDataVM catVM = new CalibrationDataVM(liquidTypeRml.LiquidType); + CalibrationDataViewVM = new CalibrationDataViewVM(_notification); + LiquidTypesRmls = ActiveRML.LiquidTypesRmls; - if (liquidTypeRml.DefaultCatData != null) + foreach (var liquidTypeRml in LiquidTypesRmls) { - catVM.CalibrationPoints = liquidTypeRml.GetCalibrationData().CalibrationPoints.Select(x => new CalibrationDataPointVM(x.X, x.Y)).ToObservableCollection(); - } + CalibrationDataVM catVM = new CalibrationDataVM(liquidTypeRml.LiquidType); - CalibrationDataViewVM.LiquidsCalibrationData.Add(catVM); - } + if (liquidTypeRml.DefaultCatData != null) + { + catVM.CalibrationPoints = liquidTypeRml.GetCalibrationData().CalibrationPoints.Select(x => new CalibrationDataPointVM(x.X, x.Y)).ToObservableCollection(); + } - ColorConversionViewVM = new ColorConversionViewVM(_notification) - { - RML = ActiveRML, - CCT = SelectedCCT, - LiquidsCalibrationData = CalibrationDataViewVM.LiquidsCalibrationData, - LiquidTypesRmls = LiquidTypesRmls, - }; + CalibrationDataViewVM.LiquidsCalibrationData.Add(catVM); + } + + ColorConversionViewVM = new ColorConversionViewVM(_notification) + { + RML = ActiveRML, + CCT = SelectedCCT, + LiquidsCalibrationData = CalibrationDataViewVM.LiquidsCalibrationData, + LiquidTypesRmls = LiquidTypesRmls, + }; - _rmlBeforeSave = RmlDTO.FromObservable(ActiveRML); + _rmlBeforeSave = RmlDTO.FromObservable(ActiveRML); - View.NavigateTo(RmlNavigationView.RmlView); + View.NavigateTo(RmlNavigationView.RmlView); - InvalidateRelayCommands(); + InvalidateRelayCommands(); - IsFree = true; + IsFree = true; + } + catch (Exception ex) + { + LogManager.Log($"Error loading RML '{ActiveRML.Name}'..."); + _notification.ShowError($"Error loading the selected thread.\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } } } @@ -490,7 +502,7 @@ namespace Tango.MachineStudio.RML.ViewModels if (rml_jobs.Count > 0) { - _notification.ShowError($"The following jobs must be removed or change thread type before the selected thread can be deleted:\n{String.Join("\n",rml_jobs.Select(x => $"{x.Machine.SerialNumber} => {x.Name}"))}"); + _notification.ShowError($"The following jobs must be removed or change thread type before the selected thread can be deleted:\n{String.Join("\n", rml_jobs.Select(x => $"{x.Machine.SerialNumber} => {x.Name}"))}"); return; } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml index ab5207722..e52ac4ece 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml @@ -9,7 +9,7 @@ xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views" mc:Ignorable="d" d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml index 6ee41ac38..e967c7d83 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml @@ -149,9 +149,12 @@ - + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml new file mode 100644 index 000000000..ef2923303 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + THREAD PARAMETERS + + + + + + + + + FEEDER + + + + + + + + + + + + + + PULLER + + + + + + + + + + + + + + WINDER + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml.cs new file mode 100644 index 000000000..aa63e48fb --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.RML.Views +{ + /// + /// Interaction logic for SpoolsView.xaml + /// + public partial class ThreadParametersView : UserControl + { + public ThreadParametersView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs index e6f090fdd..0d6a2f6be 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs @@ -143,6 +143,20 @@ namespace Tango.PPC.Jobs _sizeControl.Height += NORMAL_FONT_HEIGHT; } } + //JobTicket.ThreadParameters + if (job.ThreadParameters != null) + { + _sizeControl.Height += 20; + DrawHeaderText(drawingContext, "THREAD PARAMETERS", 17, LevelOffset.level_0); + _sizeControl.Height += TITLE_FONT_HEIGHT; + _sizeControl.Height += 5.0; + basicProps = GetNameValueList(job.ThreadParameters); + foreach (var prop in basicProps) + { + DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Settings); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + } //JobTicket.Segments if (job.Segments != null) { diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs index 0c5c0480d..7ffc640f1 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs @@ -269,5 +269,77 @@ namespace Tango.BL.DTO get; set; } + /// + /// feeder p + /// + public Int32 FeederP + { + get; set; + } + + /// + /// feeder i + /// + public Int32 FeederI + { + get; set; + } + + /// + /// feeder d + /// + public Int32 FeederD + { + get; set; + } + + /// + /// puller p + /// + public Int32 PullerP + { + get; set; + } + + /// + /// puller i + /// + public Int32 PullerI + { + get; set; + } + + /// + /// puller d + /// + public Int32 PullerD + { + get; set; + } + + /// + /// winder p + /// + public Int32 WinderP + { + get; set; + } + + /// + /// winder i + /// + public Int32 WinderI + { + get; set; + } + + /// + /// winder d + /// + public Int32 WinderD + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs index a592fc694..758c7fa41 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs @@ -75,6 +75,24 @@ namespace Tango.BL.Entities public event EventHandler SpoolsCalibrationsStringChanged; + public event EventHandler FeederPChanged; + + public event EventHandler FeederIChanged; + + public event EventHandler FeederDChanged; + + public event EventHandler PullerPChanged; + + public event EventHandler PullerIChanged; + + public event EventHandler PullerDChanged; + + public event EventHandler WinderPChanged; + + public event EventHandler WinderIChanged; + + public event EventHandler WinderDChanged; + public event EventHandler> CatsChanged; public event EventHandler CctChanged; @@ -933,6 +951,249 @@ namespace Tango.BL.Entities } } + protected Int32 _feederp; + + /// + /// Gets or sets the rmlbase feeder p. + /// + + [Column("FEEDER_P")] + + public Int32 FeederP + { + get + { + return _feederp; + } + + set + { + if (_feederp != value) + { + _feederp = value; + + OnFeederPChanged(value); + + } + } + } + + protected Int32 _feederi; + + /// + /// Gets or sets the rmlbase feeder i. + /// + + [Column("FEEDER_I")] + + public Int32 FeederI + { + get + { + return _feederi; + } + + set + { + if (_feederi != value) + { + _feederi = value; + + OnFeederIChanged(value); + + } + } + } + + protected Int32 _feederd; + + /// + /// Gets or sets the rmlbase feeder d. + /// + + [Column("FEEDER_D")] + + public Int32 FeederD + { + get + { + return _feederd; + } + + set + { + if (_feederd != value) + { + _feederd = value; + + OnFeederDChanged(value); + + } + } + } + + protected Int32 _pullerp; + + /// + /// Gets or sets the rmlbase puller p. + /// + + [Column("PULLER_P")] + + public Int32 PullerP + { + get + { + return _pullerp; + } + + set + { + if (_pullerp != value) + { + _pullerp = value; + + OnPullerPChanged(value); + + } + } + } + + protected Int32 _pulleri; + + /// + /// Gets or sets the rmlbase puller i. + /// + + [Column("PULLER_I")] + + public Int32 PullerI + { + get + { + return _pulleri; + } + + set + { + if (_pulleri != value) + { + _pulleri = value; + + OnPullerIChanged(value); + + } + } + } + + protected Int32 _pullerd; + + /// + /// Gets or sets the rmlbase puller d. + /// + + [Column("PULLER_D")] + + public Int32 PullerD + { + get + { + return _pullerd; + } + + set + { + if (_pullerd != value) + { + _pullerd = value; + + OnPullerDChanged(value); + + } + } + } + + protected Int32 _winderp; + + /// + /// Gets or sets the rmlbase winder p. + /// + + [Column("WINDER_P")] + + public Int32 WinderP + { + get + { + return _winderp; + } + + set + { + if (_winderp != value) + { + _winderp = value; + + OnWinderPChanged(value); + + } + } + } + + protected Int32 _winderi; + + /// + /// Gets or sets the rmlbase winder i. + /// + + [Column("WINDER_I")] + + public Int32 WinderI + { + get + { + return _winderi; + } + + set + { + if (_winderi != value) + { + _winderi = value; + + OnWinderIChanged(value); + + } + } + } + + protected Int32 _winderd; + + /// + /// Gets or sets the rmlbase winder d. + /// + + [Column("WINDER_D")] + + public Int32 WinderD + { + get + { + return _winderd; + } + + set + { + if (_winderd != value) + { + _winderd = value; + + OnWinderDChanged(value); + + } + } + } + protected SynchronizedObservableCollection _cats; /// @@ -1548,6 +1809,87 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(SpoolsCalibrationsString)); } + /// + /// Called when the FeederP has changed. + /// + protected virtual void OnFeederPChanged(Int32 feederp) + { + FeederPChanged?.Invoke(this, feederp); + RaisePropertyChanged(nameof(FeederP)); + } + + /// + /// Called when the FeederI has changed. + /// + protected virtual void OnFeederIChanged(Int32 feederi) + { + FeederIChanged?.Invoke(this, feederi); + RaisePropertyChanged(nameof(FeederI)); + } + + /// + /// Called when the FeederD has changed. + /// + protected virtual void OnFeederDChanged(Int32 feederd) + { + FeederDChanged?.Invoke(this, feederd); + RaisePropertyChanged(nameof(FeederD)); + } + + /// + /// Called when the PullerP has changed. + /// + protected virtual void OnPullerPChanged(Int32 pullerp) + { + PullerPChanged?.Invoke(this, pullerp); + RaisePropertyChanged(nameof(PullerP)); + } + + /// + /// Called when the PullerI has changed. + /// + protected virtual void OnPullerIChanged(Int32 pulleri) + { + PullerIChanged?.Invoke(this, pulleri); + RaisePropertyChanged(nameof(PullerI)); + } + + /// + /// Called when the PullerD has changed. + /// + protected virtual void OnPullerDChanged(Int32 pullerd) + { + PullerDChanged?.Invoke(this, pullerd); + RaisePropertyChanged(nameof(PullerD)); + } + + /// + /// Called when the WinderP has changed. + /// + protected virtual void OnWinderPChanged(Int32 winderp) + { + WinderPChanged?.Invoke(this, winderp); + RaisePropertyChanged(nameof(WinderP)); + } + + /// + /// Called when the WinderI has changed. + /// + protected virtual void OnWinderIChanged(Int32 winderi) + { + WinderIChanged?.Invoke(this, winderi); + RaisePropertyChanged(nameof(WinderI)); + } + + /// + /// Called when the WinderD has changed. + /// + protected virtual void OnWinderDChanged(Int32 winderd) + { + WinderDChanged?.Invoke(this, winderd); + RaisePropertyChanged(nameof(WinderD)); + } + /// /// Called when the Cats has changed. /// diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs index 2772e1958..6f5119865 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs @@ -60,6 +60,15 @@ namespace Tango.DAL.Remote.DB public int QUALIFICATION_LEVEL { get; set; } public Nullable QUALIFICATION_DATE { get; set; } public string SPOOLS_CALIBRATIONS_STRING { get; set; } + public int FEEDER_P { get; set; } + public int FEEDER_I { get; set; } + public int FEEDER_D { get; set; } + public int PULLER_P { get; set; } + public int PULLER_I { get; set; } + public int PULLER_D { get; set; } + public int WINDER_P { get; set; } + public int WINDER_I { get; set; } + public int WINDER_D { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection CATS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs index 17bc2683d..d26e67908 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs @@ -1,4 +1,4 @@ -// T4 code generation is enabled for model 'D:\Development\Tango\Software\Visual_Studio\Tango.DAL.Remote\DB\RemoteADO.edmx'. +// T4 code generation is enabled for model 'C:\DATA\Development\Tango\Software\Visual_Studio\Tango.DAL.Remote\DB\RemoteADO.edmx'. // To enable legacy code generation, change the value of the 'Code Generation Strategy' designer // property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model // is open in the designer. diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index 4bccfc804..f10a28eee 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -933,6 +933,15 @@ + + + + + + + + + @@ -4257,6 +4266,15 @@ + + + + + + + + + @@ -6670,6 +6688,15 @@ + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index 354839477..6785d4c6e 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,85 +5,85 @@ - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - + + + + + + + - + - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs index 44128a2ae..b6698a208 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs @@ -273,15 +273,6 @@ namespace Tango.Integration.Operation /// Task Print(Job job); - /// - /// Executes a print stub for emulating a full job. - /// The process parameters table will be calculated using color conversion gamut region. - /// This method cannot accept brush stops with 'Volume' as color space. - /// - /// The job. - /// - Task PrintStub(Job job); - /// /// Prints the specified job using the specified job parameters. /// diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 4084e4ee7..d020fd2a6 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -2258,6 +2258,10 @@ namespace Tango.Integration.Operation ticket.Spool.LimitSwitchStartPointOffset = machineSpool.LimitSwitchStartPointOffset != null ? machineSpool.LimitSwitchStartPointOffset.Value : ticket.Spool.LimitSwitchStartPointOffset; } + //Thread parameters + ticket.ThreadParameters = new ThreadParameters(); + job.Rml.MapPrimitivesTo(ticket.ThreadParameters); + ProcessParameters process = new ProcessParameters(); processParameters.MapPrimitivesTo(process); ticket.ProcessParameters = process; @@ -2629,226 +2633,6 @@ namespace Tango.Integration.Operation }); } - /// - /// Executes a print stub for emulating a full job. - /// The process parameters table will be calculated using color conversion gamut region. - /// This method cannot accept brush stops with 'Volume' as color space. - /// - /// The job. - /// - /// - /// Cannot print a brush stop with volume color space when process parameters table has not been specified. - /// or - /// Could not print while status = " + Status - /// - /// - /// Job RML is null - /// or - /// Could not locate an active process parameters tables group for RML " + job.Rml.Name - /// or - /// Could not locate process parameters table index " + processParametersTableIndex + " in group " + processGroup.Name + " for RML " + job.Rml.Name - /// or - /// Liquid volume not found for color conversion output liquid '" + outputLiquid.LiquidType + "'. - /// - public Task PrintStub(Job job) - { - return Task.Factory.StartNew(() => - { - - //Check not brush stop has color space 'Volume'. - if (job.Segments.SelectMany(x => x.BrushStops).ToList().Exists(x => x.ColorSpace.Code == ColorSpaces.Volume.ToInt32())) - { - throw new InvalidOperationException("Cannot print a brush stop with volume color space when process parameters table has not been specified."); - } - - //Get least common process parameters table index. - int processParametersTableIndex = 0; - - if (job.Rml == null) - { - throw new NullReferenceException("Job RML is null"); - } - - var processGroup = job.Rml.ProcessParametersTablesGroups.FirstOrDefault(x => x.Active); - - if (processGroup == null) - { - throw new NullReferenceException("Could not locate an active process parameters tables group for RML " + job.Rml.Name); - } - - var processParameters = processGroup.ProcessParametersTables.FirstOrDefault(x => x.TableIndex == processParametersTableIndex); - - if (processParameters == null) - { - throw new NullReferenceException("Could not locate process parameters table index " + processParametersTableIndex + " in group " + processGroup.Name + " for RML " + job.Rml.Name); - } - - //Perform color correction - foreach (var stop in job.Segments.SelectMany(x => x.BrushStops)) - { - if (stop.LiquidVolumes == null) - { - stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, processParameters); - } - - foreach (var liquidVolume in stop.LiquidVolumes) - { - liquidVolume.Volume = 10; - } - } - - if (!CanPrint) - { - throw new InvalidOperationException("Could not print while status = " + Status); - } - - RunningJob = null; - RunningJobStatus = null; - - var originalJob = job; - - CurrentProcessParameters = processParameters; - - StubJobRequest request = new StubJobRequest(); - - if (job.NumberOfUnits < 1) - { - job.NumberOfUnits = 1; - } - - job = job.Clone(); - - var segments = job.OrderedSegments.ToList(); - - for (int i = 0; i < job.NumberOfUnits - 1; i++) - { - foreach (var s in segments) - { - job.Segments.Add(s); - } - } - - JobTicket ticket = new JobTicket(); - ticket.Guid = originalJob.Guid; - ticket.EnableInterSegment = job.EnableInterSegment; - ticket.InterSegmentLength = job.InterSegmentLength; - ticket.Length = job.Length; - ticket.WindingMethod = (JobWindingMethod)job.WindingMethod.Code; - ticket.Spool = new JobSpool(); - - job.SpoolType.MapPrimitivesTo(ticket.Spool); - ticket.Spool.JobSpoolType = (JobSpoolType)job.SpoolType.Code; - - ProcessParameters process = new ProcessParameters(); - processParameters.MapPrimitivesTo(process); - ticket.ProcessParameters = process; - - foreach (var segment in job.OrderedSegments) - { - JobSegment jobSegment = new JobSegment(); - jobSegment.Length = segment.LengthWithFactor; - jobSegment.Name = segment.Name; - - foreach (var stop in segment.BrushStops) - { - JobBrushStop jobStop = new JobBrushStop(); - jobStop.Index = stop.StopIndex; - jobStop.OffsetPercent = stop.OffsetPercent; - jobStop.OffsetMeters = stop.OffsetMeters; - - if (stop.LiquidVolumes == null) - { - stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, processParameters); - } - - foreach (var liquidVolume in stop.LiquidVolumes) - { - JobDispenser dispenser = new JobDispenser(); - dispenser.Index = liquidVolume.IdsPack.PackIndex; - dispenser.Volume = liquidVolume.Volume; - dispenser.DispenserLiquidType = (DispenserLiquidType)liquidVolume.IdsPack.LiquidType.Code; - dispenser.DispenserStepDivision = (DispenserStepDivision)liquidVolume.DispenserStepDivision; - - dispenser.NanoliterPerPulse = liquidVolume.IdsPack.Dispenser.NlPerPulse; - - dispenser.LiquidMaxNanoliterPerCentimeter = liquidVolume.LiquidMaxNanoliterPerCentimeter; - dispenser.NanoliterPerCentimeter = liquidVolume.NanoliterPerCentimeter; - dispenser.NanolitterPerSecond = liquidVolume.NanoliterPerSecond; - dispenser.PulsePerSecond = liquidVolume.PulsePerSecond; - - jobStop.Dispensers.Add(dispenser); - } - - jobSegment.BrushStops.Add(jobStop); - } - - ticket.Segments.Add(jobSegment); - } - - request.JobTicket = ticket; - - JobHandler handler = null; - - handler = new JobHandler(async () => - { - try - { - var result = await SendRequest(new StubAbortJobRequest(), new TransportRequestConfig() { ShouldLog = true }); - OnPrintingAborted(handler, originalJob); - handler.RaiseCanceled(); - } - catch (Exception ex) - { - LogManager.Log(ex, "Failed to cancel job."); - } - }, originalJob, ticket, processParameters, JobHandlingMode); - - handler.StatusChanged += (x, s) => - { - RunningJobStatus = s; - }; - - bool responseLogged = false; - - SendContinuousRequest(request, new TransportContinuousRequestConfig() { ContinuousTimeout = ContinuousRequestTimeout, ShouldLog = true }).Subscribe((response) => - { - handler.RaiseStatusReceived(response.Message.Status); - - if (!responseLogged) - { - responseLogged = true; - Status = MachineStatuses.Printing; - RunningJob = originalJob; - OnPrintingStarted(handler, originalJob); - } - }, (ex) => - { - if (!(ex is ContinuousResponseAbortedException)) - { - Status = MachineStatuses.ReadyToDye; - - if (!handler.IsCanceled) - { - OnPrintingFailed(handler, originalJob, ex); - handler.RaiseFailed(ex); - } - } - else - { - Status = MachineStatuses.ReadyToDye; - } - }, () => - { - Status = MachineStatuses.ReadyToDye; - OnPrintingCompleted(handler, originalJob); - handler.RaiseCompleted(); - }); - - return handler; - - }); - } - /// /// Uploads the specified process parameters to the embedded device. /// diff --git a/Software/Visual_Studio/Tango.PMR/Printing/JobTicket.cs b/Software/Visual_Studio/Tango.PMR/Printing/JobTicket.cs index b6ac9c9e1..0431913a4 100644 --- a/Software/Visual_Studio/Tango.PMR/Printing/JobTicket.cs +++ b/Software/Visual_Studio/Tango.PMR/Printing/JobTicket.cs @@ -25,23 +25,25 @@ namespace Tango.PMR.Printing { "Cg9Kb2JUaWNrZXQucHJvdG8SElRhbmdvLlBNUi5QcmludGluZxoQSm9iU2Vn", "bWVudC5wcm90bxoXUHJvY2Vzc1BhcmFtZXRlcnMucHJvdG8aFkpvYldpbmRp", "bmdNZXRob2QucHJvdG8aDkpvYlNwb29sLnByb3RvGhdKb2JVcGxvYWRTdHJh", - "dGVneS5wcm90byLxAwoJSm9iVGlja2V0EgwKBEd1aWQYASABKAkSDAoETmFt", - "ZRgCIAEoCRIaChJFbmFibGVJbnRlclNlZ21lbnQYAyABKAgSGgoSSW50ZXJT", - "ZWdtZW50TGVuZ3RoGAQgASgBEg4KBkxlbmd0aBgFIAEoARJAChFQcm9jZXNz", - "UGFyYW1ldGVycxgGIAEoCzIlLlRhbmdvLlBNUi5QcmludGluZy5Qcm9jZXNz", - "UGFyYW1ldGVycxI7Cg1XaW5kaW5nTWV0aG9kGAcgASgOMiQuVGFuZ28uUE1S", - "LlByaW50aW5nLkpvYldpbmRpbmdNZXRob2QSKwoFU3Bvb2wYCCABKAsyHC5U", - "YW5nby5QTVIuUHJpbnRpbmcuSm9iU3Bvb2wSMAoIU2VnbWVudHMYCSADKAsy", - "Hi5UYW5nby5QTVIuUHJpbnRpbmcuSm9iU2VnbWVudBI9Cg5VcGxvYWRTdHJh", - "dGVneRgKIAEoDjIlLlRhbmdvLlBNUi5QcmludGluZy5Kb2JVcGxvYWRTdHJh", - "dGVneRIaChJKb2JEZXNjcmlwdGlvbkZpbGUYCyABKAkSGQoRRW5hYmxlTHVi", - "cmljYXRpb24YDCABKAgSFQoNTnVtYmVyT2ZVbml0cxgNIAEoDRIVCg1TYW1w", - "bGVXaW5kaW5nGA4gASgIQh4KHGNvbS50d2luZS50YW5nby5wbXIucHJpbnRp", - "bmdiBnByb3RvMw==")); + "dGVneS5wcm90bxoWVGhyZWFkUGFyYW1ldGVycy5wcm90byKxBAoJSm9iVGlj", + "a2V0EgwKBEd1aWQYASABKAkSDAoETmFtZRgCIAEoCRIaChJFbmFibGVJbnRl", + "clNlZ21lbnQYAyABKAgSGgoSSW50ZXJTZWdtZW50TGVuZ3RoGAQgASgBEg4K", + "Bkxlbmd0aBgFIAEoARJAChFQcm9jZXNzUGFyYW1ldGVycxgGIAEoCzIlLlRh", + "bmdvLlBNUi5QcmludGluZy5Qcm9jZXNzUGFyYW1ldGVycxI7Cg1XaW5kaW5n", + "TWV0aG9kGAcgASgOMiQuVGFuZ28uUE1SLlByaW50aW5nLkpvYldpbmRpbmdN", + "ZXRob2QSKwoFU3Bvb2wYCCABKAsyHC5UYW5nby5QTVIuUHJpbnRpbmcuSm9i", + "U3Bvb2wSMAoIU2VnbWVudHMYCSADKAsyHi5UYW5nby5QTVIuUHJpbnRpbmcu", + "Sm9iU2VnbWVudBI9Cg5VcGxvYWRTdHJhdGVneRgKIAEoDjIlLlRhbmdvLlBN", + "Ui5QcmludGluZy5Kb2JVcGxvYWRTdHJhdGVneRIaChJKb2JEZXNjcmlwdGlv", + "bkZpbGUYCyABKAkSGQoRRW5hYmxlTHVicmljYXRpb24YDCABKAgSFQoNTnVt", + "YmVyT2ZVbml0cxgNIAEoDRIVCg1TYW1wbGVXaW5kaW5nGA4gASgIEj4KEFRo", + "cmVhZFBhcmFtZXRlcnMYDyABKAsyJC5UYW5nby5QTVIuUHJpbnRpbmcuVGhy", + "ZWFkUGFyYW1ldGVyc0IeChxjb20udHdpbmUudGFuZ28ucG1yLnByaW50aW5n", + "YgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobSegmentReflection.Descriptor, global::Tango.PMR.Printing.ProcessParametersReflection.Descriptor, global::Tango.PMR.Printing.JobWindingMethodReflection.Descriptor, global::Tango.PMR.Printing.JobSpoolReflection.Descriptor, global::Tango.PMR.Printing.JobUploadStrategyReflection.Descriptor, }, + new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobSegmentReflection.Descriptor, global::Tango.PMR.Printing.ProcessParametersReflection.Descriptor, global::Tango.PMR.Printing.JobWindingMethodReflection.Descriptor, global::Tango.PMR.Printing.JobSpoolReflection.Descriptor, global::Tango.PMR.Printing.JobUploadStrategyReflection.Descriptor, global::Tango.PMR.Printing.ThreadParametersReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobTicket), global::Tango.PMR.Printing.JobTicket.Parser, new[]{ "Guid", "Name", "EnableInterSegment", "InterSegmentLength", "Length", "ProcessParameters", "WindingMethod", "Spool", "Segments", "UploadStrategy", "JobDescriptionFile", "EnableLubrication", "NumberOfUnits", "SampleWinding" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobTicket), global::Tango.PMR.Printing.JobTicket.Parser, new[]{ "Guid", "Name", "EnableInterSegment", "InterSegmentLength", "Length", "ProcessParameters", "WindingMethod", "Spool", "Segments", "UploadStrategy", "JobDescriptionFile", "EnableLubrication", "NumberOfUnits", "SampleWinding", "ThreadParameters" }, null, null, null) })); } #endregion @@ -86,6 +88,7 @@ namespace Tango.PMR.Printing { enableLubrication_ = other.enableLubrication_; numberOfUnits_ = other.numberOfUnits_; sampleWinding_ = other.sampleWinding_; + ThreadParameters = other.threadParameters_ != null ? other.ThreadParameters.Clone() : null; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -249,6 +252,17 @@ namespace Tango.PMR.Printing { } } + /// Field number for the "ThreadParameters" field. + public const int ThreadParametersFieldNumber = 15; + private global::Tango.PMR.Printing.ThreadParameters threadParameters_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.Printing.ThreadParameters ThreadParameters { + get { return threadParameters_; } + set { + threadParameters_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as JobTicket); @@ -276,6 +290,7 @@ namespace Tango.PMR.Printing { if (EnableLubrication != other.EnableLubrication) return false; if (NumberOfUnits != other.NumberOfUnits) return false; if (SampleWinding != other.SampleWinding) return false; + if (!object.Equals(ThreadParameters, other.ThreadParameters)) return false; return true; } @@ -296,6 +311,7 @@ namespace Tango.PMR.Printing { if (EnableLubrication != false) hash ^= EnableLubrication.GetHashCode(); if (NumberOfUnits != 0) hash ^= NumberOfUnits.GetHashCode(); if (SampleWinding != false) hash ^= SampleWinding.GetHashCode(); + if (threadParameters_ != null) hash ^= ThreadParameters.GetHashCode(); return hash; } @@ -359,6 +375,10 @@ namespace Tango.PMR.Printing { output.WriteRawTag(112); output.WriteBool(SampleWinding); } + if (threadParameters_ != null) { + output.WriteRawTag(122); + output.WriteMessage(ThreadParameters); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -404,6 +424,9 @@ namespace Tango.PMR.Printing { if (SampleWinding != false) { size += 1 + 1; } + if (threadParameters_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ThreadParameters); + } return size; } @@ -458,6 +481,12 @@ namespace Tango.PMR.Printing { if (other.SampleWinding != false) { SampleWinding = other.SampleWinding; } + if (other.threadParameters_ != null) { + if (threadParameters_ == null) { + threadParameters_ = new global::Tango.PMR.Printing.ThreadParameters(); + } + ThreadParameters.MergeFrom(other.ThreadParameters); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -530,6 +559,13 @@ namespace Tango.PMR.Printing { SampleWinding = input.ReadBool(); break; } + case 122: { + if (threadParameters_ == null) { + threadParameters_ = new global::Tango.PMR.Printing.ThreadParameters(); + } + input.ReadMessage(threadParameters_); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Printing/ThreadParameters.cs b/Software/Visual_Studio/Tango.PMR/Printing/ThreadParameters.cs new file mode 100644 index 000000000..3c927627f --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Printing/ThreadParameters.cs @@ -0,0 +1,386 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ThreadParameters.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Printing { + + /// Holder for reflection information generated from ThreadParameters.proto + public static partial class ThreadParametersReflection { + + #region Descriptor + /// File descriptor for ThreadParameters.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ThreadParametersReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChZUaHJlYWRQYXJhbWV0ZXJzLnByb3RvEhJUYW5nby5QTVIuUHJpbnRpbmci", + "qwEKEFRocmVhZFBhcmFtZXRlcnMSDwoHRmVlZGVyUBgBIAEoBRIPCgdGZWVk", + "ZXJJGAIgASgFEg8KB0ZlZWRlckQYAyABKAUSDwoHUHVsbGVyUBgEIAEoBRIP", + "CgdQdWxsZXJJGAUgASgFEg8KB1B1bGxlckQYBiABKAUSDwoHV2luZGVyUBgH", + "IAEoBRIPCgdXaW5kZXJJGAggASgFEg8KB1dpbmRlckQYCSABKAVCHgocY29t", + "LnR3aW5lLnRhbmdvLnBtci5wcmludGluZ2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.ThreadParameters), global::Tango.PMR.Printing.ThreadParameters.Parser, new[]{ "FeederP", "FeederI", "FeederD", "PullerP", "PullerI", "PullerD", "WinderP", "WinderI", "WinderD" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class ThreadParameters : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ThreadParameters()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Printing.ThreadParametersReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ThreadParameters() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ThreadParameters(ThreadParameters other) : this() { + feederP_ = other.feederP_; + feederI_ = other.feederI_; + feederD_ = other.feederD_; + pullerP_ = other.pullerP_; + pullerI_ = other.pullerI_; + pullerD_ = other.pullerD_; + winderP_ = other.winderP_; + winderI_ = other.winderI_; + winderD_ = other.winderD_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ThreadParameters Clone() { + return new ThreadParameters(this); + } + + /// Field number for the "FeederP" field. + public const int FeederPFieldNumber = 1; + private int feederP_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FeederP { + get { return feederP_; } + set { + feederP_ = value; + } + } + + /// Field number for the "FeederI" field. + public const int FeederIFieldNumber = 2; + private int feederI_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FeederI { + get { return feederI_; } + set { + feederI_ = value; + } + } + + /// Field number for the "FeederD" field. + public const int FeederDFieldNumber = 3; + private int feederD_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FeederD { + get { return feederD_; } + set { + feederD_ = value; + } + } + + /// Field number for the "PullerP" field. + public const int PullerPFieldNumber = 4; + private int pullerP_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int PullerP { + get { return pullerP_; } + set { + pullerP_ = value; + } + } + + /// Field number for the "PullerI" field. + public const int PullerIFieldNumber = 5; + private int pullerI_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int PullerI { + get { return pullerI_; } + set { + pullerI_ = value; + } + } + + /// Field number for the "PullerD" field. + public const int PullerDFieldNumber = 6; + private int pullerD_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int PullerD { + get { return pullerD_; } + set { + pullerD_ = value; + } + } + + /// Field number for the "WinderP" field. + public const int WinderPFieldNumber = 7; + private int winderP_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int WinderP { + get { return winderP_; } + set { + winderP_ = value; + } + } + + /// Field number for the "WinderI" field. + public const int WinderIFieldNumber = 8; + private int winderI_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int WinderI { + get { return winderI_; } + set { + winderI_ = value; + } + } + + /// Field number for the "WinderD" field. + public const int WinderDFieldNumber = 9; + private int winderD_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int WinderD { + get { return winderD_; } + set { + winderD_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ThreadParameters); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ThreadParameters other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FeederP != other.FeederP) return false; + if (FeederI != other.FeederI) return false; + if (FeederD != other.FeederD) return false; + if (PullerP != other.PullerP) return false; + if (PullerI != other.PullerI) return false; + if (PullerD != other.PullerD) return false; + if (WinderP != other.WinderP) return false; + if (WinderI != other.WinderI) return false; + if (WinderD != other.WinderD) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (FeederP != 0) hash ^= FeederP.GetHashCode(); + if (FeederI != 0) hash ^= FeederI.GetHashCode(); + if (FeederD != 0) hash ^= FeederD.GetHashCode(); + if (PullerP != 0) hash ^= PullerP.GetHashCode(); + if (PullerI != 0) hash ^= PullerI.GetHashCode(); + if (PullerD != 0) hash ^= PullerD.GetHashCode(); + if (WinderP != 0) hash ^= WinderP.GetHashCode(); + if (WinderI != 0) hash ^= WinderI.GetHashCode(); + if (WinderD != 0) hash ^= WinderD.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (FeederP != 0) { + output.WriteRawTag(8); + output.WriteInt32(FeederP); + } + if (FeederI != 0) { + output.WriteRawTag(16); + output.WriteInt32(FeederI); + } + if (FeederD != 0) { + output.WriteRawTag(24); + output.WriteInt32(FeederD); + } + if (PullerP != 0) { + output.WriteRawTag(32); + output.WriteInt32(PullerP); + } + if (PullerI != 0) { + output.WriteRawTag(40); + output.WriteInt32(PullerI); + } + if (PullerD != 0) { + output.WriteRawTag(48); + output.WriteInt32(PullerD); + } + if (WinderP != 0) { + output.WriteRawTag(56); + output.WriteInt32(WinderP); + } + if (WinderI != 0) { + output.WriteRawTag(64); + output.WriteInt32(WinderI); + } + if (WinderD != 0) { + output.WriteRawTag(72); + output.WriteInt32(WinderD); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (FeederP != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FeederP); + } + if (FeederI != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FeederI); + } + if (FeederD != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FeederD); + } + if (PullerP != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PullerP); + } + if (PullerI != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PullerI); + } + if (PullerD != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PullerD); + } + if (WinderP != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(WinderP); + } + if (WinderI != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(WinderI); + } + if (WinderD != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(WinderD); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ThreadParameters other) { + if (other == null) { + return; + } + if (other.FeederP != 0) { + FeederP = other.FeederP; + } + if (other.FeederI != 0) { + FeederI = other.FeederI; + } + if (other.FeederD != 0) { + FeederD = other.FeederD; + } + if (other.PullerP != 0) { + PullerP = other.PullerP; + } + if (other.PullerI != 0) { + PullerI = other.PullerI; + } + if (other.PullerD != 0) { + PullerD = other.PullerD; + } + if (other.WinderP != 0) { + WinderP = other.WinderP; + } + if (other.WinderI != 0) { + WinderI = other.WinderI; + } + if (other.WinderD != 0) { + WinderD = other.WinderD; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + FeederP = input.ReadInt32(); + break; + } + case 16: { + FeederI = input.ReadInt32(); + break; + } + case 24: { + FeederD = input.ReadInt32(); + break; + } + case 32: { + PullerP = input.ReadInt32(); + break; + } + case 40: { + PullerI = input.ReadInt32(); + break; + } + case 48: { + PullerD = input.ReadInt32(); + break; + } + case 56: { + WinderP = input.ReadInt32(); + break; + } + case 64: { + WinderI = input.ReadInt32(); + break; + } + case 72: { + WinderD = input.ReadInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj index 0eecc5283..3dd9d7f48 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -283,6 +283,7 @@ + @@ -322,7 +323,7 @@ - + \ No newline at end of file -- cgit v1.3.1