diff options
| author | Roy <Roy.mail.net@gmail.com> | 2022-11-16 04:04:58 +0200 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2022-11-16 04:04:58 +0200 |
| commit | 5dc67f5f613825f9f835b9cfb9790be69f6538a4 (patch) | |
| tree | 6f23cf177d02a296b88d79ab3b77ee5eeaf3e10a | |
| parent | ba8c20b11ce7c94c7e81c4f23302ed97acbc6dcf (diff) | |
| download | Tango-5dc67f5f613825f9f835b9cfb9790be69f6538a4.tar.gz Tango-5dc67f5f613825f9f835b9cfb9790be69f6538a4.zip | |
Statistics Streaming.
27 files changed, 1177 insertions, 248 deletions
diff --git a/Software/DB/PPC/PPC Test/Tango.mdf b/Software/DB/PPC/PPC Test/Tango.mdf Binary files differindex 8a8095bff..0aa004fe2 100644 --- a/Software/DB/PPC/PPC Test/Tango.mdf +++ b/Software/DB/PPC/PPC Test/Tango.mdf diff --git a/Software/DB/PPC/PPC Test/Tango_log.ldf b/Software/DB/PPC/PPC Test/Tango_log.ldf Binary files differindex 6773037df..491f5a92a 100644 --- a/Software/DB/PPC/PPC Test/Tango_log.ldf +++ b/Software/DB/PPC/PPC Test/Tango_log.ldf diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf Binary files differindex 56e18bd39..548d794d8 100644 --- a/Software/DB/PPC/Tango.mdf +++ b/Software/DB/PPC/Tango.mdf diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf Binary files differindex ad978b9a7..5d1aa48e8 100644 --- a/Software/DB/PPC/Tango_log.ldf +++ b/Software/DB/PPC/Tango_log.ldf diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Insights/Tango.FSE.Insights_znyi0sci_wpftmp.csproj b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Insights/Tango.FSE.Insights_znyi0sci_wpftmp.csproj new file mode 100644 index 000000000..d09860120 --- /dev/null +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Insights/Tango.FSE.Insights_znyi0sci_wpftmp.csproj @@ -0,0 +1,392 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="..\..\..\packages\Microsoft.ML.Mkl.Redist.1.5.1\build\netstandard2.0\Microsoft.ML.Mkl.Redist.props" Condition="Exists('..\..\..\packages\Microsoft.ML.Mkl.Redist.1.5.1\build\netstandard2.0\Microsoft.ML.Mkl.Redist.props')" /> + <Import Project="..\..\..\packages\Microsoft.ML.1.5.1\build\netstandard2.0\Microsoft.ML.props" Condition="Exists('..\..\..\packages\Microsoft.ML.1.5.1\build\netstandard2.0\Microsoft.ML.props')" /> + <Import Project="..\..\..\packages\Microsoft.ML.CpuMath.1.5.1\build\netstandard2.0\Microsoft.ML.CpuMath.props" Condition="Exists('..\..\..\packages\Microsoft.ML.CpuMath.1.5.1\build\netstandard2.0\Microsoft.ML.CpuMath.props')" /> + <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>{AC5B4BE7-D607-4A38-98F8-B87ACA468313}</ProjectGuid> + <OutputType>library</OutputType> + <RootNamespace>Tango.FSE.Insights</RootNamespace> + <AssemblyName>Tango.FSE.Insights</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + <Deterministic>true</Deterministic> + <NuGetPackageImportStamp> + </NuGetPackageImportStamp> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\..\..\Build\FSE\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\FSE\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'TS|AnyCPU'"> + <OutputPath>..\..\..\Build\Twine Studio\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'TS_Debug|AnyCPU'"> + <OutputPath>..\..\..\Build\Twine Studio\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <Optimize>false</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + <Compile Include="Config\AnnotationsConfiguration.cs" /> + <Compile Include="Contracts\IInsightsView.cs" /> + <Compile Include="Converters\EventTypeInAnnotationsConfigurationConverter.cs" /> + <Compile Include="Dialogs\AnomaliesDialogView.xaml.cs"> + <DependentUpon>AnomaliesDialogView.xaml</DependentUpon> + </Compile> + <Compile Include="Dialogs\AnomaliesDialogViewVM.cs" /> + <Compile Include="Dialogs\ExportToCsvDialogView.xaml.cs"> + <DependentUpon>ExportToCsvDialogView.xaml</DependentUpon> + </Compile> + <Compile Include="Dialogs\ExportToCsvDialogViewVM.cs" /> + <Compile Include="InsightsSettings.cs" /> + <Compile Include="ML\AnomaliesDetectionProgress.cs" /> + <Compile Include="ML\AnomaliesDetector.cs" /> + <Compile Include="ML\AnomalyType.cs" /> + <Compile Include="ML\DetectedAnnomaly.cs" /> + <Compile Include="ML\MonitorSeriesPrediction.cs" /> + <Compile Include="ML\MonitorValue.cs" /> + <Compile Include="Navigation\PeekLogsNavigationObject.cs" /> + <Compile Include="SciChart\InsightsChart.cs" /> + <Compile Include="SciChart\InsightsRubberBandXYZoomModifier.cs" /> + <Compile Include="SciChart\InsightsZoomPanModifier.cs" /> + <Compile Include="ViewModelLocator.cs" /> + <Compile Include="InsightsModule.cs" /> + <Compile Include="ViewModels\InsightsViewVM.cs" /> + <Compile Include="ViewModels\MainViewVM.cs" /> + <Compile Include="Views\InsightsView.xaml.cs"> + <DependentUpon>InsightsView.xaml</DependentUpon> + </Compile> + <Compile Include="Views\MainView.xaml.cs"> + <DependentUpon>MainView.xaml</DependentUpon> + </Compile> + </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="..\..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj"> + <Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project> + <Name>Tango.AutoComplete</Name> + </ProjectReference> + <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.Insights\Tango.Insights.csproj"> + <Project>{4a55c185-3f8d-41b0-8815-c15f6213a14a}</Project> + <Name>Tango.Insights</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.PMR\Tango.PMR.csproj"> + <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project> + <Name>Tango.PMR</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.Transport\Tango.Transport.csproj"> + <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project> + <Name>Tango.Transport</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.FSE.BL\Tango.FSE.BL.csproj"> + <Project>{834c81c3-09b5-45d7-be12-e7d1e6655a7c}</Project> + <Name>Tango.FSE.BL</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.FSE.Common\Tango.FSE.Common.csproj"> + <Project>{bc37cccb-7392-4f78-8d1c-e9629e6e046e}</Project> + <Name>Tango.FSE.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> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <ItemGroup> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <Import Project="..\..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets" Condition="Exists('..\..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" /> + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> + <PropertyGroup> + <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> + </PropertyGroup> + <Error Condition="!Exists('..\..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets'))" /> + <Error Condition="!Exists('..\..\..\packages\Microsoft.ML.CpuMath.1.5.1\build\netstandard2.0\Microsoft.ML.CpuMath.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.ML.CpuMath.1.5.1\build\netstandard2.0\Microsoft.ML.CpuMath.props'))" /> + <Error Condition="!Exists('..\..\..\packages\Microsoft.ML.1.5.1\build\netstandard2.0\Microsoft.ML.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.ML.1.5.1\build\netstandard2.0\Microsoft.ML.props'))" /> + <Error Condition="!Exists('..\..\..\packages\Microsoft.ML.1.5.1\build\netstandard2.0\Microsoft.ML.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.ML.1.5.1\build\netstandard2.0\Microsoft.ML.targets'))" /> + <Error Condition="!Exists('..\..\..\packages\Microsoft.ML.Mkl.Redist.1.5.1\build\netstandard2.0\Microsoft.ML.Mkl.Redist.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.ML.Mkl.Redist.1.5.1\build\netstandard2.0\Microsoft.ML.Mkl.Redist.props'))" /> + </Target> + <Import Project="..\..\..\packages\Microsoft.ML.1.5.1\build\netstandard2.0\Microsoft.ML.targets" Condition="Exists('..\..\..\packages\Microsoft.ML.1.5.1\build\netstandard2.0\Microsoft.ML.targets')" /> + <ItemGroup> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll" /> + <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\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\MahApps.Metro.1.6.5\lib\net46\MahApps.Metro.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\MaterialDesignColors.1.2.2\lib\net45\MaterialDesignColors.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\MaterialDesignThemes.3.0.1\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:\DATA\Development\Tango\Software\Visual_Studio\packages\Microsoft.ML.1.5.1\lib\netstandard2.0\Microsoft.ML.Core.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\Microsoft.ML.CpuMath.1.5.1\lib\netstandard2.0\Microsoft.ML.CpuMath.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\Microsoft.ML.1.5.1\lib\netstandard2.0\Microsoft.ML.Data.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\Microsoft.ML.DataView.1.5.1\lib\netstandard2.0\Microsoft.ML.DataView.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\Microsoft.ML.1.5.1\lib\netstandard2.0\Microsoft.ML.KMeansClustering.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\Microsoft.ML.1.5.1\lib\netstandard2.0\Microsoft.ML.PCA.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\Microsoft.ML.1.5.1\lib\netstandard2.0\Microsoft.ML.StandardTrainers.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\Microsoft.ML.TimeSeries.1.5.1\lib\netstandard2.0\Microsoft.ML.TimeSeries.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\Microsoft.ML.1.5.1\lib\netstandard2.0\Microsoft.ML.Transforms.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\Microsoft.Win32.Primitives.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\mscorlib.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\netfx.force.conflicts.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\netstandard.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.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:\DATA\Development\Tango\Software\Visual_Studio\Referenced Assemblies\SciChart\SciChart.Charting.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Referenced Assemblies\SciChart\SciChart.Charting.DrawingTools.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Referenced Assemblies\SciChart\SciChart.Charting3D.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Referenced Assemblies\SciChart\SciChart.Core.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Referenced Assemblies\SciChart\SciChart.Data.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Referenced Assemblies\SciChart\SciChart.Drawing.DirectX.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Referenced Assemblies\SciChart\SciChart.Drawing.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.AppContext.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\System.CodeDom.4.7.0\lib\net461\System.CodeDom.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Collections.Concurrent.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Collections.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\System.Collections.Immutable.1.7.1\lib\net461\System.Collections.Immutable.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Collections.NonGeneric.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Collections.Specialized.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)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.ComponentModel.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.ComponentModel.EventBasedAsync.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.ComponentModel.Primitives.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.ComponentModel.TypeConverter.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Console.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Core.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Data.Common.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)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Diagnostics.Contracts.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Diagnostics.Debug.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Diagnostics.FileVersionInfo.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Diagnostics.Process.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Diagnostics.StackTrace.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Diagnostics.TextWriterTraceListener.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Diagnostics.Tools.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Diagnostics.TraceSource.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Diagnostics.Tracing.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Drawing.Primitives.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Dynamic.Runtime.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Globalization.Calendars.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Globalization.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Globalization.Extensions.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.IO.Compression.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.IO.Compression.ZipFile.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.IO.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.IO.FileSystem.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.IO.FileSystem.DriveInfo.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.IO.FileSystem.Primitives.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.IO.FileSystem.Watcher.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.IO.IsolatedStorage.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.IO.MemoryMappedFiles.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.IO.Pipes.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.IO.UnmanagedMemoryStream.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Linq.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Linq.Expressions.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Linq.Parallel.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Linq.Queryable.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Net.Http.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Net.NameResolution.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Net.NetworkInformation.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Net.Ping.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Net.Primitives.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Net.Requests.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Net.Security.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Net.Sockets.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Net.WebHeaderCollection.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Net.WebSockets.Client.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Net.WebSockets.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Numerics.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.ObjectModel.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Reflection.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Reflection.Extensions.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Reflection.Primitives.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Resources.Reader.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Resources.ResourceManager.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Resources.Writer.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.CompilerServices.VisualC.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.Extensions.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.Handles.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.InteropServices.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.InteropServices.RuntimeInformation.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.Numerics.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.Serialization.Formatters.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.Serialization.Json.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.Serialization.Primitives.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.Serialization.Xml.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Security.Claims.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Security.Cryptography.Algorithms.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Security.Cryptography.Csp.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Security.Cryptography.Encoding.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Security.Cryptography.Primitives.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Security.Cryptography.X509Certificates.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Security.Principal.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Security.SecureString.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Text.Encoding.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Text.Encoding.Extensions.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Text.RegularExpressions.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\System.Threading.Channels.4.7.1\lib\net461\System.Threading.Channels.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Threading.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Threading.Overlapped.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Threading.Tasks.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Threading.Tasks.Parallel.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Threading.Thread.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Threading.ThreadPool.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Threading.Timer.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.ValueTuple.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\packages\ControlzEx.3.0.2.4\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:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Xml.ReaderWriter.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Xml.XDocument.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Xml.XmlDocument.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Xml.XmlSerializer.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Xml.XPath.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Xml.XPath.XDocument.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\SideChains\Tango.AutoComplete\bin\Debug\Tango.AutoComplete.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\FSE\Debug\Tango.FSE.BL.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Build\FSE\Debug\Tango.FSE.Common.dll" /> + <ReferencePath Include="C:\DATA\Development\Tango\Software\Visual_Studio\Tango.Insights\bin\Debug\Tango.Insights.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\Core\Debug\Tango.PMR.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:\DATA\Development\Tango\Software\Visual_Studio\Build\Core\Debug\Tango.Transport.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\WindowsBase.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ComponentModel.Annotations.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Reflection.Emit.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Reflection.Emit.ILGeneration.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Reflection.Emit.Lightweight.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.InteropServices.WindowsRuntime.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ServiceModel.Duplex.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ServiceModel.Http.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ServiceModel.NetTcp.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ServiceModel.Primitives.dll" /> + <ReferencePath Include="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ServiceModel.Security.dll" /> + </ItemGroup> + <ItemGroup> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\FSE\Modules\Tango.FSE.Insights\obj\Debug\App.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\FSE\Modules\Tango.FSE.Insights\obj\Debug\Dialogs\AnomaliesDialogView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\FSE\Modules\Tango.FSE.Insights\obj\Debug\Dialogs\ExportToCsvDialogView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\FSE\Modules\Tango.FSE.Insights\obj\Debug\Views\InsightsView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\FSE\Modules\Tango.FSE.Insights\obj\Debug\Views\MainView.g.cs" /> + <Compile Include="C:\DATA\Development\Tango\Software\Visual_Studio\FSE\Modules\Tango.FSE.Insights\obj\Debug\GeneratedInternalTypeHelper.g.cs" /> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Dialogs/JobRunStreamingView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Dialogs/JobRunStreamingView.xaml new file mode 100644 index 000000000..901dbd2ec --- /dev/null +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Dialogs/JobRunStreamingView.xaml @@ -0,0 +1,53 @@ +<UserControl x:Class="Tango.FSE.Statistics.Dialogs.JobRunStreamingView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common" + xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:local="clr-namespace:Tango.FSE.Statistics.Dialogs" + mc:Ignorable="d" + Width="600" Height="300" d:DataContext="{d:DesignInstance Type=local:JobRunStreamingViewVM, IsDesignTimeCreatable=False}" Background="{StaticResource FSE_PrimaryBackgroundLightBrush}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}"> + <Grid> + <DockPanel Margin="10"> + <StackPanel DockPanel.Dock="Top" Orientation="Horizontal"> + <material:PackIcon Kind="Update" Width="42" Height="42" VerticalAlignment="Center" RenderOptions.BitmapScalingMode="Fant" /> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="{StaticResource FSE_LargeFontSize}"> + Job Runs Streaming + </TextBlock> + </StackPanel> + <Grid Margin="0 30 0 0"> + <StackPanel Margin="20 0 0 0"> + <StackPanel> + <CheckBox x:Name="chkEnable" IsChecked="{Binding Config.Enable}">Enable Streaming</CheckBox> + <DockPanel Margin="18 2 0 0" TextElement.Foreground="{StaticResource FSE_GrayBrush}"> + <material:PackIcon Kind="InfoOutline" Width="18" Height="18" /> + <TextBlock Margin="2 0 0 0" FontSize="{StaticResource FSE_SmallerFontSize}"> + Automatically updates when the remote machine completes a job. + </TextBlock> + </DockPanel> + </StackPanel> + + <StackPanel Margin="0 20 0 0" IsEnabled="{Binding ElementName=chkEnable,Path=IsChecked,Mode=OneWay}"> + <CheckBox IsChecked="{Binding Config.EnableCsvReports}">Enable CSV Report Streaming</CheckBox> + <DockPanel Margin="18 2 0 0" TextElement.Foreground="{StaticResource FSE_GrayBrush}"> + <material:PackIcon Kind="InfoOutline" Width="18" Height="18" /> + <TextBlock Margin="2 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_SmallerFontSize}"> + Automatically create a new csv report file when a new job run is received. + </TextBlock> + </DockPanel> + <StackPanel Margin="20 10 20 0"> + <TextBlock FontSize="{StaticResource FSE_SmallFontSize}">Reports Output Folder</TextBlock> + <DockPanel> + <Button ToolTip="Select Folder" DockPanel.Dock="Right" Margin="10 0 0 0" Style="{StaticResource FSE_FlatButton_OpacityHover}" Padding="0" Command="{Binding BrowseCsvReportsFolderCommand}"> + <material:PackIcon Kind="FolderOpenOutline" Width="20" Height="20" /> + </Button> + <TextBox Style="{StaticResource FSE_Rounded_Corners_TextBox}" FontSize="{StaticResource FSE_SmallFontSize}" Text="{Binding Config.CsvReportsFolder}" IsReadOnly="True"></TextBox> + </DockPanel> + </StackPanel> + </StackPanel> + </StackPanel> + </Grid> + </DockPanel> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Dialogs/JobRunStreamingView.xaml.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Dialogs/JobRunStreamingView.xaml.cs new file mode 100644 index 000000000..97e2dfa87 --- /dev/null +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Dialogs/JobRunStreamingView.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.FSE.Statistics.Dialogs +{ + /// <summary> + /// Interaction logic for JobRunStreamingView.xaml + /// </summary> + public partial class JobRunStreamingView : UserControl + { + public JobRunStreamingView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Dialogs/JobRunStreamingViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Dialogs/JobRunStreamingViewVM.cs new file mode 100644 index 000000000..1b1aea2e2 --- /dev/null +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Dialogs/JobRunStreamingViewVM.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.Commands; +using Tango.Core.DI; +using Tango.FSE.Common; +using Tango.FSE.Common.Notifications; +using Tango.FSE.Common.Storage; +using Tango.FSE.Statistics.Models; +using Tango.Settings; +using static Tango.FSE.Common.FSESettings; + +namespace Tango.FSE.Statistics.Dialogs +{ + public class JobRunStreamingViewVM : FSEDialogViewVM + { + public StatisticsStreamingConfiguration Config { get; set; } + + public RelayCommand BrowseCsvReportsFolderCommand { get; set; } + + [TangoInject] + private IStorageProvider StorageProvider { get; set; } + + [TangoInject] + private INotificationProvider NotificationProvider { get; set; } + + public JobRunStreamingViewVM() + { + CanCancel = false; + OKText = "CLOSE"; + + TangoIOC.Default.Inject(this); + + Config = SettingsManager.Default.GetOrCreate<FSESettings>().StatisticsStreamingConfig; + BrowseCsvReportsFolderCommand = new RelayCommand(BrowseCsvReportsFolder); + } + + protected override void Accept() + { + if (Config.EnableCsvReports && (!Config.CsvReportsFolder.IsNotNullOrEmpty() || !Directory.Exists(Config.CsvReportsFolder))) + { + NotificationProvider.ShowError("Please specify a valid reports folder path."); + return; + } + + base.Accept(); + } + + private async void BrowseCsvReportsFolder() + { + var result = await StorageProvider.SelectFolder("Select CSV Reports Folder", Config.CsvReportsFolder); + if (result) + { + Config.CsvReportsFolder = result.SelectedItem; + RaisePropertyChanged(nameof(Config)); + } + } + } +} diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Tango.FSE.Statistics.csproj b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Tango.FSE.Statistics.csproj index 6e9f14e1a..6f04a71ab 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Tango.FSE.Statistics.csproj +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Tango.FSE.Statistics.csproj @@ -91,6 +91,10 @@ <DependentUpon>JobRunExtendedInfoView.xaml</DependentUpon> </Compile> <Compile Include="Dialogs\JobRunExtendedInfoViewVM.cs" /> + <Compile Include="Dialogs\JobRunStreamingView.xaml.cs"> + <DependentUpon>JobRunStreamingView.xaml</DependentUpon> + </Compile> + <Compile Include="Dialogs\JobRunStreamingViewVM.cs" /> <Compile Include="Models\CsvModel.cs" /> <Compile Include="Models\JobTicketCsvModel.cs" /> <Compile Include="Models\LiquidQuantityModel.cs" /> @@ -191,6 +195,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Dialogs\JobRunStreamingView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Themes\Generic.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs index c6dfa8c11..de104ba59 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs @@ -13,6 +13,7 @@ using Tango.BL; using Tango.BL.DTO; using Tango.BL.Entities; using Tango.BL.Enumerations; +using Tango.Core; using Tango.Core.Commands; using Tango.Core.ExtensionMethods; using Tango.CSV; @@ -31,6 +32,12 @@ namespace Tango.FSE.Statistics.ViewModels { public class MainViewVM : FSEViewModel { + private const int NULL_JOB_INDEX = -1000; + private int _currentJobIndex; + private StatisticsModel _model; + + #region Properties + private DateTime _startSelectedDate; public DateTime StartSelectedDate { @@ -120,8 +127,8 @@ namespace Tango.FSE.Statistics.ViewModels set { _isFiltersAvailable = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } } - private List<StopModel> _stops; - public List<StopModel> Stops + private SynchronizedObservableCollection<StopModel> _stops; + public SynchronizedObservableCollection<StopModel> Stops { get { return _stops; } set { _stops = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(IsResultsAvailable)); InvalidateRelayCommands(); } @@ -141,10 +148,6 @@ namespace Tango.FSE.Statistics.ViewModels set { _jobNameExact = value; RaisePropertyChangedAuto(); } } - public RelayCommand GetStatisticsCommand { get; set; } - - public AutoCompleteSource<String> JobsAutoCompleteProvider { get; set; } - private StatsModel _stats; public StatsModel Stats { @@ -154,9 +157,15 @@ namespace Tango.FSE.Statistics.ViewModels public bool IsResultsAvailable { - get { return Stops != null && Stops.Count > 0 && Stops[0].JobIndex != -1000; } + get { return Stops != null && Stops.Count > 0 && Stops[0].JobIndex != NULL_JOB_INDEX; } } + #endregion + + #region Commands + + public RelayCommand GetStatisticsCommand { get; set; } + public RelayCommand<StopModel> ShowFailedMessageCommand { get; set; } public RelayCommand<StopModel> ShowExtendedInfoCommand { get; set; } @@ -165,10 +174,24 @@ namespace Tango.FSE.Statistics.ViewModels public RelayCommand ExportToCsvCommand { get; set; } + public RelayCommand OpenStreamingSettingsCommand { get; set; } + + #endregion + + #region Suggestions Providers + + public AutoCompleteSource<String> JobsAutoCompleteProvider { get; set; } + + #endregion + + #region Constructors + public MainViewVM() { IsSettingsBarOpened = true; + _model = new StatisticsModel(); + JobRunSelectedStatuses = new SelectedObjectCollection<JobRunStatus>(new ObservableCollection<JobRunStatus>() { JobRunStatus.Aborted, @@ -194,7 +217,7 @@ namespace Tango.FSE.Statistics.ViewModels GetStatisticsCommand = new RelayCommand(GetStatistics, () => IsFiltersAvailable); //Just for showing the columns :/ - Stops = new List<StopModel>() { new StopModel() { JobRun = new JobRunDTO(), Job = new PresentationJob(), JobIndex = -1000 } }; + Stops = new List<StopModel>() { new StopModel() { JobRun = new JobRunDTO(), Job = new PresentationJob(), JobIndex = NULL_JOB_INDEX } }.ToSynchronizedObservableCollection(); var view = new ListCollectionView(Stops); view.GroupDescriptions.Add(new PropertyGroupDescription("JobIndex")); view.GroupDescriptions.Add(new PropertyGroupDescription("SegmentIndex")); @@ -206,13 +229,12 @@ namespace Tango.FSE.Statistics.ViewModels ShowExtendedInfoCommand = new RelayCommand<StopModel>(ShowJobRunExtendedInfo); CopyCommand = new RelayCommand<StopModel>(CopyStopToClipboard); ExportToCsvCommand = new RelayCommand(ExportToCSV, () => IsResultsAvailable); + OpenStreamingSettingsCommand = new RelayCommand(OpenStreamingSettings); } - private List<String> AutoCompleteJobs(string key) - { - key = key ?? String.Empty; - return FiltersData.Jobs.Where(x => x != null).Where(x => x.ToLower().Contains(key.ToLower())).ToList(); - } + #endregion + + #region Override Methods public override void OnApplicationStarted() { @@ -237,8 +259,14 @@ namespace Tango.FSE.Statistics.ViewModels MachineProvider.MachineConnected += MachineProvider_MachineConnected; MachineProvider.MachineDisconnected += MachineProvider_MachineDisconnected; + + StatisticsProvider.JobRunReceived += StatisticsProvider_JobRunReceived; } + #endregion + + #region Machine Connection / Disconnection + private void MachineProvider_MachineDisconnected(object sender, Common.Connection.MachineDisconnectedEventArgs e) { @@ -252,6 +280,10 @@ namespace Tango.FSE.Statistics.ViewModels } } + #endregion + + #region Statistics Methods + private async Task LoadFiltersData() { try @@ -269,7 +301,6 @@ namespace Tango.FSE.Statistics.ViewModels private async void GetStatistics() { - StatisticsModel model = null; try { using (var task = NotificationProvider.PushTaskItem("Getting statistics from the remote machine...", false)) @@ -287,147 +318,171 @@ namespace Tango.FSE.Statistics.ViewModels filters.MaxLength = (int)LengthUpperValue; filters.RmlGuids = SelectedThreads.SynchedSource.Select(x => x.Guid).ToList(); - model = await StatisticsProvider.GetStatistics(filters); + _model = await StatisticsProvider.GetStatistics(filters); List<StopModel> stops = new List<StopModel>(); - int jobIndex = 0; + _currentJobIndex = 0; - foreach (var job in model.StatisticsResult.JobRuns.OrderByDescending(x => x.JobRun.StartDate)) + foreach (var job in _model.StatisticsResult.JobRuns.OrderByDescending(x => x.JobRun.StartDate)) { - var rmlName = FiltersData.Rmls.FirstOrDefault(x => x.Guid == job.JobRun.RmlGuid)?.Name; + stops.AddRange(CreateJobRunStops(job)); + } - jobIndex++; + Stops = stops.ToSynchronizedObservableCollection(); - foreach (var jobSegment in job.Job.Segments) - { - foreach (var jobStop in jobSegment.Stops) - { - StopModel stop = new StopModel(); - stop.Index = jobSegment.Stops.IndexOf(jobStop) + 1; - stop.JobIndex = jobIndex; - stop.SegmentIndex = job.Job.Segments.IndexOf(jobSegment) + 1; - stop.ThreadName = rmlName; - stop.IsAdvancedMode = !BuildProvider.IsTwineStudio && CurrentUser.HasRole(Roles.FSEAdvancedTechnician); + var view = new ListCollectionView(Stops); + view.GroupDescriptions.Add(new PropertyGroupDescription("JobIndex")); + view.GroupDescriptions.Add(new PropertyGroupDescription("SegmentIndex")); - stop.ColorSpace = jobStop.ColorSpace; + StopsView = view; - stop.L = jobStop.L; - stop.A = jobStop.A; - stop.B = jobStop.B; + UpdateSummaries(); - stop.Red = jobStop.Red; - stop.Green = jobStop.Green; - stop.Blue = jobStop.Blue; + if (Stops.Count > 0) + { + await Task.Delay(1000); - stop.Cyan = jobStop.Cyan; - stop.Magenta = jobStop.Magenta; - stop.Yellow = jobStop.Yellow; - stop.Black = jobStop.Black; + IsSettingsBarOpened = false; - stop.Catalog = jobStop.Catalog; - stop.CatalogItem = jobStop.CatalogItem; + await Task.Delay(1000); + } + } + } + catch (Exception ex) + { + NotificationProvider.PushErrorReportingSnackbar(ex, "Statistics Module Error", "Error statistics from the remote machine."); + } + } - stop.StartMeters = jobStop.StartMeters; + private List<StopModel> CreateJobRunStops(JobRunComposition job) + { + List<StopModel> stops = new List<StopModel>(); - stop.Job = job.Job; - stop.JobRun = job.JobRun; - stop.Segment = jobSegment; + var rmlName = FiltersData.Rmls.FirstOrDefault(x => x.Guid == job.JobRun.RmlGuid)?.Name; - stop.LiquidVolumes = jobStop.LiquidVolumes; - stop.BestMatchR = jobStop.BestMatchR; - stop.BestMatchG = jobStop.BestMatchG; - stop.BestMatchB = jobStop.BestMatchB; + _currentJobIndex++; - stop.ShowFailedMessageCommand = ShowFailedMessageCommand; - stop.ShowExtendedInfoCommand = ShowExtendedInfoCommand; - stop.CopyCommand = CopyCommand; + foreach (var jobSegment in job.Job.Segments) + { + foreach (var jobStop in jobSegment.Stops) + { + StopModel stop = new StopModel(); + stop.Index = jobSegment.Stops.IndexOf(jobStop) + 1; + stop.JobIndex = _currentJobIndex; + stop.SegmentIndex = job.Job.Segments.IndexOf(jobSegment) + 1; + stop.ThreadName = rmlName; + stop.IsAdvancedMode = !BuildProvider.IsTwineStudio && CurrentUser.HasRole(Roles.FSEAdvancedTechnician); - stops.Add(stop); - } - } - } + stop.ColorSpace = jobStop.ColorSpace; - Stops = stops; + stop.L = jobStop.L; + stop.A = jobStop.A; + stop.B = jobStop.B; - var view = new ListCollectionView(Stops); - view.GroupDescriptions.Add(new PropertyGroupDescription("JobIndex")); - view.GroupDescriptions.Add(new PropertyGroupDescription("SegmentIndex")); + stop.Red = jobStop.Red; + stop.Green = jobStop.Green; + stop.Blue = jobStop.Blue; - StopsView = view; + stop.Cyan = jobStop.Cyan; + stop.Magenta = jobStop.Magenta; + stop.Yellow = jobStop.Yellow; + stop.Black = jobStop.Black; - var stats = new StatsModel(); + stop.Catalog = jobStop.Catalog; + stop.CatalogItem = jobStop.CatalogItem; - try - { - stats.TotalRuns = model.StatisticsResult.JobRuns.Count; - stats.CompletedRuns = model.StatisticsResult.JobRuns.Count(x => x.JobRun.Status == (int)JobRunStatus.Completed); - stats.FailedRuns = model.StatisticsResult.JobRuns.Count(x => x.JobRun.Status == (int)JobRunStatus.Failed); - stats.AbortedRuns = model.StatisticsResult.JobRuns.Count(x => x.JobRun.Status == (int)JobRunStatus.Aborted); - stats.TotalDyeingLength = (int)model.StatisticsResult.JobRuns.Where(x => x.JobRun.EndPosition > 0).Select(x => x.JobRun.EndPosition).Sum(); - stats.AverageDyeingLength = (int)model.StatisticsResult.JobRuns.Where(x => x.JobRun.EndPosition > 0).Select(x => x.JobRun.EndPosition).Average(); + stop.StartMeters = jobStop.StartMeters; - var timeRuns = model.StatisticsResult.JobRuns.Where(z => z.JobRun.EndPosition > 0 && z.JobRun.EndDate != null && z.JobRun.ActualStartDate != null).ToList(); + stop.Job = job.Job; + stop.JobRun = job.JobRun; + stop.Segment = jobSegment; - stats.TotalDyeingTime = TimeSpan.FromHours(timeRuns.Sum(x => (x.JobRun.EndDate - x.JobRun.ActualStartDate.Value).TotalHours)); - stats.AverageDyeingTime = TimeSpan.FromHours(timeRuns.Average(x => (x.JobRun.EndDate - x.JobRun.ActualStartDate.Value).TotalHours)); + stop.LiquidVolumes = jobStop.LiquidVolumes; + stop.BestMatchR = jobStop.BestMatchR; + stop.BestMatchG = jobStop.BestMatchG; + stop.BestMatchB = jobStop.BestMatchB; - List<LiquidQuantityModel> liquidQuantities = new List<LiquidQuantityModel>(); + stop.ShowFailedMessageCommand = ShowFailedMessageCommand; + stop.ShowExtendedInfoCommand = ShowExtendedInfoCommand; + stop.CopyCommand = CopyCommand; - Dictionary<LiquidTypes, double> quantities = new Dictionary<LiquidTypes, double>(); - quantities.Add(LiquidTypes.Cyan, 0); - quantities.Add(LiquidTypes.Magenta, 0); - quantities.Add(LiquidTypes.Yellow, 0); - quantities.Add(LiquidTypes.Black, 0); - quantities.Add(LiquidTypes.LightCyan, 0); - quantities.Add(LiquidTypes.LightMagenta, 0); - quantities.Add(LiquidTypes.LightYellow, 0); - quantities.Add(LiquidTypes.TransparentInk, 0); - quantities.Add(LiquidTypes.Lubricant, 0); + stops.Add(stop); + } + } - foreach (var stop in stops) - { - quantities[LiquidTypes.Cyan] += stop.JobRun.CyanQuantity; - quantities[LiquidTypes.Magenta] += stop.JobRun.MagentaQuantity; - quantities[LiquidTypes.Yellow] += stop.JobRun.YellowQuantity; - quantities[LiquidTypes.Black] += stop.JobRun.BlackQuantity; - quantities[LiquidTypes.LightCyan] += stop.JobRun.LightCyanQuantity; - quantities[LiquidTypes.LightMagenta] += stop.JobRun.LightMagentaQuantity; - quantities[LiquidTypes.LightYellow] += stop.JobRun.LightYellowQuantity; - quantities[LiquidTypes.TransparentInk] += stop.JobRun.TransparentQuantity; - quantities[LiquidTypes.Lubricant] += stop.JobRun.LubricantQuantity; - } + return stops; + } - foreach (var item in quantities) - { - liquidQuantities.Add(new LiquidQuantityModel() { LiquidType = item.Key, Quantity = item.Value }); - } + private void UpdateSummaries() + { + var stats = new StatsModel(); - stats.LiquidQuantities = liquidQuantities; - } - catch (Exception ex) - { - LogManager.Log(ex, "Error generating statistics summaries."); - } + try + { + stats.TotalRuns = _model.StatisticsResult.JobRuns.Count; + stats.CompletedRuns = _model.StatisticsResult.JobRuns.Count(x => x.JobRun.Status == (int)JobRunStatus.Completed); + stats.FailedRuns = _model.StatisticsResult.JobRuns.Count(x => x.JobRun.Status == (int)JobRunStatus.Failed); + stats.AbortedRuns = _model.StatisticsResult.JobRuns.Count(x => x.JobRun.Status == (int)JobRunStatus.Aborted); + stats.TotalDyeingLength = (int)_model.StatisticsResult.JobRuns.Where(x => x.JobRun.EndPosition > 0).Select(x => x.JobRun.EndPosition).Sum(); + stats.AverageDyeingLength = (int)_model.StatisticsResult.JobRuns.Where(x => x.JobRun.EndPosition > 0).Select(x => x.JobRun.EndPosition).Average(); - Stats = stats; + var timeRuns = _model.StatisticsResult.JobRuns.Where(z => z.JobRun.EndPosition > 0 && z.JobRun.EndDate != null && z.JobRun.ActualStartDate != null).ToList(); - if (Stops.Count > 0) - { - await Task.Delay(1000); + stats.TotalDyeingTime = TimeSpan.FromHours(timeRuns.Sum(x => (x.JobRun.EndDate - x.JobRun.ActualStartDate.Value).TotalHours)); + stats.AverageDyeingTime = TimeSpan.FromHours(timeRuns.Average(x => (x.JobRun.EndDate - x.JobRun.ActualStartDate.Value).TotalHours)); - IsSettingsBarOpened = false; + List<LiquidQuantityModel> liquidQuantities = new List<LiquidQuantityModel>(); - await Task.Delay(1000); - } + Dictionary<LiquidTypes, double> quantities = new Dictionary<LiquidTypes, double>(); + quantities.Add(LiquidTypes.Cyan, 0); + quantities.Add(LiquidTypes.Magenta, 0); + quantities.Add(LiquidTypes.Yellow, 0); + quantities.Add(LiquidTypes.Black, 0); + quantities.Add(LiquidTypes.LightCyan, 0); + quantities.Add(LiquidTypes.LightMagenta, 0); + quantities.Add(LiquidTypes.LightYellow, 0); + quantities.Add(LiquidTypes.TransparentInk, 0); + quantities.Add(LiquidTypes.Lubricant, 0); + + foreach (var stop in Stops) + { + quantities[LiquidTypes.Cyan] += stop.JobRun.CyanQuantity; + quantities[LiquidTypes.Magenta] += stop.JobRun.MagentaQuantity; + quantities[LiquidTypes.Yellow] += stop.JobRun.YellowQuantity; + quantities[LiquidTypes.Black] += stop.JobRun.BlackQuantity; + quantities[LiquidTypes.LightCyan] += stop.JobRun.LightCyanQuantity; + quantities[LiquidTypes.LightMagenta] += stop.JobRun.LightMagentaQuantity; + quantities[LiquidTypes.LightYellow] += stop.JobRun.LightYellowQuantity; + quantities[LiquidTypes.TransparentInk] += stop.JobRun.TransparentQuantity; + quantities[LiquidTypes.Lubricant] += stop.JobRun.LubricantQuantity; } + + foreach (var item in quantities) + { + liquidQuantities.Add(new LiquidQuantityModel() { LiquidType = item.Key, Quantity = item.Value }); + } + + stats.LiquidQuantities = liquidQuantities; } catch (Exception ex) { - NotificationProvider.PushErrorReportingSnackbar(ex, "Statistics Module Error", "Error statistics from the remote machine."); + LogManager.Log(ex, "Error generating statistics summaries."); } + + Stats = stats; + } + + private List<String> AutoCompleteJobs(string key) + { + key = key ?? String.Empty; + return FiltersData.Jobs.Where(x => x != null).Where(x => x.ToLower().Contains(key.ToLower())).ToList(); } + #endregion + + #region Stop Commands Handler + private async void ShowJobRunFailedMessage(StopModel stop) { await NotificationProvider.ShowError($"Job Failure Message:\n{stop.JobRun.FailedMessage}"); @@ -522,6 +577,10 @@ namespace Tango.FSE.Statistics.ViewModels Clipboard.SetText($"{stop.ColorSpace}\t{input}\t{stop.CyanOutput}\t{stop.MagentaOutput}\t{stop.YellowOutput}\t{stop.BlackOutput}\t{stop.LightCyanOutput}\t{stop.LightMagentaOutput}\t{stop.LightYellowOutput}\t{stop.TransparentInkOutput}", TextDataFormat.Text); } + #endregion + + #region CSV Export + private async void ExportToCSV() { var result = await StorageProvider.SaveFile("Export To CSV File", "CSV Files|*.csv", $"{MachineProvider.Machine.SerialNumber}_JobRuns_{DateTime.Now.ToFileName()}.csv", ".csv"); @@ -533,9 +592,27 @@ namespace Tango.FSE.Statistics.ViewModels try { - CsvFile<CsvModel> csvFile = new CsvFile<CsvModel>(new CsvDestination(result.SelectedItem), new CsvDefinition() + ExportToCSV(Stops.ToList(), result.SelectedItem); + + NotificationProvider.PushSnackbarItem(MessageType.Success, "Statistics File Export", true, "Export completed successfully.\nTap to open the file.", null, null, async () => { - Columns = new List<String>() + await StorageProvider.ShowInExplorer(result.SelectedItem); + }); + } + catch (Exception ex) + { + LogManager.Log(ex, "Error exporting csv file."); + await NotificationProvider.ShowError($"Error exporting the csv file.\n{ex.FlattenMessage()}"); + } + } + } + } + + private void ExportToCSV(List<StopModel> stops, String filePath) + { + CsvFile<CsvModel> csvFile = new CsvFile<CsvModel>(new CsvDestination(filePath), new CsvDefinition() + { + Columns = new List<String>() { "Job Index", "Job Name", @@ -572,77 +649,131 @@ namespace Tango.FSE.Statistics.ViewModels "Output Lubricant", "Failure Reason", }, - }); + }); - foreach (var stop in Stops.OrderBy(x => x.JobIndex).ToList()) - { - CsvModel model = new CsvModel(); - model.JobIndex = stop.JobIndex.ToString(); - model.JobName = stop.JobRun.JobName; - model.Thread = stop.ThreadName; - model.Length = ((int)stop.JobRun.JobLogicalLength).ToString(); - model.NumberOfUnits = stop.JobRun.NumberOfUnits.ToString(); - model.StartTime = stop.JobRun.StartDate.ToLocalTime().ToString(); - model.Duration = stop.Duration.ToStringUnlimitedHours(); - model.EndPosition = stop.JobRun.EndPosition.ToString(); - model.Status = ((JobRunStatus)stop.JobRun.Status).ToString(); - model.SegmentIndex = stop.SegmentIndex.ToString(); - model.Offset = stop.StartMeters.ToString(); - model.ColorSpace = stop.ColorSpace.ToString(); + foreach (var stop in stops.OrderBy(x => x.JobIndex).ToList()) + { + CsvModel model = new CsvModel(); + model.JobIndex = stop.JobIndex.ToString(); + model.JobName = stop.JobRun.JobName; + model.Thread = stop.ThreadName; + model.Length = ((int)stop.JobRun.JobLogicalLength).ToString(); + model.NumberOfUnits = stop.JobRun.NumberOfUnits.ToString(); + model.StartTime = stop.JobRun.StartDate.ToLocalTime().ToString(); + model.Duration = stop.Duration.ToStringUnlimitedHours(); + model.EndPosition = stop.JobRun.EndPosition.ToString(); + model.Status = ((JobRunStatus)stop.JobRun.Status).ToString(); + model.SegmentIndex = stop.SegmentIndex.ToString(); + model.Offset = stop.StartMeters.ToString(); + model.ColorSpace = stop.ColorSpace.ToString(); - switch (stop.ColorSpace) - { - case ColorSpaces.RGB: - model.InputRed = stop.Red.ToString(); - model.InputGreen = stop.Green.ToString(); - model.InputBlue = stop.Blue.ToString(); - break; - case ColorSpaces.LAB: - model.InputL = stop.L.ToString(); - model.InputA = stop.A.ToString(); - model.InputB = stop.B.ToString(); - break; - case ColorSpaces.Catalog: - model.InputCatalog = stop.Catalog; - model.InputCatalogItem = stop.CatalogItem; - break; - case ColorSpaces.Volume: - model.InputCyan = stop.Cyan.ToString(); - model.InputMagenta = stop.Magenta.ToString(); - model.InputYellow = stop.Yellow.ToString(); - model.InputBlack = stop.Black.ToString(); - break; - } + switch (stop.ColorSpace) + { + case ColorSpaces.RGB: + model.InputRed = stop.Red.ToString(); + model.InputGreen = stop.Green.ToString(); + model.InputBlue = stop.Blue.ToString(); + break; + case ColorSpaces.LAB: + model.InputL = stop.L.ToString(); + model.InputA = stop.A.ToString(); + model.InputB = stop.B.ToString(); + break; + case ColorSpaces.Catalog: + model.InputCatalog = stop.Catalog; + model.InputCatalogItem = stop.CatalogItem; + break; + case ColorSpaces.Volume: + model.InputCyan = stop.Cyan.ToString(); + model.InputMagenta = stop.Magenta.ToString(); + model.InputYellow = stop.Yellow.ToString(); + model.InputBlack = stop.Black.ToString(); + break; + } - model.OutputCyan = stop.CyanOutput.ToString(); - model.OutputMagenta = stop.MagentaOutput.ToString(); - model.OutputYellow = stop.YellowOutput.ToString(); - model.OutputBlack = stop.BlackOutput.ToString(); - model.OutputLightCyan = stop.LightCyanOutput.ToString(); - model.OutputLightMagenta = stop.LightMagentaOutput.ToString(); - model.OutputLightYellow = stop.LightYellowOutput.ToString(); - model.OutputTransparentInk = stop.TransparentInkOutput.ToString(); - model.OutputLubricant = stop.LubricantOutput.ToString(); - model.FailureReason = stop.JobRun.FailedMessage; + model.OutputCyan = stop.CyanOutput.ToString(); + model.OutputMagenta = stop.MagentaOutput.ToString(); + model.OutputYellow = stop.YellowOutput.ToString(); + model.OutputBlack = stop.BlackOutput.ToString(); + model.OutputLightCyan = stop.LightCyanOutput.ToString(); + model.OutputLightMagenta = stop.LightMagentaOutput.ToString(); + model.OutputLightYellow = stop.LightYellowOutput.ToString(); + model.OutputTransparentInk = stop.TransparentInkOutput.ToString(); + model.OutputLubricant = stop.LubricantOutput.ToString(); + model.FailureReason = stop.JobRun.FailedMessage; - csvFile.Append(model); - } + csvFile.Append(model); + } - csvFile.Dispose(); + csvFile.Dispose(); + } - NotificationProvider.PushSnackbarItem(MessageType.Success, "Statistics File Export", true, "Export completed successfully.\nTap to open the file.", null, null, async () => - { - await StorageProvider.ShowInExplorer(result.SelectedItem); - }); + #endregion + + #region Streaming + + private async void OpenStreamingSettings() + { + await NotificationProvider.ShowDialog<JobRunStreamingViewVM>(); + Settings.Save(); + } + + private void StatisticsProvider_JobRunReceived(object sender, JobRunReceivedEventArgs e) + { + var stops = CreateJobRunStops(e.JobRunComposition); + + stops.Reverse(); + + InvokeUI(() => + { + try + { + if (Stops.Count == 1 && Stops[0].JobIndex == NULL_JOB_INDEX) + { + Stops.Clear(); } - catch (Exception ex) + + foreach (var stop in stops) { - LogManager.Log(ex, "Error exporting csv file."); - await NotificationProvider.ShowError($"Error exporting the csv file.\n{ex.FlattenMessage()}"); + Stops.Insert(0, stop); + } + + _model.StatisticsResult.JobRuns.Add(e.JobRunComposition); + + UpdateSummaries(); + } + catch (Exception ex) + { + LogManager.Log(ex, "Statistics streaming error updating the job runs grid"); + } + + RaisePropertyChanged(nameof(IsResultsAvailable)); + InvalidateRelayCommands(); + }); + + if (Settings.StatisticsStreamingConfig.EnableCsvReports) + { + try + { + if (Directory.Exists(Settings.StatisticsStreamingConfig.CsvReportsFolder)) + { + stops.Reverse(); + String fileName = $"{MachineProvider.Machine.SerialNumber}_{stops[0].JobRun.JobName}_Run_{DateTime.Now.ToFileName()}.csv"; + ExportToCSV(stops, Path.Combine(Settings.StatisticsStreamingConfig.CsvReportsFolder, fileName)); + } + else + { + LogManager.Log($"Statistics streaming csv directory does not exist..", Logging.LogCategory.Error); } } + catch (Exception ex) + { + LogManager.Log(ex, "Statistics streaming error exporting the job run csv report."); + } } } + + #endregion } } diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml index 1fed1d040..29d12d773 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml @@ -267,6 +267,13 @@ </MenuItem.Icon> </MenuItem> </MenuItem> + <MenuItem Header="Tools"> + <MenuItem Header="Streaming" Command="{Binding OpenStreamingSettingsCommand}"> + <MenuItem.Icon> + <material:PackIcon Kind="Update" /> + </MenuItem.Icon> + </MenuItem> + </MenuItem> </Menu> <DockPanel> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/FSESettings.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/FSESettings.cs index cac1b675b..3c5b4c24a 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/FSESettings.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/FSESettings.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; +using Tango.Core; using Tango.FSE.BL.Connectivity; using Tango.FSE.Common.Diagnostics; using Tango.PMR.Integration; @@ -27,6 +28,20 @@ namespace Tango.FSE.Common public String Password { get; set; } } + public class StatisticsStreamingConfiguration : ExtendedObject + { + private bool _enable; + public bool Enable + { + get { return _enable; } + set { _enable = value; if (!value) EnableCsvReports = false; RaisePropertyChanged(nameof(EnableCsvReports)); } + } + + public bool EnableCsvReports { get; set; } + + public String CsvReportsFolder { get; set; } + } + /// <summary> /// Gets or sets the working environment. /// </summary> @@ -168,6 +183,12 @@ namespace Tango.FSE.Common public String HotFolderPath { get; set; } /// <summary> + /// Gets or sets the statistics streaming configuration. + /// </summary> + /// <value> + public StatisticsStreamingConfiguration StatisticsStreamingConfig { get; set; } + + /// <summary> /// Initializes a new instance of the <see cref="FSESettings"/> class. /// </summary> public FSESettings() @@ -188,6 +209,7 @@ namespace Tango.FSE.Common ConnectivityVerificationMethod = ConnectivityVerificationMethod.Default; ForceExternalBridgeProtocolConfiguration = true; EnableHotFolder = true; + StatisticsStreamingConfig = new StatisticsStreamingConfiguration(); } } }
\ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Statistics/IStatisticsProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Statistics/IStatisticsProvider.cs index e171228c7..72ee0658d 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Statistics/IStatisticsProvider.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Statistics/IStatisticsProvider.cs @@ -9,6 +9,7 @@ namespace Tango.FSE.Common.Statistics { public interface IStatisticsProvider { + event EventHandler<JobRunReceivedEventArgs> JobRunReceived; Task<RequiredFiltersData> GetRequiredFiltersData(); Task<StatisticsModel> GetStatistics(Filters filters); Task<JobRunExtendedInfo> GetJobRunExtendedInfo(int jobRunID); diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Statistics/JobRunReceivedEventArgs.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Statistics/JobRunReceivedEventArgs.cs new file mode 100644 index 000000000..a9855581e --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Statistics/JobRunReceivedEventArgs.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PPC.Shared.Statistics; + +namespace Tango.FSE.Common.Statistics +{ + public class JobRunReceivedEventArgs : EventArgs + { + public JobRunComposition JobRunComposition { get; set; } + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Statistics/StatisticsModel.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Statistics/StatisticsModel.cs index 242bca621..83c6ad8c6 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Statistics/StatisticsModel.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Statistics/StatisticsModel.cs @@ -10,5 +10,10 @@ namespace Tango.FSE.Common.Statistics public class StatisticsModel { public StatisticsResult StatisticsResult { get; set; } + + public StatisticsModel() + { + StatisticsResult = new StatisticsResult(); + } } } diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj index 60d8b8df8..2c7e2f586 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj @@ -328,6 +328,7 @@ <Compile Include="SQL\RemoteSqlCommandMode.cs" /> <Compile Include="SQL\RemoteSqlCommandResult.cs" /> <Compile Include="Statistics\IStatisticsProvider.cs" /> + <Compile Include="Statistics\JobRunReceivedEventArgs.cs" /> <Compile Include="Statistics\StatisticsModel.cs" /> <Compile Include="Storage\IStorageProvider.cs" /> <Compile Include="Storage\IStorageResult.cs" /> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Statistics/DefaultStatisticsProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Statistics/DefaultStatisticsProvider.cs index a130bbccd..aff348548 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Statistics/DefaultStatisticsProvider.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Statistics/DefaultStatisticsProvider.cs @@ -14,8 +14,54 @@ namespace Tango.FSE.UI.Statistics { public class DefaultStatisticsProvider : FSEExtendedObject, IStatisticsProvider { - [TangoInject] - public IMachineProvider MachineProvider { get; set; } + public event EventHandler<JobRunReceivedEventArgs> JobRunReceived; + + private IMachineProvider MachineProvider { get; set; } + + public DefaultStatisticsProvider(IMachineProvider machineProvider) + { + MachineProvider = machineProvider; + + MachineProvider.MachineConnected += MachineProvider_MachineConnected; + } + + private void MachineProvider_MachineConnected(object sender, MachineConnectedEventArgs e) + { + if (MachineProvider.IsPPCAvailable) + { + InitStreaming(); + } + } + + private async void InitStreaming() + { + await Task.Delay(5000); + LogManager.Log("Initializing statistics streaming..."); + MachineProvider.MachineOperator.SendGenericContinuousRequest<StartJobRunsStreamingRequest, StartJobRunsStreamingResponse>(new StartJobRunsStreamingRequest()) + .Subscribe(response => + { + try + { + if (Settings.StatisticsStreamingConfig.Enable) + { + if (response.JobRunComposition != null) + { + JobRunReceived?.Invoke(this, new JobRunReceivedEventArgs() { JobRunComposition = response.JobRunComposition }); + } + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Error on statistics streaming JobRun received event."); + } + },(ex) => + { + LogManager.Log(ex, "Error initializing statistics streaming."); + },() => + { + + }); + } public async Task<RequiredFiltersData> GetRequiredFiltersData() { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Statistics/DefaultStatisticsService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Statistics/DefaultStatisticsService.cs index 7eee23925..f699f4a7e 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Statistics/DefaultStatisticsService.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Statistics/DefaultStatisticsService.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Data.Entity; +using System.Diagnostics; using System.IO; using System.Linq; using System.Text; @@ -24,11 +25,17 @@ namespace Tango.PPC.Common.Statistics public class DefaultStatisticsService : ExtendedObject, IStatisticsService, IExternalBridgeRequestHandler { private IMachineProvider _machineProvider; + private Dictionary<ExternalBridgeReceiver, String> _streamingReceivers; + private List<ColorCatalog> _catalogs; + private List<ColorCatalogsItem> _color_catalog_Items; + private List<ColorSpace> _colorSpaces; public bool Enabled { get; set; } = true; public DefaultStatisticsService(IPPCExternalBridgeService externalBridge, IMachineProvider machineProvider) { + _streamingReceivers = new Dictionary<ExternalBridgeReceiver, string>(); + try { _machineProvider = machineProvider; @@ -39,6 +46,30 @@ namespace Tango.PPC.Common.Statistics LogManager.Log(ex, "Error initializing the statistics service."); Enabled = false; } + + _machineProvider.MachineOperator.JobRunsLogger.JobRunAvailable += JobRunsLogger_JobRunAvailable; + } + + private void JobRunsLogger_JobRunAvailable(object sender, JobRunAvailableEventArgs e) + { + Task.Factory.StartNew(async () => + { + var jobRunComposition = await CreateJobRunComposition(e.JobRun); + + foreach (var receiver in _streamingReceivers.ToList()) + { + try + { + var response = new StartJobRunsStreamingResponse(); + response.JobRunComposition = jobRunComposition; + await receiver.Key.SendGenericResponse(response, receiver.Value); + } + catch (Exception ex) + { + Debug.WriteLine(ex); + } + } + }); } [ExternalBridgeRequestHandlerMethod(typeof(GetStatisticsRequiredFiltersRequest), RequestHandlerLoggingMode.LogRequestName)] @@ -114,82 +145,94 @@ namespace Tango.PPC.Common.Statistics var jobRuns = await db_JobRuns.ToListAsync(); - var colorSpaces = await db.ColorSpaces.ToListAsync(); - var rmls = await db.Rmls.ToListAsync(); - var catalogs = await db.ColorCatalogs.ToListAsync(); - var color_catalog_Items = await db.ColorCatalogsItems.ToListAsync(); - foreach (var jobRun in jobRuns) { - JobRunComposition jobRunComposition = new JobRunComposition(); - jobRunComposition.JobRun = JobRunDTO.FromObservable(jobRun); + JobRunComposition jobRunComposition = await CreateJobRunComposition(jobRun); + response.Result.JobRuns.Add(jobRunComposition); + } + } - PresentationJob pj = new PresentationJob(); - pj.ID = jobRun.ID; - jobRunComposition.Job = pj; + await receiver.SendGenericResponse(response, token); + } - if (jobRun.JobFile != null) - { - foreach (var segment in jobRun.JobFile.Segments) - { - PresentationSegment ps = new PresentationSegment(); - ps.Length = (int)segment.Length; - pj.Segments.Add(ps); + private async Task<JobRunComposition> CreateJobRunComposition(JobRun jobRun) + { + if (_colorSpaces == null) + { + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + _colorSpaces = await db.ColorSpaces.ToListAsync(); + _catalogs = await db.ColorCatalogs.ToListAsync(); + _color_catalog_Items = await db.ColorCatalogsItems.ToListAsync(); + } + } - foreach (var stop in segment.BrushStops.OrderBy(x => x.StopIndex).DistinctBy(x => x.OffsetPercent).ToList()) - { - PresentationBrushStop pbs = new PresentationBrushStop(); - pbs.ColorSpace = colorSpaces.First(x => x.Guid == stop.ColorSpaceGuid).Space; - pbs.StartMeters = segment.Length * (stop.OffsetPercent / 100d); ; + JobRunComposition jobRunComposition = new JobRunComposition(); + jobRunComposition.JobRun = JobRunDTO.FromObservable(jobRun); - foreach (var liquidType in stop.LiquidVolumes) - { - PresentationLiquidVolume plt = new PresentationLiquidVolume(); - plt.LiquidType = (LiquidTypes)Enum.Parse(typeof(LiquidTypes), liquidType.LiquidTypeName.Replace(" ", "")); - plt.Volume = liquidType.Volume; - pbs.LiquidVolumes.Add(plt); - } + PresentationJob pj = new PresentationJob(); + pj.ID = jobRun.ID; + jobRunComposition.Job = pj; - switch (pbs.ColorSpace) - { - case ColorSpaces.RGB: - pbs.Red = stop.Red; - pbs.Green = stop.Green; - pbs.Blue = stop.Blue; - break; - case ColorSpaces.LAB: - pbs.L = stop.L; - pbs.A = stop.B; - pbs.B = stop.B; - break; - case ColorSpaces.Volume: - pbs.Cyan = pbs.LiquidVolumes.First(x => x.LiquidType == LiquidTypes.Cyan).Volume; - pbs.Magenta = pbs.LiquidVolumes.First(x => x.LiquidType == LiquidTypes.Magenta).Volume; - pbs.Yellow = pbs.LiquidVolumes.First(x => x.LiquidType == LiquidTypes.Yellow).Volume; - pbs.Black = pbs.LiquidVolumes.First(x => x.LiquidType == LiquidTypes.Black).Volume; - break; - case ColorSpaces.Catalog: - pbs.Catalog = catalogs.FirstOrDefault(x => x.Guid == stop.ColorCatalogGuid)?.Name; - pbs.CatalogItem = color_catalog_Items.FirstOrDefault(x => x.Guid == stop.ColorCatalogItemGuid)?.Name; - break; - } + if (jobRun.JobFile != null) + { + foreach (var segment in jobRun.JobFile.Segments) + { + PresentationSegment ps = new PresentationSegment(); + ps.Length = (int)segment.Length; + pj.Segments.Add(ps); - pbs.BestMatchR = stop.BestMatchR; - pbs.BestMatchG = stop.BestMatchG; - pbs.BestMatchB = stop.BestMatchB; + foreach (var stop in segment.BrushStops.OrderBy(x => x.StopIndex).DistinctBy(x => x.OffsetPercent).ToList()) + { + PresentationBrushStop pbs = new PresentationBrushStop(); + pbs.ColorSpace = _colorSpaces.First(x => x.Guid == stop.ColorSpaceGuid).Space; + pbs.StartMeters = segment.Length * (stop.OffsetPercent / 100d); ; - ps.Stops.Add(pbs); - } + foreach (var liquidType in stop.LiquidVolumes) + { + PresentationLiquidVolume plt = new PresentationLiquidVolume(); + plt.LiquidType = (LiquidTypes)Enum.Parse(typeof(LiquidTypes), liquidType.LiquidTypeName.Replace(" ", "")); + plt.Volume = liquidType.Volume; + pbs.LiquidVolumes.Add(plt); } - } - jobRunComposition.JobRun.JobString = null; - jobRunComposition.JobRun.LiquidQuantityString = null; - response.Result.JobRuns.Add(jobRunComposition); + switch (pbs.ColorSpace) + { + case ColorSpaces.RGB: + pbs.Red = stop.Red; + pbs.Green = stop.Green; + pbs.Blue = stop.Blue; + break; + case ColorSpaces.LAB: + pbs.L = stop.L; + pbs.A = stop.B; + pbs.B = stop.B; + break; + case ColorSpaces.Volume: + pbs.Cyan = pbs.LiquidVolumes.First(x => x.LiquidType == LiquidTypes.Cyan).Volume; + pbs.Magenta = pbs.LiquidVolumes.First(x => x.LiquidType == LiquidTypes.Magenta).Volume; + pbs.Yellow = pbs.LiquidVolumes.First(x => x.LiquidType == LiquidTypes.Yellow).Volume; + pbs.Black = pbs.LiquidVolumes.First(x => x.LiquidType == LiquidTypes.Black).Volume; + break; + case ColorSpaces.Catalog: + pbs.Catalog = _catalogs.FirstOrDefault(x => x.Guid == stop.ColorCatalogGuid)?.Name; + pbs.CatalogItem = _color_catalog_Items.FirstOrDefault(x => x.Guid == stop.ColorCatalogItemGuid)?.Name; + break; + } + + pbs.BestMatchR = stop.BestMatchR; + pbs.BestMatchG = stop.BestMatchG; + pbs.BestMatchB = stop.BestMatchB; + + ps.Stops.Add(pbs); + } } } - await receiver.SendGenericResponse(response, token); + jobRunComposition.JobRun.JobString = null; + jobRunComposition.JobRun.LiquidQuantityString = null; + + return jobRunComposition; } [ExternalBridgeRequestHandlerMethod(typeof(GetJobRunExtendedInfoRequest), RequestHandlerLoggingMode.LogRequestName)] @@ -213,9 +256,42 @@ namespace Tango.PPC.Common.Statistics await receiver.SendGenericResponse(response, token); } + [ExternalBridgeRequestHandlerMethod(typeof(StartJobRunsStreamingRequest), RequestHandlerLoggingMode.LogRequestName)] + public async Task OnStartJobRunsStreamingRequest(StartJobRunsStreamingRequest request, String token, ExternalBridgeReceiver receiver) + { + this.ThrowIfDisabled(); + + if (!_streamingReceivers.ContainsKey(receiver)) + { + _streamingReceivers.Add(receiver, token); + } + + var response = new StartJobRunsStreamingResponse(); + + await receiver.SendGenericResponse(response, token); + } + + [ExternalBridgeRequestHandlerMethod(typeof(StopJobRunsStreamingRequest), RequestHandlerLoggingMode.LogRequestName)] + public async Task OnStopJobRunsStreamingRequest(StopJobRunsStreamingRequest request, String token, ExternalBridgeReceiver receiver) + { + this.ThrowIfDisabled(); + + if (_streamingReceivers.ContainsKey(receiver)) + { + _streamingReceivers.Remove(receiver); + } + + var response = new StopJobRunsStreamingResponse(); + + await receiver.SendGenericResponse(response, token); + } + public void OnReceiverDisconnected(ExternalBridgeReceiver receiver) { - + if (_streamingReceivers.ContainsKey(receiver)) + { + _streamingReceivers.Remove(receiver); + } } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/StartJobRunsStreamingRequest.cs b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/StartJobRunsStreamingRequest.cs new file mode 100644 index 000000000..beb1f1603 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/StartJobRunsStreamingRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.PPC.Shared.Statistics +{ + public class StartJobRunsStreamingRequest + { + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/StartJobRunsStreamingResponse.cs b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/StartJobRunsStreamingResponse.cs new file mode 100644 index 000000000..331c2f3b6 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/StartJobRunsStreamingResponse.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.PPC.Shared.Statistics +{ + public class StartJobRunsStreamingResponse + { + public JobRunComposition JobRunComposition { get; set; } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/StopJobRunsStreamingRequest.cs b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/StopJobRunsStreamingRequest.cs new file mode 100644 index 000000000..4ef75a280 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/StopJobRunsStreamingRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.PPC.Shared.Statistics +{ + public class StopJobRunsStreamingRequest + { + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/StopJobRunsStreamingResponse.cs b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/StopJobRunsStreamingResponse.cs new file mode 100644 index 000000000..e3d9f653b --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/StopJobRunsStreamingResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.PPC.Shared.Statistics +{ + public class StopJobRunsStreamingResponse + { + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Tango.PPC.Shared.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Tango.PPC.Shared.csproj index 188da58f8..3f7bc0cbe 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Tango.PPC.Shared.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Tango.PPC.Shared.csproj @@ -135,7 +135,11 @@ <Compile Include="Statistics\PresentationBrushStop.cs" /> <Compile Include="Statistics\PresentationJob.cs" /> <Compile Include="Statistics\PresentationSegment.cs" /> + <Compile Include="Statistics\StartJobRunsStreamingRequest.cs" /> + <Compile Include="Statistics\StartJobRunsStreamingResponse.cs" /> <Compile Include="Statistics\StatisticsResult.cs" /> + <Compile Include="Statistics\StopJobRunsStreamingRequest.cs" /> + <Compile Include="Statistics\StopJobRunsStreamingResponse.cs" /> <Compile Include="Statistics\ThreadFilterData.cs" /> <Compile Include="Updates\GetUpdatesAndPackagesRequest.cs" /> <Compile Include="Updates\GetUpdatesAndPackagesResponse.cs" /> diff --git a/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs b/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs index 38fc472bc..40f1d0789 100644 --- a/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs +++ b/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs @@ -31,6 +31,8 @@ namespace Tango.Integration.JobRuns private MachineStatus _startMachineStatus; private JobTicket _jobTicket; + public event EventHandler<JobRunAvailableEventArgs> JobRunAvailable; + #region Properties /// <summary> @@ -222,19 +224,19 @@ namespace Tango.Integration.JobRuns db.SaveChanges(); + JobRunInfo jobRunInfo = new JobRunInfo(); + jobRunInfo.JobRunID = run.ID; + jobRunInfo.JobTicket = _jobTicket; + jobRunInfo.Events = _currentJobEvents.Select(x => MachinesEventDTO.FromObservable(x)).ToList(); + jobRunInfo.StartMachineStatus = _startMachineStatus; + jobRunInfo.EndMachineStatus = MachineOperator.MachineStatus?.Clone(); + if (CreateJobRunsFiles) { try { Directory.CreateDirectory(JobRunsFolder); - JobRunInfo jobRunInfo = new JobRunInfo(); - jobRunInfo.JobRunID = run.ID; - jobRunInfo.JobTicket = _jobTicket; - jobRunInfo.Events = _currentJobEvents.Select(x => MachinesEventDTO.FromObservable(x)).ToList(); - jobRunInfo.StartMachineStatus = _startMachineStatus; - jobRunInfo.EndMachineStatus = MachineOperator.MachineStatus?.Clone(); - String json = jobRunInfo.ToJsonString(); File.WriteAllText(Path.Combine(JobRunsFolder, $"{run.ID}.run"), json); @@ -245,6 +247,8 @@ namespace Tango.Integration.JobRuns LogManager.Log(ex, "Error creating job run extended info file."); } } + + JobRunAvailable?.Invoke(this, new JobRunAvailableEventArgs() { JobRunInfo = jobRunInfo, JobRun = run }); } } catch (Exception ex) diff --git a/Software/Visual_Studio/Tango.Integration/JobRuns/IJobRunsLogger.cs b/Software/Visual_Studio/Tango.Integration/JobRuns/IJobRunsLogger.cs index 386298bb9..46a840a2e 100644 --- a/Software/Visual_Studio/Tango.Integration/JobRuns/IJobRunsLogger.cs +++ b/Software/Visual_Studio/Tango.Integration/JobRuns/IJobRunsLogger.cs @@ -15,6 +15,11 @@ namespace Tango.Integration.JobRuns public interface IJobRunsLogger { /// <summary> + /// Occurs when a new job run is available. + /// </summary> + event EventHandler<JobRunAvailableEventArgs> JobRunAvailable; + + /// <summary> /// Gets the machine operator. /// </summary> IMachineOperator MachineOperator { get; } diff --git a/Software/Visual_Studio/Tango.Integration/JobRuns/JobRunAvailableEventArgs.cs b/Software/Visual_Studio/Tango.Integration/JobRuns/JobRunAvailableEventArgs.cs new file mode 100644 index 000000000..b3b39109a --- /dev/null +++ b/Software/Visual_Studio/Tango.Integration/JobRuns/JobRunAvailableEventArgs.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.Integration.JobRuns +{ + public class JobRunAvailableEventArgs : EventArgs + { + public JobRunInfo JobRunInfo { get; set; } + public JobRun JobRun { get; set; } + + public JobRunAvailableEventArgs() + { + JobRunInfo = new JobRunInfo(); + } + } +} diff --git a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj index 2834989a7..79baefff0 100644 --- a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj +++ b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj @@ -111,6 +111,7 @@ <Compile Include="IntegrationSettings.cs" /> <Compile Include="JobRuns\BasicJobRunsLogger.cs" /> <Compile Include="JobRuns\IJobRunsLogger.cs" /> + <Compile Include="JobRuns\JobRunAvailableEventArgs.cs" /> <Compile Include="JobRuns\JobRunInfo.cs" /> <Compile Include="Logging\EmbeddedLogFileParser.cs" /> <Compile Include="Operation\AdditionalJobConfiguration.cs" /> |
