diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-12-18 21:05:38 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-12-18 21:05:38 +0200 |
| commit | 44af6a05f13cff1defd8ef4a01c4ecdbd7833c33 (patch) | |
| tree | 4747a57757f8206bdc97826a9febf1685f0cf341 /Software/Visual_Studio | |
| parent | 68916b0c7e3322ff1ca8b45ed789973a23ccac51 (diff) | |
| download | Tango-44af6a05f13cff1defd8ef4a01c4ecdbd7833c33.tar.gz Tango-44af6a05f13cff1defd8ef4a01c4ecdbd7833c33.zip | |
Changed DTO's to include byte[] when generated but mapped by reference.
More improvements to action logs.
Diffstat (limited to 'Software/Visual_Studio')
21 files changed, 407 insertions, 74 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 4b276462e..bb8f117c3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -1746,6 +1746,8 @@ namespace Tango.MachineStudio.Developer.ViewModels tables.Add(newTable); } + var rmlBeforeDTO = RmlDTO.FromObservable(SelectedRML); + group.Active = true; group.ProcessParametersTables = tables.ToSynchronizedObservableCollection(); group.Rml = SelectedRML; @@ -1760,6 +1762,8 @@ namespace Tango.MachineStudio.Developer.ViewModels SelectedRML.ProcessParametersTablesGroups.Add(group); await SelectedRML.SaveAsync(_activeJobDbContext); + _actionLogManager.InsertLog(ActionLogType.RmlSaved, AuthenticationProvider.CurrentUser, SelectedRML.Name, rmlBeforeDTO, RmlDTO.FromObservable(SelectedRML), "Active process parameters changed from Machine Studio Research module."); + InvalidateLiquidFactorsAndProcessTables(); } @@ -1804,98 +1808,110 @@ namespace Tango.MachineStudio.Developer.ViewModels using (_notification.PushTaskItem("Loading job details...")) { - await Task.Factory.StartNew(() => + try { - _disable_gamut_check = true; + await Task.Factory.StartNew(() => + { + _disable_gamut_check = true; - LogManager.Log(String.Format("Loading job {0}...", SelectedMachineJob.Name)); - SelectedSegments = new ObservableCollection<Segment>(); - SelectedBrushStops = new ObservableCollection<BrushStop>(); - SelectedRML = null; - SelectedSegment = null; - SelectedGroupHistory = null; - SelectedBrushStop = null; - SelectedProcessParametersTable = null; - RmlProcessParametersTableGroup = null; + LogManager.Log(String.Format("Loading job {0}...", SelectedMachineJob.Name)); + SelectedSegments = new ObservableCollection<Segment>(); + SelectedBrushStops = new ObservableCollection<BrushStop>(); + SelectedRML = null; + SelectedSegment = null; + SelectedGroupHistory = null; + SelectedBrushStop = null; + SelectedProcessParametersTable = null; + RmlProcessParametersTableGroup = null; - _blockInvalidateCommands = false; + _blockInvalidateCommands = false; - LogManager.Log("Creating active job DB context..."); - _activeJobDbContext = ObservablesContext.CreateDefault(); + LogManager.Log("Creating active job DB context..."); + _activeJobDbContext = ObservablesContext.CreateDefault(); - LogManager.Log("Initializing available color spaces, RMLs & Winding methods..."); + LogManager.Log("Initializing available color spaces, RMLs & Winding methods..."); - //var processParamsGroups = _activeJobDbContext.ProcessParametersTablesGroups.ToList(); - //var processParams = _activeJobDbContext.ProcessParametersTables.ToList(); + //var processParamsGroups = _activeJobDbContext.ProcessParametersTablesGroups.ToList(); + //var processParams = _activeJobDbContext.ProcessParametersTables.ToList(); - ColorSpaces = _activeJobDbContext.ColorSpaces.ToObservableCollection(); - Rmls = _activeJobDbContext.Rmls.ToObservableCollection(); - WindingMethods = _activeJobDbContext.WindingMethods.ToObservableCollection(); - SpoolTypes = _activeJobDbContext.SpoolTypes.ToObservableCollection(); + ColorSpaces = _activeJobDbContext.ColorSpaces.ToObservableCollection(); + Rmls = _activeJobDbContext.Rmls.ToObservableCollection(); + WindingMethods = _activeJobDbContext.WindingMethods.ToObservableCollection(); + SpoolTypes = _activeJobDbContext.SpoolTypes.ToObservableCollection(); - LogManager.Log("Loading machine spools..."); - _activeJobDbContext.Spools.Where(x => x.MachineGuid == SelectedMachine.Guid).Load(); + LogManager.Log("Loading machine spools..."); + _activeJobDbContext.Spools.Where(x => x.MachineGuid == SelectedMachine.Guid).Load(); - LogManager.Log("Setting active job..."); - ActiveJob = new JobBuilder(_activeJobDbContext).Set(SelectedMachineJob.Guid).WithUser().WithSegments().WithBrushStops().WithConfiguration().WithRML().Build(); + LogManager.Log("Setting active job..."); + ActiveJob = new JobBuilder(_activeJobDbContext).Set(SelectedMachineJob.Guid).WithUser().WithSegments().WithBrushStops().WithConfiguration().WithRML().Build(); - //_activeJobDbContext.Ccts.Where(x => x.RmlGuid == ActiveJob.RmlGuid).ToList(); - //_activeJobDbContext.Cats.Where(x => x.RmlGuid == ActiveJob.RmlGuid).ToList(); - //_activeJobDbContext.Machines.SingleOrDefault(x => x.Guid == ActiveJob.MachineGuid); - //_activeJobDbContext.Configurations.SingleOrDefault(x => x.Guid == ActiveJob.Machine.ConfigurationGuid); + //_activeJobDbContext.Ccts.Where(x => x.RmlGuid == ActiveJob.RmlGuid).ToList(); + //_activeJobDbContext.Cats.Where(x => x.RmlGuid == ActiveJob.RmlGuid).ToList(); + //_activeJobDbContext.Machines.SingleOrDefault(x => x.Guid == ActiveJob.MachineGuid); + //_activeJobDbContext.Configurations.SingleOrDefault(x => x.Guid == ActiveJob.Machine.ConfigurationGuid); - //_activeJobDbContext.LiquidTypesRmls.ToList(); + //_activeJobDbContext.LiquidTypesRmls.ToList(); - //_activeJobDbContext.IdsPackFormulas.ToList(); - //_activeJobDbContext.LiquidTypes.ToList(); - //_activeJobDbContext.MidTankTypes.ToList(); - //_activeJobDbContext.DispenserTypes.ToList(); + //_activeJobDbContext.IdsPackFormulas.ToList(); + //_activeJobDbContext.LiquidTypes.ToList(); + //_activeJobDbContext.MidTankTypes.ToList(); + //_activeJobDbContext.DispenserTypes.ToList(); - //_activeJobDbContext.IdsPacks.Where(x => x.ConfigurationGuid == ActiveJob.Machine.ConfigurationGuid).ToList(); + //_activeJobDbContext.IdsPacks.Where(x => x.ConfigurationGuid == ActiveJob.Machine.ConfigurationGuid).ToList(); - _beforeSaveJobDTO = JobDTO.FromObservable(ActiveJob); + _beforeSaveJobDTO = JobDTO.FromObservable(ActiveJob); - LogManager.Log("Setting selected segment..."); - _selectedSegment = ActiveJob.OrderedSegments.FirstOrDefault(); + LogManager.Log("Setting selected segment..."); + _selectedSegment = ActiveJob.OrderedSegments.FirstOrDefault(); - ActiveJob.LengthChanged -= ActiveJob_LengthChanged; - ActiveJob.LengthChanged += ActiveJob_LengthChanged; + ActiveJob.LengthChanged -= ActiveJob_LengthChanged; + ActiveJob.LengthChanged += ActiveJob_LengthChanged; - _selectedRML = ActiveJob.Rml; - InvalidateLiquidFactorsAndProcessTables(); - RaisePropertyChanged(nameof(SelectedRML)); + _selectedRML = ActiveJob.Rml; + InvalidateLiquidFactorsAndProcessTables(); + RaisePropertyChanged(nameof(SelectedRML)); - UpdateEstimatedDuration(); + UpdateEstimatedDuration(); - _blockInvalidateCommands = false; - InvalidateRelayCommands(); + _blockInvalidateCommands = false; + InvalidateRelayCommands(); - _disable_gamut_check = false; + _disable_gamut_check = false; - _settings.LastSelectedMachineGuid = SelectedMachine != null ? SelectedMachine.Guid : null; - _settings.LastSelectedJobGuid = SelectedMachineJob != null ? SelectedMachineJob.Guid : null; + _settings.LastSelectedMachineGuid = SelectedMachine != null ? SelectedMachine.Guid : null; + _settings.LastSelectedJobGuid = SelectedMachineJob != null ? SelectedMachineJob.Guid : null; - _settings.Save(); - }); + _settings.Save(); + }); - SegmentsCollectionView = CollectionViewSource.GetDefaultView(ActiveJob.Segments); - SegmentsCollectionView.SortDescriptions.Add(new SortDescription(nameof(Segment.SegmentIndex), ListSortDirection.Ascending)); + SegmentsCollectionView = CollectionViewSource.GetDefaultView(ActiveJob.Segments); + SegmentsCollectionView.SortDescriptions.Add(new SortDescription(nameof(Segment.SegmentIndex), ListSortDirection.Ascending)); - foreach (var segment in ActiveJob.Segments) - { - SetSegmentBrushStopsLiquidVolumes(segment); - } + foreach (var segment in ActiveJob.Segments) + { + SetSegmentBrushStopsLiquidVolumes(segment); + } - SelectedSegment = _selectedSegment; + SelectedSegment = _selectedSegment; + + if (ActiveJob != null) + { + _current_job_string = ActiveJob.ToJobFileWhenLoaded().ToString(); + } - if (ActiveJob != null) + UIHelper.DoEvents(); + _navigation.NavigateTo(DeveloperNavigationView.JobView); + } + catch (Exception ex) { - _current_job_string = ActiveJob.ToJobFileWhenLoaded().ToString(); + LogManager.Log(ex, "Error loading job."); + _notification.ShowError($"An error occurred while trying to load the selected job.\n{ex.FlattenMessage()}"); + } + finally + { + CanWork = true; } - - UIHelper.DoEvents(); - _navigation.NavigateTo(DeveloperNavigationView.JobView); } CanWork = true; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner_ijdp5tm3_wpftmp.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner_ijdp5tm3_wpftmp.csproj new file mode 100644 index 000000000..0ef643858 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Tango.MachineStudio.HardwareDesigner_ijdp5tm3_wpftmp.csproj @@ -0,0 +1,184 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{69DB0564-268C-4B3C-B5D6-A3CDC7D14EAE}</ProjectGuid> + <OutputType>library</OutputType> + <RootNamespace>Tango.MachineStudio.HardwareDesigner</RootNamespace> + <AssemblyName>Tango.MachineStudio.HardwareDesigner</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\..\..\Build\Machine Studio\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\..\..\Build\Machine Studio\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + <Compile Include="Comparison\HardwareCompareResult.cs" /> + <Compile Include="Comparison\HardwareComponentCollectionCompareResult.cs" /> + <Compile Include="Comparison\HardwareComponentCompareResult.cs" /> + <Compile Include="Comparison\HardwareComponentPropertyResult.cs" /> + <Compile Include="Comparison\IHasDifference.cs" /> + <Compile Include="Report\ReportModel.cs" /> + <Compile Include="ViewModelLocator.cs" /> + <Compile Include="ViewModels\ComparisonWizardViewVM.cs" /> + <Compile Include="Views\ComparisonWizardView.xaml.cs"> + <DependentUpon>ComparisonWizardView.xaml</DependentUpon> + </Compile> + <Compile Include="ViewModels\MainViewVM.cs" /> + <Compile Include="Views\MainView.xaml.cs"> + <DependentUpon>MainView.xaml</DependentUpon> + </Compile> + <Compile Include="HardwareDesignerModule.cs" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <None Include="app.config" /> + <None Include="packages.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj"> + <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> + <Name>Tango.BL</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.CSV\Tango.CSV.csproj"> + <Project>{58e8825f-0c96-449c-b320-1e82b0aa876b}</Project> + <Name>Tango.CSV</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.DragAndDrop\Tango.DragAndDrop.csproj"> + <Project>{b112d89a-a106-41ae-a0c1-4abc84c477f5}</Project> + <Name>Tango.DragAndDrop</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Integration\Tango.Integration.csproj"> + <Project>{4206ac58-3b57-4699-8835-90bf6db01a61}</Project> + <Name>Tango.Integration</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj"> + <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project> + <Name>Tango.Logging</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.Settings\Tango.Settings.csproj"> + <Project>{d8f1ad85-526a-4f50-b6dc-d437af63d8d8}</Project> + <Name>Tango.Settings</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Tango.SharedUI\Tango.SharedUI.csproj"> + <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project> + <Name>Tango.SharedUI</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.MachineStudio.Common\Tango.MachineStudio.Common.csproj"> + <Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project> + <Name>Tango.MachineStudio.Common</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup /> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <ProjectExtensions> + <VisualStudio> + <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + </VisualStudio> + </ProjectExtensions> + <ItemGroup> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Microsoft.CSharp.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\mscorlib.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\PresentationCore.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\PresentationFramework.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.ComponentModel.DataAnnotations.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Core.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Data.DataSetExtensions.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Data.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Net.Http.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xaml.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xml.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xml.Linq.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.BL.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Core.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.CSV.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.DragAndDrop.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Integration.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Logging.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Machine Studio\Debug\Tango.MachineStudio.Common.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Settings.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.SharedUI.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\WindowsBase.dll" /> + </ItemGroup> + <ItemGroup> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.HardwareDesigner\obj\Debug\App.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.HardwareDesigner\obj\Debug\Views\ComparisonWizardView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\MachineStudio\Modules\Tango.MachineStudio.HardwareDesigner\obj\Debug\Views\MainView.g.cs" /> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/ActionLogs/DefaultActionLogComparer.cs b/Software/Visual_Studio/Tango.BL/ActionLogs/DefaultActionLogComparer.cs index 542aba0e4..b6c028137 100644 --- a/Software/Visual_Studio/Tango.BL/ActionLogs/DefaultActionLogComparer.cs +++ b/Software/Visual_Studio/Tango.BL/ActionLogs/DefaultActionLogComparer.cs @@ -59,7 +59,7 @@ namespace Tango.BL.ActionLogs foreach (var prop in GetProperties(before, after).OrderByDescending(x => x.PropertyType.IsPrimitive || x.PropertyType.IsValueType || x.PropertyType == typeof(String))) { - if (GetShouldIgnore(prop, before, after)) continue; + if (prop.PropertyType == typeof(byte[]) || GetShouldIgnore(prop, before, after)) continue; if (prop.PropertyType.IsPrimitive || prop.PropertyType.IsValueType || prop.PropertyType == typeof(String)) { diff --git a/Software/Visual_Studio/Tango.BL/ActionLogs/DefaultActionLogManager.cs b/Software/Visual_Studio/Tango.BL/ActionLogs/DefaultActionLogManager.cs index d95f4cd54..b8f427e3a 100644 --- a/Software/Visual_Studio/Tango.BL/ActionLogs/DefaultActionLogManager.cs +++ b/Software/Visual_Studio/Tango.BL/ActionLogs/DefaultActionLogManager.cs @@ -160,7 +160,7 @@ namespace Tango.BL.ActionLogs } /// <summary> - /// Inserts a new action log (deletion entry). + /// Inserts a new action log (deletion/creation entry). /// </summary> /// <param name="type">The type.</param> /// <param name="user">The user.</param> @@ -181,7 +181,7 @@ namespace Tango.BL.ActionLogs } /// <summary> - /// Inserts a new action log (nutral entry). + /// Inserts a new action log (creation entry). /// </summary> /// <param name="type">The type.</param> /// <param name="userGuid">The user unique identifier.</param> diff --git a/Software/Visual_Studio/Tango.BL/ActionLogs/IActionLogManager.cs b/Software/Visual_Studio/Tango.BL/ActionLogs/IActionLogManager.cs index 6fdca98a7..e1fdbc4ec 100644 --- a/Software/Visual_Studio/Tango.BL/ActionLogs/IActionLogManager.cs +++ b/Software/Visual_Studio/Tango.BL/ActionLogs/IActionLogManager.cs @@ -58,7 +58,7 @@ namespace Tango.BL.ActionLogs void InsertLog(ActionLogType type, User user, String relatedObjectName, IActionLogComparable relatedObjectBefore, IActionLogComparable relatedObjectAfter, String message = null); /// <summary> - /// Inserts a new action log (deletion entry). + /// Inserts a new action log (deletion/creation entry). /// </summary> /// <param name="type">The type.</param> /// <param name="user">The user.</param> @@ -69,7 +69,7 @@ namespace Tango.BL.ActionLogs void InsertLog(ActionLogType type, User user, String relatedObjectName, IActionLogComparable relatedObject, String message = null, bool serializeRelatedObject = false); /// <summary> - /// Inserts a new action log (nutral entry). + /// Inserts a new action log (creation entry). /// </summary> /// <param name="type">The type.</param> /// <param name="userGuid">The user unique identifier.</param> diff --git a/Software/Visual_Studio/Tango.BL/Builders/ActionLogsCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/ActionLogsCollectionBuilder.cs new file mode 100644 index 000000000..fecc0c662 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Builders/ActionLogsCollectionBuilder.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using System.Data.Entity; + +namespace Tango.BL.Builders +{ + public class ActionLogsCollectionBuilder : EntityCollectionBuilderBase<ActionLog, ActionLogsCollectionBuilder> + { + public ActionLogsCollectionBuilder(ObservablesContext context) : base(context) + { + + } + + public virtual ActionLogsCollectionBuilder WithUsers() + { + return AddQueryStep(1, (query) => + { + return query.Include(x => x.User).Include(x => x.User != null ? x.User.Contact : null); + }); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/CatDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/CatDTOBase.cs index 31de24ec0..20d534950 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/CatDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/CatDTOBase.cs @@ -53,5 +53,13 @@ namespace Tango.BL.DTO get; set; } + /// <summary> + /// data + /// </summary> + public Byte[] Data + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/CctDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/CctDTO.cs index 96fc02a9e..65cf781f8 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/CctDTO.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/CctDTO.cs @@ -9,6 +9,9 @@ namespace Tango.BL.DTO { public class CctDTO : CctDTOBase { - + protected override string OnGetActionLogName() + { + return $"CCT '{FileName}'"; + } } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/CctDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/CctDTOBase.cs index 1205a857e..5bfc59bb5 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/CctDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/CctDTOBase.cs @@ -45,5 +45,13 @@ namespace Tango.BL.DTO get; set; } + /// <summary> + /// data + /// </summary> + public Byte[] Data + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogDTOBase.cs index 2643b1d29..bd829e18f 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogDTOBase.cs @@ -53,5 +53,21 @@ namespace Tango.BL.DTO get; set; } + /// <summary> + /// logo + /// </summary> + public Byte[] Logo + { + get; set; + } + + /// <summary> + /// image + /// </summary> + public Byte[] Image + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorSpaceDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorSpaceDTOBase.cs index ddb367fc5..3a3fb4d14 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/ColorSpaceDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorSpaceDTOBase.cs @@ -45,5 +45,13 @@ namespace Tango.BL.DTO get; set; } + /// <summary> + /// thumbnail + /// </summary> + public Byte[] Thumbnail + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/DispenserDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/DispenserDTOBase.cs index 16e19d78a..6146f01dd 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/DispenserDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/DispenserDTOBase.cs @@ -77,5 +77,13 @@ namespace Tango.BL.DTO get; set; } + /// <summary> + /// calibration data + /// </summary> + public Byte[] CalibrationData + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/JobDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/JobDTOBase.cs index 2960381fc..073d833f2 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/JobDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/JobDTOBase.cs @@ -147,6 +147,14 @@ namespace Tango.BL.DTO } /// <summary> + /// embroidery file data + /// </summary> + public Byte[] EmbroideryFileData + { + get; set; + } + + /// <summary> /// embroidery file name /// </summary> public String EmbroideryFileName @@ -155,6 +163,14 @@ namespace Tango.BL.DTO } /// <summary> + /// embroidery jpeg + /// </summary> + public Byte[] EmbroideryJpeg + { + get; set; + } + + /// <summary> /// status /// </summary> public Int32 Status diff --git a/Software/Visual_Studio/Tango.BL/DTO/LiquidTypesRmlDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/LiquidTypesRmlDTOBase.cs index badbaf0bc..1133f7cc8 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/LiquidTypesRmlDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/LiquidTypesRmlDTOBase.cs @@ -45,5 +45,13 @@ namespace Tango.BL.DTO get; set; } + /// <summary> + /// default cat data + /// </summary> + public Byte[] DefaultCatData + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/ProcessParametersTableDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/ProcessParametersTableDTO.cs index 9959b2254..84da600a8 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/ProcessParametersTableDTO.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/ProcessParametersTableDTO.cs @@ -9,6 +9,9 @@ namespace Tango.BL.DTO { public class ProcessParametersTableDTO : ProcessParametersTableDTOBase { - + protected override string OnGetActionLogName() + { + return $"Process Table '{Name}'"; + } } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/ProcessParametersTablesGroupDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/ProcessParametersTablesGroupDTO.cs index 8419055c7..2091e5e57 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/ProcessParametersTablesGroupDTO.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/ProcessParametersTablesGroupDTO.cs @@ -9,6 +9,16 @@ namespace Tango.BL.DTO { public class ProcessParametersTablesGroupDTO : ProcessParametersTablesGroupDTOBase { + public List<ProcessParametersTableDTO> ProcessParametersTables { get; set; } + public ProcessParametersTablesGroupDTO() + { + ProcessParametersTables = new List<ProcessParametersTableDTO>(); + } + + protected override string OnGetActionLogName() + { + return $"Process Group '{Name}'"; + } } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlDTO.cs index ef4950fda..4b9be724e 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/RmlDTO.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlDTO.cs @@ -9,6 +9,16 @@ namespace Tango.BL.DTO { public class RmlDTO : RmlDTOBase { + public List<ProcessParametersTablesGroupDTO> ProcessParametersTablesGroups { get; set; } + public RmlDTO() + { + ProcessParametersTablesGroups = new List<ProcessParametersTablesGroupDTO>(); + } + + protected override string OnGetActionLogName() + { + return $"RML '{Name}'"; + } } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs index 8ed757b8d..84f7890ea 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs @@ -206,6 +206,14 @@ namespace Tango.BL.DTO } /// <summary> + /// thumbnail + /// </summary> + public Byte[] Thumbnail + { + get; set; + } + + /// <summary> /// cct guid /// </summary> public String CctGuid diff --git a/Software/Visual_Studio/Tango.BL/ObservableEntityDTO.cs b/Software/Visual_Studio/Tango.BL/ObservableEntityDTO.cs index 720d6b9b7..ee8d2f40f 100644 --- a/Software/Visual_Studio/Tango.BL/ObservableEntityDTO.cs +++ b/Software/Visual_Studio/Tango.BL/ObservableEntityDTO.cs @@ -51,7 +51,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)) + if (prop.PropertyType.IsPrimitive || prop.PropertyType.IsValueType || prop.PropertyType == typeof(String) || prop.PropertyType == typeof(byte[])) { prop.SetValue(dto, observableProp.GetValue(observable)); } @@ -99,7 +99,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)) + if (prop.PropertyType.IsPrimitive || prop.PropertyType.IsValueType || prop.PropertyType == typeof(String) || prop.PropertyType == typeof(byte[])) { observableProp.SetValue(observable, prop.GetValue(this)); } @@ -174,7 +174,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)) + if (prop.PropertyType.IsPrimitive || prop.PropertyType.IsValueType || prop.PropertyType == typeof(String) || prop.PropertyType == typeof(byte[])) { var observableValue = observableProp.GetValue(observable); var dtoValue = prop.GetValue(this); diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index f1bdf94ec..fb8ec84a3 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -89,6 +89,7 @@ <Compile Include="ActionLogs\IActionLogComparable.cs" /> <Compile Include="ActionLogs\IActionLogComparer.cs" /> <Compile Include="ActionLogs\IActionLogManager.cs" /> + <Compile Include="Builders\ActionLogsCollectionBuilder.cs" /> <Compile Include="Builders\CatalogBuilder.cs" /> <Compile Include="Builders\ConfigurationBuilder.cs" /> <Compile Include="Builders\EntityBuilderBase.cs" /> diff --git a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs index 3280f47f5..92eab0857 100644 --- a/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs +++ b/Software/Visual_Studio/Utilities/Tango.DBObservablesGenerator.CLI/ObservablesGenerator.cs @@ -184,7 +184,7 @@ namespace Tango.DBObservablesGenerator.CLI } codeFile.Fields.Add(codeField); - if (field.PropertyType.IsPrimitive || field.PropertyType.IsValueType || field.PropertyType == typeof(String)) + if (field.PropertyType.IsPrimitive || field.PropertyType.IsValueType || field.PropertyType == typeof(String) || field.PropertyType == typeof(byte[])) { dtoCodeBase.Properties.Add(new Property() { |
