From c1ea90442c5e6f0e000d69c8b2a0b0a81dfa6130 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 16 Mar 2020 15:17:07 +0200 Subject: Dispenser Analyzer - added Version to main title of the application --- .../Utilities/Tango.DispenserAnalyzer.UI/MainWindow.xaml | 2 +- .../Utilities/Tango.DispenserAnalyzer.UI/MainWindow.xaml.cs | 12 +++++++++++- .../Tango.DispenserAnalyzer.UI/Properties/AssemblyInfo.cs | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/Utilities/Tango.DispenserAnalyzer.UI/MainWindow.xaml b/Software/Visual_Studio/Utilities/Tango.DispenserAnalyzer.UI/MainWindow.xaml index a330b4425..3eabf21b4 100644 --- a/Software/Visual_Studio/Utilities/Tango.DispenserAnalyzer.UI/MainWindow.xaml +++ b/Software/Visual_Studio/Utilities/Tango.DispenserAnalyzer.UI/MainWindow.xaml @@ -11,7 +11,7 @@ xmlns:local="clr-namespace:Tango.DispenserAnalyzer.UI" xmlns:vm ="clr-namespace:Tango.DispenserAnalyzer.UI.ViewModels" mc:Ignorable="d" - Title="Dispenser Analyser" Height="1000" Width="860" WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow" ResizeMode="CanResize" Foreground="#202020" + Title="{Binding WindowTitle, RelativeSource={RelativeSource Mode=Self}}" Height="1000" Width="860" WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow" ResizeMode="CanResize" Foreground="#202020" d:DataContext="{d:DesignInstance Type=vm:MainWindowVM, IsDesignTimeCreatable=False}"> diff --git a/Software/Visual_Studio/Utilities/Tango.DispenserAnalyzer.UI/MainWindow.xaml.cs b/Software/Visual_Studio/Utilities/Tango.DispenserAnalyzer.UI/MainWindow.xaml.cs index 26d64c995..a7bcf796e 100644 --- a/Software/Visual_Studio/Utilities/Tango.DispenserAnalyzer.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/Utilities/Tango.DispenserAnalyzer.UI/MainWindow.xaml.cs @@ -25,7 +25,17 @@ namespace Tango.DispenserAnalyzer.UI public partial class MainWindow : Window { private MainWindowVM _vm; - + + public string WindowTitle + { + get + { + Version version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + return "Dispenser Analyzer - Version" + version; + } + } + + public MainWindow() { InitializeComponent(); diff --git a/Software/Visual_Studio/Utilities/Tango.DispenserAnalyzer.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.DispenserAnalyzer.UI/Properties/AssemblyInfo.cs index 4b15c6e1f..363f31ea5 100644 --- a/Software/Visual_Studio/Utilities/Tango.DispenserAnalyzer.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Utilities/Tango.DispenserAnalyzer.UI/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.1.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] -- cgit v1.3.1 From ab31d366a5d9e5c6f8e9ce1bcb4e76e9ab46d526 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 16 Mar 2020 16:12:49 +0200 Subject: MS. Statistic Job Runs page. Add "Total Runs: Integer". --- .../Models/StatisticsValueCollection.cs | 10 +++++----- .../Tango.MachineStudio.Statistics/ViewModels/JobRunsViewVM.cs | 9 ++++++++- .../Tango.MachineStudio.Statistics/Views/JobRunsView.xaml | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Models/StatisticsValueCollection.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Models/StatisticsValueCollection.cs index eab4eecde..ef5527406 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Models/StatisticsValueCollection.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Models/StatisticsValueCollection.cs @@ -20,7 +20,7 @@ namespace Tango.MachineStudio.Statistics.Models { public string Name { get; set; } - public double Value { get; set; } + public object Value { get; set; } public string Unit { get; set; } } @@ -139,7 +139,7 @@ namespace Tango.MachineStudio.Statistics.Models _pieColors.Add(((SolidColorBrush)Application.Current.Resources["OrangeBrush"]).Color); _pieColors.Add(((SolidColorBrush)Application.Current.Resources["GreenBrush"]).Color); _pieColors.Add(((SolidColorBrush)Application.Current.Resources["BlueBrush100"]).Color); - _pieColors.Add(Color.FromRgb(100, 184, 236));//blue + _pieColors.Add(Colors.Yellow); PieJobSource = new LabeledSeriesCollection() @@ -175,7 +175,7 @@ namespace Tango.MachineStudio.Statistics.Models /// /// Adds the statistics value. /// - public void AddStatisticsValue(string name, double value, string unit) + public void AddStatisticsValue(string name, object value, string unit) { StatisticsCollection.Add(new StatisticsValue() { Name = name, Value = value, Unit = unit }); RaisePropertyChanged("StatisticsCollection"); @@ -206,7 +206,7 @@ namespace Tango.MachineStudio.Statistics.Models { Title = "PPC", Values = new ChartValues() { PPCCount }, - Fill = new SolidColorBrush(_pieColors[2]), + Fill = new SolidColorBrush(_pieColors[4]), DataLabels = true, ToolTip = "", LabelPoint = labelPoint @@ -274,7 +274,7 @@ namespace Tango.MachineStudio.Statistics.Models { Title = "Solid", Values = new ChartValues() { solidCount }, - Fill = new SolidColorBrush(_pieColors[2]), + Fill = new SolidColorBrush(_pieColors[4]), DataLabels = true, ToolTip = "", LabelPoint = labelPoint diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/ViewModels/JobRunsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/ViewModels/JobRunsViewVM.cs index ca40273f9..94d06a178 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/ViewModels/JobRunsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/ViewModels/JobRunsViewVM.cs @@ -367,6 +367,7 @@ namespace Tango.MachineStudio.Statistics.ViewModels protected void GenerateStatistics() { StatisticsValueCollection.Clean(); + GenerateTotalRunsCount(); GenerateTotalRunsLength(); GenerateTotalThreadConsumption(); GenerateRunsDuration(); @@ -377,7 +378,13 @@ namespace Tango.MachineStudio.Statistics.ViewModels CreateThreadConsumptionPerThread(); GenerateAllLiquidQuantities(); } - + + protected void GenerateTotalRunsCount() + {//Total Runs: + int val =JobRuns.Where(z => z.JobRun.EndPosition > 0).Count(); + StatisticsValueCollection.AddStatisticsValue("Total Runs ", val, " "); + } + /// /// Generates the total length of the job runs. /// diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml index ecc846903..af363b32a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml @@ -554,7 +554,7 @@ - + -- cgit v1.3.1 From 3549567e8db23411a84e006229f3382d912209fb Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 16 Mar 2020 23:21:15 +0200 Subject: PPC v1.1.7 --- .../PPC Installer-cache/cacheIndex.txt | Bin 52 -> 52 bytes .../Advanced Installer Projects/PPC Installer.aip | 28 ++++++++++++++++++--- .../PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs | 2 +- Software/Visual_Studio/Tango.sln | 16 ++++++------ .../Utilities/Tango.JobRunsGenerator/Program.cs | 2 +- 5 files changed, 36 insertions(+), 12 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt index a603ff06b..993ced97e 100644 Binary files a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt and b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt differ diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip index 4abc93ae4..c36b538c5 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip @@ -18,10 +18,10 @@ - + - + @@ -104,6 +104,8 @@ + + @@ -155,6 +157,7 @@ + @@ -185,11 +188,14 @@ + + + @@ -437,6 +443,16 @@ + + + + + + + + + + @@ -446,7 +462,7 @@ - + @@ -700,6 +716,12 @@ + + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs index 11a400fd3..751a4c316 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs @@ -8,4 +8,4 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango PPC Application")] -[assembly: AssemblyVersion("1.1.6.0")] +[assembly: AssemblyVersion("1.1.7.0")] diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln index 921301cc0..476ebe1fd 100644 --- a/Software/Visual_Studio/Tango.sln +++ b/Software/Visual_Studio/Tango.sln @@ -6432,6 +6432,7 @@ Global {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.AppVeyor|x86.ActiveCfg = Release|Win32 {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.AppVeyor|x86.Build.0 = Release|Win32 {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|Any CPU.Build.0 = Debug|Win32 {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|ARM.ActiveCfg = Debug|Win32 {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|ARM64.ActiveCfg = Debug|Win32 {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Debug|x64.ActiveCfg = Debug|x64 @@ -6448,7 +6449,8 @@ Global {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.DefaultBuild|x64.Build.0 = Debug|x64 {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.DefaultBuild|x86.ActiveCfg = Debug|Win32 {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.DefaultBuild|x86.Build.0 = Debug|Win32 - {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|Any CPU.ActiveCfg = Release|Win32 + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|Any CPU.ActiveCfg = Debug|Win32 + {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|Any CPU.Build.0 = Debug|Win32 {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|ARM.ActiveCfg = Release|Win32 {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|ARM64.ActiveCfg = Release|Win32 {A07E6CB4-0132-4EB1-9A38-C8C057884DC2}.Release|x64.ActiveCfg = Release|x64 @@ -6699,12 +6701,12 @@ Global {A07E6CB4-0132-4EB1-9A38-C8C057884DC2} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6} - BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear - BuildVersion_UpdateAssemblyVersion = True - BuildVersion_UpdateFileVersion = False - BuildVersion_StartDate = 2000/1/1 - BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs BuildVersion_UseGlobalSettings = False + BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs + BuildVersion_StartDate = 2000/1/1 + BuildVersion_UpdateFileVersion = False + BuildVersion_UpdateAssemblyVersion = True + BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear + SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6} EndGlobalSection EndGlobal diff --git a/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs b/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs index b105b8254..0f53e1504 100644 --- a/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs +++ b/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs @@ -19,7 +19,7 @@ namespace Tango.JobRunsGenerator static void Main(string[] args) { DataSource dataSource = new DataSource(); - dataSource.Catalog = "Tango_DEV"; + dataSource.Catalog = "Tango_TEST"; dataSource.Address = "twine.database.windows.net"; dataSource.IntegratedSecurity = false; dataSource.UserName = "Roy"; -- cgit v1.3.1 From 3d09f9c2aef7ab4ca2c66a35c8c25a39bc748d1b Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 16 Mar 2020 23:59:42 +0200 Subject: Implemented job runs individual liquid quantities. Added to job runs fixer. --- .../Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs | 56 +++++ .../Visual_Studio/Tango.BL/Entities/JobRunBase.cs | 266 +++++++++++++++++++++ .../Visual_Studio/Tango.DAL.Remote/DB/JOB_RUNS.cs | 7 + .../Tango.DAL.Remote/DB/RemoteADO.edmx | 21 ++ .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 158 ++++++------ .../JobRuns/BasicJobRunsLogger.cs | 30 +++ .../Utilities/Tango.JobRunsGenerator/Program.cs | 40 +++- 7 files changed, 498 insertions(+), 80 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs index 8b5b29482..a728ef881 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs @@ -165,6 +165,62 @@ namespace Tango.BL.DTO get; set; } + /// + /// cyan quantity + /// + public Int32 CyanQuantity + { + get; set; + } + + /// + /// magenta quantity + /// + public Int32 MagentaQuantity + { + get; set; + } + + /// + /// yellow quantity + /// + public Int32 YellowQuantity + { + get; set; + } + + /// + /// black quantity + /// + public Int32 BlackQuantity + { + get; set; + } + + /// + /// transparent quantity + /// + public Int32 TransparentQuantity + { + get; set; + } + + /// + /// lubricant quantity + /// + public Int32 LubricantQuantity + { + get; set; + } + + /// + /// cleaner quantity + /// + public Int32 CleanerQuantity + { + get; set; + } + /// /// end position /// diff --git a/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs b/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs index 2b002d19a..9277e279b 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs @@ -55,6 +55,20 @@ namespace Tango.BL.Entities public event EventHandler LiquidQuantityStringChanged; + public event EventHandler CyanQuantityChanged; + + public event EventHandler MagentaQuantityChanged; + + public event EventHandler YellowQuantityChanged; + + public event EventHandler BlackQuantityChanged; + + public event EventHandler TransparentQuantityChanged; + + public event EventHandler LubricantQuantityChanged; + + public event EventHandler CleanerQuantityChanged; + public event EventHandler EndPositionChanged; public event EventHandler FailedMessageChanged; @@ -541,6 +555,195 @@ namespace Tango.BL.Entities } } + protected Int32 _cyanquantity; + + /// + /// Gets or sets the jobrunbase cyan quantity. + /// + + [Column("CYAN_QUANTITY")] + + public Int32 CyanQuantity + { + get + { + return _cyanquantity; + } + + set + { + if (_cyanquantity != value) + { + _cyanquantity = value; + + OnCyanQuantityChanged(value); + + } + } + } + + protected Int32 _magentaquantity; + + /// + /// Gets or sets the jobrunbase magenta quantity. + /// + + [Column("MAGENTA_QUANTITY")] + + public Int32 MagentaQuantity + { + get + { + return _magentaquantity; + } + + set + { + if (_magentaquantity != value) + { + _magentaquantity = value; + + OnMagentaQuantityChanged(value); + + } + } + } + + protected Int32 _yellowquantity; + + /// + /// Gets or sets the jobrunbase yellow quantity. + /// + + [Column("YELLOW_QUANTITY")] + + public Int32 YellowQuantity + { + get + { + return _yellowquantity; + } + + set + { + if (_yellowquantity != value) + { + _yellowquantity = value; + + OnYellowQuantityChanged(value); + + } + } + } + + protected Int32 _blackquantity; + + /// + /// Gets or sets the jobrunbase black quantity. + /// + + [Column("BLACK_QUANTITY")] + + public Int32 BlackQuantity + { + get + { + return _blackquantity; + } + + set + { + if (_blackquantity != value) + { + _blackquantity = value; + + OnBlackQuantityChanged(value); + + } + } + } + + protected Int32 _transparentquantity; + + /// + /// Gets or sets the jobrunbase transparent quantity. + /// + + [Column("TRANSPARENT_QUANTITY")] + + public Int32 TransparentQuantity + { + get + { + return _transparentquantity; + } + + set + { + if (_transparentquantity != value) + { + _transparentquantity = value; + + OnTransparentQuantityChanged(value); + + } + } + } + + protected Int32 _lubricantquantity; + + /// + /// Gets or sets the jobrunbase lubricant quantity. + /// + + [Column("LUBRICANT_QUANTITY")] + + public Int32 LubricantQuantity + { + get + { + return _lubricantquantity; + } + + set + { + if (_lubricantquantity != value) + { + _lubricantquantity = value; + + OnLubricantQuantityChanged(value); + + } + } + } + + protected Int32 _cleanerquantity; + + /// + /// Gets or sets the jobrunbase cleaner quantity. + /// + + [Column("CLEANER_QUANTITY")] + + public Int32 CleanerQuantity + { + get + { + return _cleanerquantity; + } + + set + { + if (_cleanerquantity != value) + { + _cleanerquantity = value; + + OnCleanerQuantityChanged(value); + + } + } + } + protected Double _endposition; /// @@ -748,6 +951,69 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(LiquidQuantityString)); } + /// + /// Called when the CyanQuantity has changed. + /// + protected virtual void OnCyanQuantityChanged(Int32 cyanquantity) + { + CyanQuantityChanged?.Invoke(this, cyanquantity); + RaisePropertyChanged(nameof(CyanQuantity)); + } + + /// + /// Called when the MagentaQuantity has changed. + /// + protected virtual void OnMagentaQuantityChanged(Int32 magentaquantity) + { + MagentaQuantityChanged?.Invoke(this, magentaquantity); + RaisePropertyChanged(nameof(MagentaQuantity)); + } + + /// + /// Called when the YellowQuantity has changed. + /// + protected virtual void OnYellowQuantityChanged(Int32 yellowquantity) + { + YellowQuantityChanged?.Invoke(this, yellowquantity); + RaisePropertyChanged(nameof(YellowQuantity)); + } + + /// + /// Called when the BlackQuantity has changed. + /// + protected virtual void OnBlackQuantityChanged(Int32 blackquantity) + { + BlackQuantityChanged?.Invoke(this, blackquantity); + RaisePropertyChanged(nameof(BlackQuantity)); + } + + /// + /// Called when the TransparentQuantity has changed. + /// + protected virtual void OnTransparentQuantityChanged(Int32 transparentquantity) + { + TransparentQuantityChanged?.Invoke(this, transparentquantity); + RaisePropertyChanged(nameof(TransparentQuantity)); + } + + /// + /// Called when the LubricantQuantity has changed. + /// + protected virtual void OnLubricantQuantityChanged(Int32 lubricantquantity) + { + LubricantQuantityChanged?.Invoke(this, lubricantquantity); + RaisePropertyChanged(nameof(LubricantQuantity)); + } + + /// + /// Called when the CleanerQuantity has changed. + /// + protected virtual void OnCleanerQuantityChanged(Int32 cleanerquantity) + { + CleanerQuantityChanged?.Invoke(this, cleanerquantity); + RaisePropertyChanged(nameof(CleanerQuantity)); + } + /// /// Called when the EndPosition has changed. /// diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/JOB_RUNS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/JOB_RUNS.cs index faad22636..834a27443 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/JOB_RUNS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/JOB_RUNS.cs @@ -35,6 +35,13 @@ namespace Tango.DAL.Remote.DB public bool IS_GRADIENT { get; set; } public int GRADIENT_RESOLUTION_CM { get; set; } public string LIQUID_QUANTITY_STRING { get; set; } + public int CYAN_QUANTITY { get; set; } + public int MAGENTA_QUANTITY { get; set; } + public int YELLOW_QUANTITY { get; set; } + public int BLACK_QUANTITY { get; set; } + public int TRANSPARENT_QUANTITY { get; set; } + public int LUBRICANT_QUANTITY { get; set; } + public int CLEANER_QUANTITY { get; set; } public double END_POSITION { get; set; } public string FAILED_MESSAGE { get; set; } public bool IS_SYNCHRONIZED { 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 41f24052a..3cf2baaba 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -619,6 +619,13 @@ + + + + + + + @@ -3911,6 +3918,13 @@ + + + + + + + @@ -6375,6 +6389,13 @@ + + + + + + + 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 95c9f4744..a69b91e87 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/JobRuns/BasicJobRunsLogger.cs b/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs index 0fadd1baa..75d940566 100644 --- a/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs +++ b/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs @@ -115,6 +115,36 @@ namespace Tango.Integration.JobRuns run.GradientResolutionCm = MachineOperator.GradientGenerationConfiguration.ResolutionCM; run.JobString = _job.ToJobFileWhenLoaded().ToString(); + //Set individual liquid quantities + + //Cyan + var cyan = run.LiquidQuantities.SingleOrDefault(x => x.LiquidType == LiquidTypes.Cyan); + run.CyanQuantity = cyan != null ? cyan.Quantity : 0; + + //Magenta + var magenta = run.LiquidQuantities.SingleOrDefault(x => x.LiquidType == LiquidTypes.Magenta); + run.MagentaQuantity = magenta != null ? magenta.Quantity : 0; + + //Yellow + var yellow = run.LiquidQuantities.SingleOrDefault(x => x.LiquidType == LiquidTypes.Yellow); + run.YellowQuantity = yellow != null ? yellow.Quantity : 0; + + //Black + var black = run.LiquidQuantities.SingleOrDefault(x => x.LiquidType == LiquidTypes.Black); + run.BlackQuantity = black != null ? black.Quantity : 0; + + //TI + var ti = run.LiquidQuantities.SingleOrDefault(x => x.LiquidType == LiquidTypes.TransparentInk); + run.TransparentQuantity = ti != null ? ti.Quantity : 0; + + //Lubricant + var lubricant = run.LiquidQuantities.SingleOrDefault(x => x.LiquidType == LiquidTypes.Lubricant); + run.LubricantQuantity = lubricant != null ? lubricant.Quantity : 0; + + //Lubricant + var cleaner = run.LiquidQuantities.SingleOrDefault(x => x.LiquidType == LiquidTypes.Cleaner); + run.CleanerQuantity = cleaner != null ? cleaner.Quantity : 0; + if (exception != null) { run.FailedMessage = exception.FlattenMessage(); diff --git a/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs b/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs index 0f53e1504..b8031fdaf 100644 --- a/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs +++ b/Software/Visual_Studio/Utilities/Tango.JobRunsGenerator/Program.cs @@ -19,7 +19,7 @@ namespace Tango.JobRunsGenerator static void Main(string[] args) { DataSource dataSource = new DataSource(); - dataSource.Catalog = "Tango_TEST"; + dataSource.Catalog = "Tango_DEV"; dataSource.Address = "twine.database.windows.net"; dataSource.IntegratedSecurity = false; dataSource.UserName = "Roy"; @@ -78,6 +78,44 @@ namespace Tango.JobRunsGenerator if (run.ActualStartDate == null) run.ActualStartDate = run.StartDate; run.IsGradient = job.Segments.Any(x => x.BrushStops.Count > 1); + //Set new liquid quantities. + if (run.CyanQuantity == 0 && + run.MagentaQuantity == 0 && + run.YellowQuantity == 0 && + run.BlackQuantity == 0 && + run.TransparentQuantity == 0 && + run.LubricantQuantity == 0 && + run.CleanerQuantity == 0) + { + //Cyan + var cyan = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.Cyan); + run.CyanQuantity = cyan != null ? cyan.Quantity : 0; + + //Magenta + var magenta = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.Magenta); + run.MagentaQuantity = magenta != null ? magenta.Quantity : 0; + + //Yellow + var yellow = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.Yellow); + run.YellowQuantity = yellow != null ? yellow.Quantity : 0; + + //Black + var black = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.Black); + run.BlackQuantity = black != null ? black.Quantity : 0; + + //TI + var ti = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.TransparentInk); + run.TransparentQuantity = ti != null ? ti.Quantity : 0; + + //Lubricant + var lubricant = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.Lubricant); + run.LubricantQuantity = lubricant != null ? lubricant.Quantity : 0; + + //Lubricant + var cleaner = run.LiquidQuantities.FirstOrDefault(x => x.LiquidType == BL.Enumerations.LiquidTypes.Cleaner); + run.CleanerQuantity = cleaner != null ? cleaner.Quantity : 0; + } + saveIndex++; if (saveIndex > 100) -- cgit v1.3.1 From ab9f5994949565dd664c1a33fb4e0a105a57eec6 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 17 Mar 2020 05:08:43 +0200 Subject: Changes to FileSystem. --- .../Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj | 4 ++-- .../Visual_Studio/Tango.FileSystem/FileSystemManager.cs | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index f06109584..45eaa0e50 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -37,7 +37,7 @@ full false ..\..\Build\PPC\Debug\ - TRACE;DEBUG + TRACE;DEBUG;DESKTOP prompt 4 @@ -693,7 +693,7 @@ if $(ConfigurationName) == Debug copy /Y "$(TargetDir)Packages" "$(TargetDir)" - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs b/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs index f0b86becf..44c8f1901 100644 --- a/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs +++ b/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; +using System.Text.RegularExpressions; using System.Threading.Tasks; using Tango.FileSystem.Network; @@ -41,6 +42,21 @@ namespace Tango.FileSystem return GetRoot(); } + try + { + if (request.Path.Count(x => x == '%') == 2) + { + var variable = Regex.Match(request.Path, "(?<=%)(.*?)(?=%)").Value; + request.Path = request.Path.Replace($"%{variable}%", Environment.ExpandEnvironmentVariables($"%{variable}%")); + } + } + catch + { + throw new ArgumentException("Could not parse environment variable."); + } + + request.Path = Path.GetFullPath(request.Path); + if (!Directory.Exists(request.Path)) { throw new DirectoryNotFoundException("The specified directory could not be located."); -- cgit v1.3.1