Initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Const
|
||||
{
|
||||
public static class DataErrorCodes
|
||||
{
|
||||
public const Int32 NoError = 0;
|
||||
public const Int32 Pulsewidth = 0x0F0D;
|
||||
public const Int32 Amplitude = 0x0F0E;
|
||||
public const Int32 TofOutOfRange = 0x0F0F;
|
||||
public const Int32 DeltaTimeOfFlight = 0x0F10;
|
||||
public const Int32 TofTimeout = 0x0F11;
|
||||
public const Int32 Unknown = 0xFFFF;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Const
|
||||
{
|
||||
public static class Formats
|
||||
{
|
||||
#region Format strings for display
|
||||
#region Format strings for "Decoded Data"-display
|
||||
public const String TofDispString = "000000.00000000";
|
||||
public const String HccCorrectionValue = "0.00000";
|
||||
public const String PwDispString = "0.00";
|
||||
public const String AmpDispUpString = "000.0";
|
||||
public const String AmpDispDownString = "-000.0";
|
||||
public const String TempDispString = "0.00";
|
||||
public const String Flow = "0.00";
|
||||
#endregion
|
||||
#region Format strings for "Mean"-Display
|
||||
public const String MeanDispString = "0.00";
|
||||
#endregion
|
||||
#region Format strings for "Std-Deviation"-Display
|
||||
public const String StdDevDispString = "0.00";
|
||||
#endregion
|
||||
#endregion
|
||||
#region Format strings for CSV-Logging
|
||||
public const String TofLogString = "000000.00000000";
|
||||
public const String PwLogString = "0.00";
|
||||
public const String AmpLogString = "000.0";
|
||||
public const String TempLogString = "0.00";
|
||||
public const String CsvDateTimeLogString = "HH:mm:ss:fff;yyyy.MM.dd;";
|
||||
public const String ErrorLogString = "HH:mm:ss:fff;yyyy.MM.dd;";
|
||||
public const String RawDataDateTimeLogString = "yyyy-MM-dd HH:mm:ss:ff ";
|
||||
public const String CsvIndexLogString = "{0:D8}";
|
||||
public const String CsvFileDateTimeString = "yyyyMMdd_HHmmss_";
|
||||
public const String TxtFileDateTimeString = "yyyyMMdd_HHmmss_";
|
||||
public const String LogFileDateTimeString = "yyyyMMdd_HHmmss";
|
||||
public const String HeaderFileDateTimeString = "yyyy-MM-dd HH:mm:ss";
|
||||
public const String StatusDateTimeString = "HH:mm:ss";
|
||||
#endregion
|
||||
#region Date/ Time for raw file naming
|
||||
public const String RawFileDateTimeString = "yyyyMMdd_HHmmss_";
|
||||
#endregion
|
||||
#region Date/ Time for image files naming
|
||||
public const String ImageFileDateTimeString = "yyyyMMdd_HHmmss_";
|
||||
#endregion
|
||||
#region Date/ Time for reports
|
||||
public const String ReportDateTimeTitleString = "yyyy-MM-dd";
|
||||
public const String PdfDateTimeString = "yyyyMMdd_HHmmss_";
|
||||
#endregion
|
||||
#region Format for GP30 first hit level adjustments
|
||||
public const String FirstHitLevelVoltage = "000.00";
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,273 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{D0C8D887-ED52-40AB-A069-90BCE0E801E2}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Xylem.Common.Ui.CordonelPreadjustmentUi</RootNamespace>
|
||||
<AssemblyName>Xylem.Common.Ui.CordonelPreadjustmentUi</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Unc</InstallFrom>
|
||||
<UpdateEnabled>true</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<InstallUrl>\\sla12file\auftrag\Aktuelle Anwendungen\CordonelPreadjustmentUiBETAV2\</InstallUrl>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>7.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>7.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestCertificateThumbprint>5CDF12D148BC9A7C8BD8C3C6BA581A97F25F3DDE</ManifestCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestKeyFile>CordonelPreadjustmentUi_1_TemporaryKey.pfx</ManifestKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignManifests>true</SignManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PdfSharp, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PDFsharp.1.50.5147\lib\net20\PdfSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PdfSharp.Charting, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PDFsharp.1.50.5147\lib\net20\PdfSharp.Charting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="GenerateReport.cs" />
|
||||
<Compile Include="Helper\ActivityCheckMultiPathDataLogContainer.cs" />
|
||||
<Compile Include="Helper\Extensions\CuncurentBagExt.cs" />
|
||||
<Compile Include="Helper\Extensions\ListDoubleCalculationExt.cs" />
|
||||
<Compile Include="Helper\MultiPathDataLogContainer.cs" />
|
||||
<Compile Include="Const\DataErrorCodes.cs" />
|
||||
<Compile Include="Const\Formats.cs" />
|
||||
<Compile Include="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainForm.Designer.cs">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MeterStateControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MeterStateControl.Designer.cs">
|
||||
<DependentUpon>MeterStateControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MsgBox.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MsgBox.Designer.cs">
|
||||
<DependentUpon>MsgBox.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Parameters\FlushParams.cs" />
|
||||
<Compile Include="PreAdjustmentControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PreAdjustmentControl.Designer.cs">
|
||||
<DependentUpon>PreAdjustmentControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PreAdjustmentSettingsContainer.cs" />
|
||||
<Compile Include="Processes\Actions\FlushProcess.cs" />
|
||||
<Compile Include="Processes\Actions\PrepareTestProcess.cs" />
|
||||
<Compile Include="Processes\Actions\AmplitudeTestProcess.cs" />
|
||||
<Compile Include="Processes\Actions\OffsetTestProcess.cs" />
|
||||
<Compile Include="Processes\Actions\CompletionProcess.cs" />
|
||||
<Compile Include="Processes\Actions\TemperatureCalibrationProcess.cs" />
|
||||
<Compile Include="Processes\Actions\PreparationProcess.cs" />
|
||||
<Compile Include="Processes\BaseProcess.cs" />
|
||||
<Compile Include="Processes\IProcess.cs" />
|
||||
<Compile Include="Processes\Actions\LoginProcess.cs" />
|
||||
<Compile Include="Processes\ProcessProgress.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TempMeterStateControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Watcher\IWatcher.cs" />
|
||||
<Compile Include="Watcher\IWatcherNeedCalibrationData.cs" />
|
||||
<Compile Include="Watcher\TempWatcher.cs" />
|
||||
<Compile Include="ZeroFlowGenesisMeter.cs" />
|
||||
<EmbeddedResource Include="MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MeterStateControl.resx">
|
||||
<DependentUpon>MeterStateControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MsgBox.resx">
|
||||
<DependentUpon>MsgBox.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PreAdjustmentControl.resx">
|
||||
<DependentUpon>PreAdjustmentControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="..\Ui\GenesisToolBox\meterconfig.json">
|
||||
<Link>meterconfig.json</Link>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="app.config" />
|
||||
<None Include="CordonelPreadjustmentUi_1_TemporaryKey.pfx" />
|
||||
<None Include="CordonelPreadjustmentUi_TemporaryKey.pfx" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CommonCore.Configuration\CommonCore.Configuration.csproj">
|
||||
<Project>{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}</Project>
|
||||
<Name>CommonCore.Configuration</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\CommonCore\CommonCore.csproj">
|
||||
<Project>{1B02C79E-0B19-43E2-8F6B-71EF0C786C97}</Project>
|
||||
<Name>CommonCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Hardware\Interfaces\Ports\PortCore\PortCore.csproj">
|
||||
<Project>{2E139F63-B6FE-4EA9-A098-85364FE9B26C}</Project>
|
||||
<Name>PortCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Hardware\WaterMeter\Genesis\DataPackages\DataPackages.csproj">
|
||||
<Project>{0E524D43-7B66-45CD-AA74-41D51AFC3D99}</Project>
|
||||
<Name>DataPackages</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Hardware\WaterMeter\Genesis\GenesisConfig\GenesisConfig.csproj">
|
||||
<Project>{F013A56B-7BE6-4852-9CD8-B971CD1ADD0C}</Project>
|
||||
<Name>GenesisConfig</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Hardware\WaterMeter\Genesis\GenesisCore\GenesisCore.csproj">
|
||||
<Project>{04201E95-90A0-4B73-A72F-379739B2A3AE}</Project>
|
||||
<Name>GenesisCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Hardware\WaterMeter\Genesis\Protocols\StreamingProtocol\StreamingProtocol.csproj">
|
||||
<Project>{29617814-313E-409E-AA5D-59C78A9D4DF1}</Project>
|
||||
<Name>StreamingProtocol</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Hardware\WaterMeter\Genesis\Registers\Registers.csproj">
|
||||
<Project>{F4AAF7E6-7333-4284-B735-E32DEB076C64}</Project>
|
||||
<Name>Registers</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Hardware\WaterMeter\WaterMeterCore\WaterMeterCore.csproj">
|
||||
<Project>{8203ABB8-38E5-472E-A742-33F38B7A74A6}</Project>
|
||||
<Name>WaterMeterCore</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Hardware\WaterMeter\WaterMeterCore\WaterMeterRegisters\WaterMeterRegisters.csproj">
|
||||
<Project>{26afcf1e-1287-48b8-a506-32b1e8a0dd0e}</Project>
|
||||
<Name>WaterMeterRegisters</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Logic.PrdoctionToProductMapper\Logic.ProductionToProductMapper.csproj">
|
||||
<Project>{D0C859D9-D55E-4E85-AC50-0FF31B1CE50D}</Project>
|
||||
<Name>Logic.ProductionToProductMapper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Metrology\Measurements\Measurements.csproj">
|
||||
<Project>{6CCDB656-C676-4360-BABA-C4596AAD175D}</Project>
|
||||
<Name>Measurements</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SoftwareAccessHelper\SoftwareAccessHelper.csproj">
|
||||
<Project>{A33E3C6D-EAAE-4A20-A0EE-F9E6922FD029}</Project>
|
||||
<Name>SoftwareAccessHelper</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\ErrorImage.gif" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Meter.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\NormalImage.gif" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\QuestionImage.gif" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Sensus-Xylem-lockup.jpg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\thermometer.GIF" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,419 @@
|
||||
using CordonelPreadjustmentUi.Const;
|
||||
using PdfSharp.Drawing;
|
||||
using PdfSharp.Drawing.Layout;
|
||||
using PdfSharp.Pdf;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Xylem.Common.Ui.CordonelPreadjustmentUi
|
||||
{
|
||||
public static class GenerateReport
|
||||
{
|
||||
private static class ReportParams
|
||||
{
|
||||
public const Int32 LogoXPos = 500;
|
||||
public const Int32 LogoYPos = 10;
|
||||
public const Int32 LogoXSize = 50;
|
||||
public const Int32 LogoYSize = 25;
|
||||
public const Int32 HeadlineXPos = 0;
|
||||
public const Int32 HeadlineYPos = 50;
|
||||
public const Int32 Headline2XPos = 128;
|
||||
public const Int32 Headline2YPos = 113;
|
||||
public const Int32 PageNumberXPosition = 220;
|
||||
public const Int32 PageNumberYPosition = -20;
|
||||
public const Int32 StandardTextXPos = 128;
|
||||
public const Int32 StandardTextYPos = 150;
|
||||
public const Int32 ImageXSize = 400;
|
||||
public const Int32 ImageYSize = 240;
|
||||
public const Int32 ImageXPos = 125;
|
||||
public const Int32 ImageYPos = 135;
|
||||
public const Int32 IntroductionXPos = 100;
|
||||
public const Int32 IntroductionYPos = 600;
|
||||
public static readonly XFont font20 = new XFont("Eras Bold ITC ", 20, XFontStyle.Bold);
|
||||
public static readonly XFont font14 = new XFont("Calibri", 14, XFontStyle.Bold);
|
||||
public static readonly XFont font12 = new XFont("Calibri", 12, XFontStyle.BoldItalic);
|
||||
public static readonly XFont fontStandard = new XFont("Calibri", 10, XFontStyle.Regular);
|
||||
public static readonly XFont fontSmall = new XFont("Calibri", 9, XFontStyle.Regular);
|
||||
public static readonly XFont fontVerySmall = new XFont("Calibri", 8, XFontStyle.Regular);
|
||||
public const Int32 Column1 = 0;
|
||||
public const Int32 Column2 = 1;
|
||||
public const Int32 Column3 = 2;
|
||||
public const Int32 Column4 = 3;
|
||||
public const Int32 Column5 = 4;
|
||||
}
|
||||
public static void GenerateReturnNote(int meterIndex, String pcbID, String reason, String logData, CultureInfo culture, Image Logo)
|
||||
{
|
||||
String UserName = Environment.UserName;
|
||||
DateTime Date = DateTime.Now;
|
||||
String Content = String.Empty;
|
||||
String Header = String.Empty;
|
||||
String Filename = String.Empty;
|
||||
String Headline = String.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
if (culture == CultureInfo.CreateSpecificCulture("de-DE"))
|
||||
{
|
||||
Headline = "Rückläuferschein";
|
||||
Header = $"ZÄHLER{meterIndex} fehlgeschlagen.\nLeiterplattennummer:\t{pcbID}\nGrund:\t{reason}\nDatum:\t{Date.ToString(Formats.HeaderFileDateTimeString)}\nBenutzername:\t{UserName}\n";
|
||||
Filename = $"Rückläuferschein_ZÄHLER{meterIndex}_{Date.ToString(Formats.LogFileDateTimeString, culture)}.pdf";
|
||||
}
|
||||
else
|
||||
{
|
||||
Headline = "Return note";
|
||||
Header = $"METER{meterIndex} failed.\nPCB-ID\t{pcbID}\nReason:\t{reason}\nDate:\t{Date.ToString(Formats.HeaderFileDateTimeString)}\nUser name:\t{UserName}\n";
|
||||
Filename = $"Return note_METER{meterIndex}_{Date.ToString(Formats.LogFileDateTimeString, culture)}.pdf";
|
||||
}
|
||||
|
||||
using (PdfDocument Report = new PdfDocument())
|
||||
{
|
||||
MemoryStream strm = new MemoryStream();
|
||||
Logo.Save(strm, System.Drawing.Imaging.ImageFormat.Png);
|
||||
|
||||
XImage xLogo = XImage.FromStream(strm);
|
||||
|
||||
ReportPages.ReturnNote(Headline, $"{Header}\n\n{logData}", Report, xLogo);
|
||||
SavePdf(Report, $@"..\{Filename}", culture);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
#region Error
|
||||
MessageBox.Show("Return note generation failed", "Form closing", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static Boolean SavePdf(PdfDocument document, String fullpath, CultureInfo culture)
|
||||
{
|
||||
Boolean SavingOK = false;
|
||||
try
|
||||
{
|
||||
var t = new Task(() =>
|
||||
{
|
||||
document.Save(@fullpath);
|
||||
System.Diagnostics.Process.Start(@fullpath);
|
||||
});
|
||||
t.Start();
|
||||
SavingOK = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//ErrorLog.Log(LogErrReason.Exeption, "Files.SavePdf() failed", $"0x{ex.HResult.ToString("X", culture)}", String.Empty, culture);
|
||||
}
|
||||
|
||||
return SavingOK;
|
||||
}
|
||||
|
||||
public static class ReportPages
|
||||
{
|
||||
public static void Logfile(String text, PdfDocument report, XImage logo)
|
||||
{
|
||||
#region CA1062
|
||||
if ((text == null) || (report == null))
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
const Int32 LinesPerPage = 60;
|
||||
String[] Lines = text.Split('\n');
|
||||
Double NumberOfNewlines = (double)Lines.Count();
|
||||
Double aux = (NumberOfNewlines / LinesPerPage);
|
||||
Int32 NumberOfPages = (Int32)Math.Ceiling(aux);
|
||||
String[] StringArray = new String[NumberOfPages];
|
||||
|
||||
for (Int32 i = 0; i < (NumberOfNewlines); i++)
|
||||
{
|
||||
Int32 Pageindex = (Int32)Math.Floor(((Double)i / LinesPerPage));
|
||||
StringArray[Pageindex] = StringArray[Pageindex] + Lines[i] + "\n";
|
||||
}
|
||||
|
||||
//formatter.DrawString(text, ReportParams.fontStandard, XBrushes.Black, new XRect(50, 100, 0, 0), XStringFormats.TopLeft);
|
||||
//Logfile.DrawString(text, ReportParams.fontStandard, XBrushes.Black, new XRect(10, 20, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
|
||||
|
||||
for (Int32 i = 0; i < NumberOfPages; i++)
|
||||
{
|
||||
PdfPage pdfPage = report.AddPage();
|
||||
XGraphics Logfile = XGraphics.FromPdfPage(pdfPage);
|
||||
var formatter = new XTextFormatter(Logfile);
|
||||
var layoutRectangle = new XRect(1, 1, 1, 1);
|
||||
Logfile.DrawImage(logo, new XRect(ReportParams.LogoXPos, ReportParams.LogoYPos, ReportParams.LogoXSize, ReportParams.LogoYSize));
|
||||
formatter.DrawString(StringArray[i], ReportParams.fontSmall, XBrushes.Black, new XRect(50, 70, 600, 20), XStringFormats.TopLeft);
|
||||
}
|
||||
|
||||
}
|
||||
public static UInt16 TitlePage(UInt16 pagecounter, String introduction, String title, String date, String operatorName, String serialNo, PdfDocument report, XImage logo, CultureInfo culture)
|
||||
{
|
||||
#region CA1062
|
||||
if (report == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endregion
|
||||
try
|
||||
{
|
||||
#region Page "TITLEPAGE"
|
||||
#region Prepare data
|
||||
if (pagecounter < UInt16.MaxValue)
|
||||
{
|
||||
pagecounter++; // Pagenumber not on titlepage
|
||||
}
|
||||
|
||||
report.Info.Title = title;
|
||||
PdfPage pdfPage = report.AddPage();
|
||||
XGraphics Titlepage = XGraphics.FromPdfPage(pdfPage);
|
||||
var formatter = new XTextFormatter(Titlepage);
|
||||
var layoutRectangle = new XRect(1, 1, 1, 1);
|
||||
Titlepage.DrawImage(logo, new XRect(ReportParams.LogoXPos, ReportParams.LogoYPos, ReportParams.LogoXSize, ReportParams.LogoYSize));
|
||||
Titlepage.DrawString($"{title}\n\n\n", ReportParams.font20, XBrushes.Black, new XRect(0, -200, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.Center);
|
||||
Titlepage.DrawString(date, ReportParams.font14, XBrushes.Black, new XRect(0, -100, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.Center);
|
||||
Titlepage.DrawString("by", ReportParams.font12, XBrushes.Black, new XRect(0, -50, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.Center);
|
||||
Titlepage.DrawString(operatorName, ReportParams.font14, XBrushes.Black, new XRect(0, 0, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.Center);
|
||||
Titlepage.DrawString($"Serial number: {serialNo}", ReportParams.font14, XBrushes.Black, new XRect(0, 100, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.Center);
|
||||
formatter.DrawString(introduction, ReportParams.fontStandard, XBrushes.Black, new XRect(ReportParams.IntroductionXPos, ReportParams.IntroductionYPos, 400, 200), XStringFormats.TopLeft);
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
#region Error
|
||||
//ErrorLog.Log(LogErrReason.Exeption, "ReportPages.TitlePage() failed", $"0x{ex.HResult.ToString("X", culture)}", String.Empty, culture);
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region Return value
|
||||
return pagecounter;
|
||||
#endregion
|
||||
}
|
||||
|
||||
public static void ReturnNote(String headline, String text, PdfDocument report, XImage logo)
|
||||
{
|
||||
#region CA1062
|
||||
if ((text == null) || (report == null))
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
const Int32 LinesPerPage = 70;
|
||||
String[] Lines = text.Split('\n');
|
||||
Double NumberOfNewlines = (Double)Lines.Count();
|
||||
Double aux = (NumberOfNewlines / LinesPerPage);
|
||||
Int32 NumberOfPages = (Int32)Math.Ceiling(aux);
|
||||
String[] StringArray = new String[NumberOfPages];
|
||||
|
||||
for (Int32 i = 0; i < (NumberOfNewlines); i++)
|
||||
{
|
||||
Int32 Pageindex = (Int32)Math.Floor(((Double)i / LinesPerPage));
|
||||
StringArray[Pageindex] = $"{StringArray[Pageindex]}{Lines[i]}\n";
|
||||
}
|
||||
|
||||
//formatter.DrawString(text, ReportParams.fontStandard, XBrushes.Black, new XRect(50, 100, 0, 0), XStringFormats.TopLeft);
|
||||
//Logfile.DrawString(text, ReportParams.fontStandard, XBrushes.Black, new XRect(10, 20, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
|
||||
|
||||
for (Int32 i = 0; i < NumberOfPages; i++)
|
||||
{
|
||||
PdfPage pdfPage = report.AddPage();
|
||||
XGraphics Logfile = XGraphics.FromPdfPage(pdfPage);
|
||||
var formatter = new XTextFormatter(Logfile);
|
||||
var layoutRectangle = new XRect(1, 1, 1, 1);
|
||||
Logfile.DrawImage(logo, new XRect(ReportParams.LogoXPos, ReportParams.LogoYPos, ReportParams.LogoXSize, ReportParams.LogoYSize));
|
||||
if (i == 0)
|
||||
{
|
||||
formatter.DrawString(headline, ReportParams.font20, XBrushes.Black, new XRect(250, 20, 600, 20), XStringFormats.TopLeft);
|
||||
formatter.DrawString(StringArray[i], ReportParams.fontVerySmall, XBrushes.Black, new XRect(60, 50, 600, pdfPage.Height.Point - 30), XStringFormats.TopLeft);
|
||||
}
|
||||
else
|
||||
{
|
||||
formatter.DrawString(StringArray[i], ReportParams.fontVerySmall, XBrushes.Black, new XRect(50, 70, 600, pdfPage.Height.Point - 10), XStringFormats.TopLeft);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static Int32 Settings(Int32 pagecounter, String textSoftwareVersion, String[] columns, Boolean enable, PdfDocument report, XImage logo, CultureInfo culture)
|
||||
{
|
||||
#region CA1062
|
||||
if ((report == null) || (columns == null))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endregion
|
||||
try
|
||||
{
|
||||
#region Page "SETTINGS"
|
||||
#region Generate page
|
||||
if (pagecounter < Int32.MaxValue)
|
||||
{
|
||||
pagecounter++;
|
||||
}
|
||||
|
||||
PdfPage pdfPage = report.AddPage();
|
||||
XGraphics Gp30Settings = XGraphics.FromPdfPage(pdfPage);
|
||||
var formatterGp30Settings = new XTextFormatter(Gp30Settings);
|
||||
var layoutRectangleGp30Settings = new XRect(1, 1, 1, 1);
|
||||
#endregion
|
||||
#region Set Image/ Logo
|
||||
Gp30Settings.DrawImage(logo, new XRect(ReportParams.LogoXPos, ReportParams.LogoYPos, ReportParams.LogoXSize, ReportParams.LogoYSize));
|
||||
#endregion
|
||||
#region Headline1
|
||||
Gp30Settings.DrawString("Settings", ReportParams.font20, XBrushes.Black, new XRect(ReportParams.HeadlineXPos, ReportParams.HeadlineYPos, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopCenter);
|
||||
#endregion
|
||||
#region Headline2 (first)
|
||||
Gp30Settings.DrawString("Software Version", ReportParams.font12, XBrushes.Black, new XRect(ReportParams.Headline2XPos, ReportParams.Headline2YPos, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
|
||||
#endregion
|
||||
#region Data
|
||||
formatterGp30Settings.DrawString(textSoftwareVersion, ReportParams.fontStandard, XBrushes.Black, new XRect(ReportParams.StandardTextXPos, ReportParams.StandardTextYPos, 400, 200), XStringFormats.TopLeft);
|
||||
#endregion
|
||||
#region GP30 settings
|
||||
if (enable)
|
||||
{
|
||||
#region Headline2
|
||||
Gp30Settings.DrawString("Values obtained from register readout", ReportParams.font12, XBrushes.Black, new XRect(ReportParams.Headline2XPos, ReportParams.Headline2YPos + 150, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
|
||||
#endregion
|
||||
#region Data/ text
|
||||
formatterGp30Settings.DrawString(columns[ReportParams.Column1], ReportParams.fontStandard, XBrushes.Black, new XRect(ReportParams.StandardTextXPos, ReportParams.StandardTextYPos + 150, 400, 200), XStringFormats.TopLeft);
|
||||
formatterGp30Settings.DrawString(columns[ReportParams.Column2], ReportParams.fontStandard, XBrushes.Black, new XRect(ReportParams.StandardTextXPos + 140, ReportParams.StandardTextYPos + 150, 400, 200), XStringFormats.TopLeft);
|
||||
formatterGp30Settings.DrawString(columns[ReportParams.Column3], ReportParams.fontStandard, XBrushes.Black, new XRect(ReportParams.StandardTextXPos + 190, ReportParams.StandardTextYPos + 150, 400, 200), XStringFormats.TopLeft);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
#region Set page number
|
||||
Gp30Settings.DrawString($"Page {pagecounter.ToString(culture)}", ReportParams.font12, XBrushes.Black, new XRect(ReportParams.PageNumberXPosition, ReportParams.PageNumberYPosition, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.BottomCenter);
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
#region Error
|
||||
//ErrorLog.Log(LogErrReason.Exeption, "ReportPages.Settings() failed", $"0x{ex.HResult.ToString("X", culture)}", String.Empty, culture);
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region Return values
|
||||
return pagecounter;
|
||||
#endregion
|
||||
}
|
||||
|
||||
public static UInt16 DecodedData(UInt16 pagecounter, String[] columns, Boolean enable, Boolean enableColumn2, Boolean enableColumn3, Boolean enableColumn4, PdfDocument report, XImage logo, CultureInfo culture)
|
||||
{
|
||||
const Int32 WaitingTime = 100;
|
||||
|
||||
#region CA1062
|
||||
if ((report == null) || (columns == null))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endregion
|
||||
|
||||
try
|
||||
{
|
||||
#region Page "MEAN VALUES"
|
||||
if ((enable) && ((enableColumn2) || (enableColumn3) || (enableColumn4)))
|
||||
{
|
||||
#region All PATHs
|
||||
#region Prepare Data
|
||||
if (pagecounter < UInt16.MaxValue)
|
||||
{
|
||||
pagecounter++;
|
||||
}
|
||||
|
||||
PdfPage pdfPage = report.AddPage();
|
||||
XGraphics XMean = XGraphics.FromPdfPage(pdfPage);
|
||||
var formatterData = new XTextFormatter(XMean);
|
||||
var layoutRectangleData = new XRect(1, 1, 1, 1);
|
||||
int Xoffset = -20;
|
||||
#endregion
|
||||
#region Headline1
|
||||
XMean.DrawString("Decoded Data", ReportParams.font20, XBrushes.Black, new XRect(ReportParams.HeadlineXPos, ReportParams.HeadlineYPos, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopCenter);
|
||||
#endregion
|
||||
#region Set text (First column)
|
||||
if (!enableColumn2)
|
||||
{
|
||||
Xoffset = Xoffset + 40;
|
||||
}
|
||||
|
||||
if (!enableColumn3)
|
||||
{
|
||||
Xoffset = Xoffset + 40;
|
||||
}
|
||||
|
||||
if (!enableColumn4)
|
||||
{
|
||||
Xoffset = Xoffset + 40;
|
||||
}
|
||||
|
||||
formatterData.DrawString(columns[ReportParams.Column1], ReportParams.fontStandard, XBrushes.Black, new XRect(ReportParams.StandardTextXPos + Xoffset, ReportParams.StandardTextYPos, 400, 200), XStringFormats.TopLeft);
|
||||
Xoffset = Xoffset + 120;
|
||||
#endregion
|
||||
#region Set Image/Logo
|
||||
XMean.DrawImage(logo, new XRect(ReportParams.LogoXPos, ReportParams.LogoYPos, ReportParams.LogoXSize, ReportParams.LogoYSize));
|
||||
#endregion
|
||||
#region Add pagenumber
|
||||
XMean.DrawString("Page " + pagecounter.ToString(culture), ReportParams.font12, XBrushes.Black, new XRect(ReportParams.PageNumberXPosition, ReportParams.PageNumberYPosition, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.BottomCenter);
|
||||
#endregion
|
||||
#endregion
|
||||
#region PATH0
|
||||
if (enableColumn2)
|
||||
{
|
||||
Thread.Sleep(WaitingTime);
|
||||
#region Headline2
|
||||
XMean.DrawString("PATH1", ReportParams.font12, XBrushes.Black, new XRect(ReportParams.Headline2XPos + Xoffset, ReportParams.Headline2YPos + 20, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
|
||||
#endregion
|
||||
#region Set text
|
||||
formatterData.DrawString(columns[ReportParams.Column2], ReportParams.fontStandard, XBrushes.Black, new XRect(ReportParams.StandardTextXPos + Xoffset, ReportParams.StandardTextYPos, 400, 200), XStringFormats.TopLeft);
|
||||
Xoffset = Xoffset + 110;
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
#region PATH1
|
||||
if (enableColumn3)
|
||||
{
|
||||
Thread.Sleep(WaitingTime);
|
||||
#region Headline2
|
||||
XMean.DrawString("PATH2", ReportParams.font12, XBrushes.Black, new XRect(ReportParams.Headline2XPos + Xoffset, ReportParams.Headline2YPos + 20, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
|
||||
#endregion
|
||||
#region Set text
|
||||
formatterData.DrawString(columns[ReportParams.Column3], ReportParams.fontStandard, XBrushes.Black, new XRect(ReportParams.StandardTextXPos + Xoffset, ReportParams.StandardTextYPos, 400, 200), XStringFormats.TopLeft);
|
||||
Xoffset = Xoffset + 110;
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
#region PATH2
|
||||
if (enableColumn4)
|
||||
{
|
||||
Thread.Sleep(WaitingTime);
|
||||
#region Headline2
|
||||
XMean.DrawString("PATH3", ReportParams.font12, XBrushes.Black, new XRect(ReportParams.Headline2XPos + Xoffset, ReportParams.Headline2YPos + 20, pdfPage.Width.Point, pdfPage.Height.Point), XStringFormats.TopLeft);
|
||||
#endregion
|
||||
#region Set text
|
||||
formatterData.DrawString(columns[ReportParams.Column4], ReportParams.fontStandard, XBrushes.Black, new XRect(ReportParams.StandardTextXPos + Xoffset, ReportParams.StandardTextYPos, 400, 200), XStringFormats.TopLeft);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
#region Error
|
||||
//ErrorLog.Log(LogErrReason.Exeption, "ReportPages.DecodedData() failed", $"0x{ex.HResult.ToString("X", culture)}", String.Empty, culture);
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region Return values
|
||||
return pagecounter;
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Helper
|
||||
{
|
||||
public class ActivityCheckMultiPathDataLogContainer<T> : MultiPathDataLogContainer<T>
|
||||
{
|
||||
private ConcurrentDictionary<Int32, T> PathValueDic = new ConcurrentDictionary<Int32, T>();
|
||||
private DateTimeOffset? LastUpdate = null;
|
||||
public ActivityCheckMultiPathDataLogContainer(int NumberOfPaths) : base(NumberOfPaths)
|
||||
{
|
||||
setUpdateTime();
|
||||
}
|
||||
|
||||
|
||||
public double GetSecondsSinceLastUpdate()
|
||||
{
|
||||
if (!LastUpdate.HasValue)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return (DateTimeOffset.UtcNow - LastUpdate.Value).TotalSeconds;
|
||||
}
|
||||
|
||||
private void setUpdateTime()
|
||||
{
|
||||
LastUpdate = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public new void Update(Int32? Path = null, T value = default(T))
|
||||
{
|
||||
setUpdateTime();
|
||||
base.Update(Path, value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Xylem.Common.Ui.CordonelPreadjustmentUi.Helper.Extensions
|
||||
{
|
||||
internal static class ConcurrentQueueExtensions
|
||||
{
|
||||
public static void Clear<T>(this ConcurrentQueue<T> queue)
|
||||
{
|
||||
T item;
|
||||
while (queue.TryDequeue(out item))
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Helper.Extensions
|
||||
{
|
||||
public static class ListDoubleCalculationExt
|
||||
{
|
||||
public static double Mean(this List<double> values)
|
||||
{
|
||||
#region CA1062
|
||||
if (values == null)
|
||||
return 0;
|
||||
#endregion
|
||||
|
||||
return values.Count == 0 ? 0 : values.Mean(0, values.Count);
|
||||
}
|
||||
|
||||
public static double Mean(this List<double> values, int start, int end)
|
||||
{
|
||||
#region CA1062
|
||||
if (values == null)
|
||||
return 0;
|
||||
#endregion
|
||||
double s = 0;
|
||||
|
||||
for (int i = start; i < end; i++)
|
||||
{
|
||||
s += values[i];
|
||||
}
|
||||
|
||||
return s / (end - start);
|
||||
}
|
||||
|
||||
public static double Variance(this List<double> values)
|
||||
{
|
||||
#region CA1062
|
||||
if (values == null)
|
||||
return 0;
|
||||
#endregion
|
||||
|
||||
return values.Variance(values.Mean(), 0, values.Count);
|
||||
}
|
||||
|
||||
public static double Variance(this List<double> values, double mean)
|
||||
{
|
||||
#region CA1062
|
||||
if (values == null)
|
||||
return 0;
|
||||
#endregion
|
||||
|
||||
return values.Variance(mean, 0, values.Count);
|
||||
}
|
||||
|
||||
public static double Variance(this List<double> values, double mean, int start, int end)
|
||||
{
|
||||
#region CA1062
|
||||
if (values == null)
|
||||
return 0;
|
||||
#endregion
|
||||
|
||||
double variance = 0;
|
||||
|
||||
|
||||
for (int i = start; i < end; i++)
|
||||
{
|
||||
variance += (double)Math.Pow((values[i] - mean), 2);
|
||||
}
|
||||
|
||||
int n = end - start;
|
||||
if (start > 0) n -= 1;
|
||||
|
||||
return variance / (n);
|
||||
}
|
||||
|
||||
public static double StandardDeviation(this List<double> values)
|
||||
{
|
||||
#region CA1062
|
||||
if (values == null)
|
||||
return 0;
|
||||
#endregion
|
||||
|
||||
return values.Count == 0 ? 0 : values.StandardDeviation(0, values.Count);
|
||||
}
|
||||
|
||||
public static double StandardDeviation(this List<double> values, int start, int end)
|
||||
{
|
||||
double mean = values.Mean(start, end);
|
||||
double variance = values.Variance(mean, start, end);
|
||||
|
||||
return (double)Math.Sqrt(variance);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Helper
|
||||
{
|
||||
public class MultiPathDataLogContainer<T>
|
||||
{
|
||||
private ConcurrentDictionary<Int32, T> PathValueDic = new ConcurrentDictionary<Int32, T>();
|
||||
private int numberOfPaths;
|
||||
private int v;
|
||||
|
||||
public MultiPathDataLogContainer(int NumberOfPaths)
|
||||
{
|
||||
for (int i = 0; i < NumberOfPaths; i++)
|
||||
{
|
||||
PathValueDic.AddOrUpdate(i, default(T), (oldP, oldLineCont) => default(T));
|
||||
}
|
||||
}
|
||||
|
||||
public MultiPathDataLogContainer(int NumberOfPaths, T defaultVal)
|
||||
{
|
||||
for (int i = 0; i < NumberOfPaths; i++)
|
||||
{
|
||||
PathValueDic.AddOrUpdate(i, defaultVal, (oldP, oldLineCont) => defaultVal);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Update(Int32? Path = null, T value = default(T))
|
||||
{
|
||||
if (Path.HasValue)
|
||||
{
|
||||
PathValueDic.AddOrUpdate(Path.Value, value, (oldKey, oldValue) => value);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var val in PathValueDic)
|
||||
{
|
||||
PathValueDic.AddOrUpdate(val.Key, value, (oldKey, oldValue) => value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public T Get(Int32 Path)
|
||||
{
|
||||
if (PathValueDic.ContainsKey(Path))
|
||||
{
|
||||
return PathValueDic.First(f => f.Key == Path).Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return PathValueDic.First(f => f.Key == Path).Value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Int32 GetPathCount()
|
||||
{
|
||||
return PathValueDic.Count;
|
||||
}
|
||||
|
||||
internal void Clear()
|
||||
{
|
||||
var tmpCount = GetPathCount();
|
||||
PathValueDic.Clear();
|
||||
for (int i = 0; i < tmpCount; i++)
|
||||
{
|
||||
PathValueDic.AddOrUpdate(i, default(T), (oldP, oldLineCont) => oldLineCont = default(T));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1810
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,253 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.CommonCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
|
||||
|
||||
namespace CordonelPreadjustmentUi
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
private PreAdjustmentControl preadjustCtl;
|
||||
private PreAdjustmentSettingsContainer mainSettings = new PreAdjustmentSettingsContainer();
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void MainForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
preadjustCtl = new PreAdjustmentControl(mainSettings);
|
||||
tab_ZeroFlowCal.Controls.Add(preadjustCtl);
|
||||
|
||||
|
||||
|
||||
|
||||
cB_SinglePath.Checked = mainSettings.NumberOfPaths == 1 ? true : false;
|
||||
nUD_SettingsTempMonitorLowerValue.Value = (decimal)mainSettings.LowerTempLimit;
|
||||
nUD_SettingsTempMonitorUpperValue.Value = (decimal)mainSettings.UpperTempLimit;
|
||||
nUD_SettingsTempMonitorDeviation.Value = (decimal)mainSettings.TempDeviationLimit;
|
||||
// nUD_SettingsPreparationMetersize.Value = mainSettings.MeterSize.GetHashCode();
|
||||
|
||||
|
||||
cB_OffsetTestLogFiles.Checked = mainSettings.OffsetTestGenerateLogfiles;
|
||||
nUD_Settings_ZeroflowOffsetTestActivityCheckInterval.Value = mainSettings.OffsetTestActivityCheckInverval;
|
||||
nUD_Settings_ZeroflowOffsetTestNumberOfLines.Value = mainSettings.OffsetTestNumberOfLines;
|
||||
nUD_Settings_ZeroflowOffsetTestSettlingTime.Value = mainSettings.OffsetTestSettlingTime;
|
||||
nUD_Settings_ZeroflowOffsetTestOffsetLimit.Value = mainSettings.OffsetTestOffsetLimitPS;
|
||||
nUD_Settings_ZeroflowOffsetTestLowerLimit.Value = mainSettings.OffsetTestLowerVoltageLimitMV;
|
||||
nUD_Settings_ZeroflowOffsetTestUpperLimit.Value = mainSettings.OffsetTestUpperVoltageLimitMV;
|
||||
|
||||
cB_AmpLogFiles.Checked = mainSettings.AmpTestGenerateLogfiles;
|
||||
nUD_Settings_AmplitudeActivityCheckInterval.Value = mainSettings.AmpTestActivityCheckInverval;
|
||||
cB_MeanAmplitudeFiles.Checked = mainSettings.AmpTestGenerateMeanValuesFile;
|
||||
nUD_PercentageStop.Value = mainSettings.AmpTestPercentageStop;
|
||||
nUD_PercentageStart.Value = mainSettings.AmpTestPercentageStart;
|
||||
nUD_Settings_AmplitudeTestMinDistance.Value = mainSettings.AmpTestAmpTestDistance;
|
||||
|
||||
nUD_Settings_AmplitudeTestLowerLimit.Value = mainSettings.AmpTestFirstHitLevelPropMin;
|
||||
nUD_Settings_AmplitudeTestUpperLimit.Value = mainSettings.AmpTestFirstHitLevelPropMax;
|
||||
|
||||
|
||||
nUD_Settings_Samplerate.Value = mainSettings.Samplerate;
|
||||
|
||||
}
|
||||
|
||||
private void tab_Maintab_Selected(object sender, TabControlEventArgs e)
|
||||
{
|
||||
if (e.TabPage.Name == tab_ZeroFlowCal.Name)
|
||||
{
|
||||
try
|
||||
{
|
||||
var _serialConfigFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Genesis", ProgramConfig.SerialConfigFileName);
|
||||
|
||||
|
||||
SlotConfig[] meterConfigList;
|
||||
using (var tr = new StreamReader(_serialConfigFile))
|
||||
{
|
||||
var _fileString = tr.ReadToEnd();
|
||||
meterConfigList = JsonConvert.DeserializeObject<SlotConfig[]>(_fileString);
|
||||
}
|
||||
mainSettings.Meters = new List<int>();
|
||||
mainSettings.TempMeters = new List<int>();
|
||||
foreach (var item in meterConfigList)
|
||||
{
|
||||
if (item.Type != SlotType.TemperatureMeter)
|
||||
{
|
||||
mainSettings.Meters.Add(item.Slot);
|
||||
}
|
||||
else
|
||||
{
|
||||
mainSettings.TempMeters.Add(item.Slot);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"use default meters because of {ex.Message}");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
mainSettings.NumberOfPaths = cB_SinglePath.Checked ? 1 : 3;
|
||||
mainSettings.LowerTempLimit = (double)nUD_SettingsTempMonitorLowerValue.Value;
|
||||
mainSettings.UpperTempLimit = (double)nUD_SettingsTempMonitorUpperValue.Value;
|
||||
mainSettings.TempDeviationLimit = (double)nUD_SettingsTempMonitorDeviation.Value;
|
||||
//mainSettings.MeterSize = (Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts.MeterSize)nUD_SettingsPreparationMetersize.Value;
|
||||
mainSettings.TempOnly = cB_TempOnly.Checked;
|
||||
mainSettings.TempMan = cB_TempManualAcquisition.Checked;
|
||||
|
||||
mainSettings.OffsetTestGenerateLogfiles = cB_OffsetTestLogFiles.Checked;
|
||||
mainSettings.OffsetTestActivityCheckInverval = (int)nUD_Settings_ZeroflowOffsetTestActivityCheckInterval.Value;
|
||||
mainSettings.OffsetTestNumberOfLines = (int)nUD_Settings_ZeroflowOffsetTestNumberOfLines.Value;
|
||||
mainSettings.OffsetTestSettlingTime = (int)nUD_Settings_ZeroflowOffsetTestSettlingTime.Value;
|
||||
mainSettings.OffsetTestOffsetLimitPS = (int)nUD_Settings_ZeroflowOffsetTestOffsetLimit.Value;
|
||||
mainSettings.OffsetTestLowerVoltageLimitMV = (int)nUD_Settings_ZeroflowOffsetTestLowerLimit.Value;
|
||||
mainSettings.OffsetTestUpperVoltageLimitMV = (int)nUD_Settings_ZeroflowOffsetTestUpperLimit.Value;
|
||||
|
||||
mainSettings.AmpTestGenerateLogfiles = cB_AmpLogFiles.Checked;
|
||||
mainSettings.AmpTestActivityCheckInverval = (int)nUD_Settings_AmplitudeActivityCheckInterval.Value;
|
||||
mainSettings.AmpTestGenerateMeanValuesFile = cB_MeanAmplitudeFiles.Checked;
|
||||
mainSettings.AmpTestPercentageStop = (int)nUD_PercentageStop.Value;
|
||||
mainSettings.AmpTestPercentageStart = (int)nUD_PercentageStart.Value;
|
||||
mainSettings.AmpTestAmpTestDistance = (int)nUD_Settings_AmplitudeTestMinDistance.Value;
|
||||
|
||||
|
||||
mainSettings.AmpTestFirstHitLevelPropMin = (int)nUD_Settings_AmplitudeTestLowerLimit.Value;
|
||||
mainSettings.AmpTestFirstHitLevelPropMax = (int)nUD_Settings_AmplitudeTestUpperLimit.Value;
|
||||
|
||||
mainSettings.Samplerate = (int)nUD_Settings_Samplerate.Value;
|
||||
|
||||
preadjustCtl.SetSettings(mainSettings);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (preadjustCtl != null)
|
||||
{
|
||||
preadjustCtl.CloseConnections();
|
||||
preadjustCtl.Dispose();
|
||||
}
|
||||
if (ThermoMeterBatch != null)
|
||||
{
|
||||
ThermoMeterBatch.Dispose();
|
||||
}
|
||||
if (TempMeterStateCtls != null)
|
||||
{
|
||||
foreach (var item in TempMeterStateCtls)
|
||||
{
|
||||
item.Dispose();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private MeterBatch ThermoMeterBatch = new MeterBatch();
|
||||
private List<MeterStateControl> TempMeterStateCtls = new List<MeterStateControl>();
|
||||
private void tmpStart(int slot, bool RaspiMode = false)
|
||||
{
|
||||
var ctlZehn = new TempMeterStateControl(slot);
|
||||
ctlZehn.Location = new Point(5 + ((TempMeterStateCtls.Count + 1) * ctlZehn.Width), 15);
|
||||
TempMeterStateCtls.Add(ctlZehn);
|
||||
gB_TempMeters.Controls.Add(ctlZehn);
|
||||
ctlZehn.Enabled = true;
|
||||
|
||||
|
||||
|
||||
|
||||
var currentMeter = new ZeroFlowGenesisMeter(ctlZehn.Slot, 3, !RaspiMode);
|
||||
|
||||
currentMeter.LogOnEnable = true;
|
||||
currentMeter.LoginFailed = false;
|
||||
currentMeter.PreparationFailed = false;
|
||||
currentMeter.AmplitudeFailed = false;
|
||||
currentMeter.ZeroFlowOffsetFailed = false;
|
||||
currentMeter.AmplitudeFailed = false;
|
||||
currentMeter.CompletionFailed = false;
|
||||
currentMeter.Ok = false;
|
||||
currentMeter.EmptyPipeCheckEnable = false;
|
||||
currentMeter.EmptyPipeCheckFailed = false;
|
||||
|
||||
ThermoMeterBatch.AddMeter(currentMeter);
|
||||
ctlZehn.IsEnabled = true;
|
||||
|
||||
|
||||
ctlZehn.Meter = currentMeter;
|
||||
ctlZehn.EnableOpening = true;
|
||||
|
||||
ctlZehn.Ok = ctlZehn.Meter.CheckStreamingPort();
|
||||
|
||||
ctlZehn.SetUi();
|
||||
|
||||
ctlZehn.Meter.StartRecordData();
|
||||
ctlZehn.Meter.LogRawData(true);
|
||||
if (RaspiMode)
|
||||
|
||||
{
|
||||
ctlZehn.StartTempWatch(MeterStateControl.TempMode.CalcTof);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ctlZehn.StartTempWatch(MeterStateControl.TempMode.Meter);
|
||||
}
|
||||
ctlZehn.SetTemperature(0);
|
||||
ctlZehn.DisableTemperatureinput(true);
|
||||
ctlZehn.IsEnabled = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void btn_LoadTempe_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
tmpStart((int)nudTempSlot.Value, false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void btnTempRaspi_Click(object sender, EventArgs e)
|
||||
{
|
||||
tmpStart((int)nudTempSlot.Value, true);
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (TempMeterStateCtls != null)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
foreach (var item in TempMeterStateCtls)
|
||||
{
|
||||
sb.AppendLine();
|
||||
sb.AppendLine($"##########Meter{item.Slot}#############");
|
||||
sb.Append(item.GetLog());
|
||||
sb.AppendLine();
|
||||
}
|
||||
richTextBox1.Text = sb.ToString();
|
||||
richTextBox1.ScrollToCaret();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void tab_ZeroFlowCal_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,203 @@
|
||||
namespace CordonelPreadjustmentUi
|
||||
{
|
||||
partial class MeterStateControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.p_ZeroFlowCal_Meter = new System.Windows.Forms.Panel();
|
||||
this.l_TempField_Celsius = new System.Windows.Forms.Label();
|
||||
this.l_PcbId = new System.Windows.Forms.Label();
|
||||
this.nUD_TempField_Celsius = new System.Windows.Forms.NumericUpDown();
|
||||
this.L_Srnr = new System.Windows.Forms.Label();
|
||||
this.pB_Meter = new System.Windows.Forms.PictureBox();
|
||||
this.l_ZeroFlowCal_Meter = new System.Windows.Forms.Label();
|
||||
this.cB_ZeroFlowCal_EnableMeter = new System.Windows.Forms.CheckBox();
|
||||
this.timBlink = new System.Windows.Forms.Timer(this.components);
|
||||
this.timWatch = new System.Windows.Forms.Timer(this.components);
|
||||
this.p_ZeroFlowCal_Meter.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUD_TempField_Celsius)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pB_Meter)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// p_ZeroFlowCal_Meter
|
||||
//
|
||||
this.p_ZeroFlowCal_Meter.BackColor = System.Drawing.Color.Cornsilk;
|
||||
this.p_ZeroFlowCal_Meter.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.p_ZeroFlowCal_Meter.Controls.Add(this.l_TempField_Celsius);
|
||||
this.p_ZeroFlowCal_Meter.Controls.Add(this.l_PcbId);
|
||||
this.p_ZeroFlowCal_Meter.Controls.Add(this.nUD_TempField_Celsius);
|
||||
this.p_ZeroFlowCal_Meter.Controls.Add(this.L_Srnr);
|
||||
this.p_ZeroFlowCal_Meter.Controls.Add(this.pB_Meter);
|
||||
this.p_ZeroFlowCal_Meter.Controls.Add(this.l_ZeroFlowCal_Meter);
|
||||
this.p_ZeroFlowCal_Meter.Location = new System.Drawing.Point(2, 2);
|
||||
this.p_ZeroFlowCal_Meter.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.p_ZeroFlowCal_Meter.Name = "p_ZeroFlowCal_Meter";
|
||||
this.p_ZeroFlowCal_Meter.Size = new System.Drawing.Size(85, 119);
|
||||
this.p_ZeroFlowCal_Meter.TabIndex = 26;
|
||||
//
|
||||
// l_TempField_Celsius
|
||||
//
|
||||
this.l_TempField_Celsius.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.l_TempField_Celsius.AutoSize = true;
|
||||
this.l_TempField_Celsius.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.l_TempField_Celsius.Location = new System.Drawing.Point(61, 89);
|
||||
this.l_TempField_Celsius.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_TempField_Celsius.Name = "l_TempField_Celsius";
|
||||
this.l_TempField_Celsius.Size = new System.Drawing.Size(20, 13);
|
||||
this.l_TempField_Celsius.TabIndex = 29;
|
||||
this.l_TempField_Celsius.Text = "°C";
|
||||
this.l_TempField_Celsius.Click += new System.EventHandler(this.l_TempField_Celsius_Click);
|
||||
//
|
||||
// l_PcbId
|
||||
//
|
||||
this.l_PcbId.AutoSize = true;
|
||||
this.l_PcbId.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.l_PcbId.Location = new System.Drawing.Point(2, 70);
|
||||
this.l_PcbId.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_PcbId.Name = "l_PcbId";
|
||||
this.l_PcbId.Size = new System.Drawing.Size(35, 13);
|
||||
this.l_PcbId.TabIndex = 59;
|
||||
this.l_PcbId.Text = "none";
|
||||
//
|
||||
// nUD_TempField_Celsius
|
||||
//
|
||||
this.nUD_TempField_Celsius.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.nUD_TempField_Celsius.DecimalPlaces = 1;
|
||||
this.nUD_TempField_Celsius.Increment = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.nUD_TempField_Celsius.Location = new System.Drawing.Point(2, 87);
|
||||
this.nUD_TempField_Celsius.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.nUD_TempField_Celsius.Maximum = new decimal(new int[] {
|
||||
50,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nUD_TempField_Celsius.Name = "nUD_TempField_Celsius";
|
||||
this.nUD_TempField_Celsius.Size = new System.Drawing.Size(55, 20);
|
||||
this.nUD_TempField_Celsius.TabIndex = 28;
|
||||
this.nUD_TempField_Celsius.Value = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// L_Srnr
|
||||
//
|
||||
this.L_Srnr.AutoSize = true;
|
||||
this.L_Srnr.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.L_Srnr.Location = new System.Drawing.Point(2, 57);
|
||||
this.L_Srnr.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.L_Srnr.Name = "L_Srnr";
|
||||
this.L_Srnr.Size = new System.Drawing.Size(35, 13);
|
||||
this.L_Srnr.TabIndex = 58;
|
||||
this.L_Srnr.Text = "none";
|
||||
//
|
||||
// pB_Meter
|
||||
//
|
||||
this.pB_Meter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pB_Meter.Image = global::Xylem.Common.Ui.CordonelPreadjustmentUi.Properties.Resources.NormalImage;
|
||||
this.pB_Meter.Location = new System.Drawing.Point(18, 18);
|
||||
this.pB_Meter.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pB_Meter.Name = "pB_Meter";
|
||||
this.pB_Meter.Size = new System.Drawing.Size(39, 37);
|
||||
this.pB_Meter.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pB_Meter.TabIndex = 57;
|
||||
this.pB_Meter.TabStop = false;
|
||||
this.pB_Meter.Click += new System.EventHandler(this.pB_Meter_Click);
|
||||
//
|
||||
// l_ZeroFlowCal_Meter
|
||||
//
|
||||
this.l_ZeroFlowCal_Meter.AutoSize = true;
|
||||
this.l_ZeroFlowCal_Meter.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.l_ZeroFlowCal_Meter.Location = new System.Drawing.Point(2, 3);
|
||||
this.l_ZeroFlowCal_Meter.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_ZeroFlowCal_Meter.Name = "l_ZeroFlowCal_Meter";
|
||||
this.l_ZeroFlowCal_Meter.Size = new System.Drawing.Size(50, 13);
|
||||
this.l_ZeroFlowCal_Meter.TabIndex = 25;
|
||||
this.l_ZeroFlowCal_Meter.Text = "METER";
|
||||
//
|
||||
// cB_ZeroFlowCal_EnableMeter
|
||||
//
|
||||
this.cB_ZeroFlowCal_EnableMeter.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.cB_ZeroFlowCal_EnableMeter.AutoSize = true;
|
||||
this.cB_ZeroFlowCal_EnableMeter.Location = new System.Drawing.Point(9, 125);
|
||||
this.cB_ZeroFlowCal_EnableMeter.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cB_ZeroFlowCal_EnableMeter.Name = "cB_ZeroFlowCal_EnableMeter";
|
||||
this.cB_ZeroFlowCal_EnableMeter.Size = new System.Drawing.Size(58, 17);
|
||||
this.cB_ZeroFlowCal_EnableMeter.TabIndex = 27;
|
||||
this.cB_ZeroFlowCal_EnableMeter.Text = "enable";
|
||||
this.cB_ZeroFlowCal_EnableMeter.UseVisualStyleBackColor = true;
|
||||
this.cB_ZeroFlowCal_EnableMeter.CheckedChanged += new System.EventHandler(this.cB_ZeroFlowCal_EnableMeter_CheckedChanged);
|
||||
//
|
||||
// timBlink
|
||||
//
|
||||
this.timBlink.Interval = 1000;
|
||||
this.timBlink.Tick += new System.EventHandler(this.timBlink_Tick);
|
||||
//
|
||||
// timWatch
|
||||
//
|
||||
this.timWatch.Enabled = true;
|
||||
this.timWatch.Interval = 5000;
|
||||
this.timWatch.Tick += new System.EventHandler(this.timWatch_Tick);
|
||||
//
|
||||
// MeterStateControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.p_ZeroFlowCal_Meter);
|
||||
this.Controls.Add(this.cB_ZeroFlowCal_EnableMeter);
|
||||
this.Name = "MeterStateControl";
|
||||
this.Size = new System.Drawing.Size(90, 142);
|
||||
this.p_ZeroFlowCal_Meter.ResumeLayout(false);
|
||||
this.p_ZeroFlowCal_Meter.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUD_TempField_Celsius)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pB_Meter)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel p_ZeroFlowCal_Meter;
|
||||
private System.Windows.Forms.PictureBox pB_Meter;
|
||||
private System.Windows.Forms.Label l_ZeroFlowCal_Meter;
|
||||
private System.Windows.Forms.CheckBox cB_ZeroFlowCal_EnableMeter;
|
||||
private System.Windows.Forms.Label l_PcbId;
|
||||
private System.Windows.Forms.Label L_Srnr;
|
||||
private System.Windows.Forms.Label l_TempField_Celsius;
|
||||
private System.Windows.Forms.NumericUpDown nUD_TempField_Celsius;
|
||||
private System.Windows.Forms.Timer timBlink;
|
||||
public System.Windows.Forms.Timer timWatch;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,574 @@
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using Xylem.Common.Ui.CordonelPreadjustmentUi.Helper.Extensions;
|
||||
|
||||
namespace CordonelPreadjustmentUi
|
||||
{
|
||||
|
||||
public partial class MeterStateControl : UserControl
|
||||
{
|
||||
public EventHandler OnRequestDetails;
|
||||
public EventHandler<EventArgsDecimal> OnTempretureChangedHandler;
|
||||
public EventHandler OnWatcherFailed;
|
||||
private Int32 WatcherInvervalS = 2;
|
||||
|
||||
private decimal? minTemp;
|
||||
private decimal? maxTemp;
|
||||
private decimal? currentTemp;
|
||||
|
||||
private bool watcherFailed = false;
|
||||
|
||||
private decimal? watcherMinTemp;
|
||||
private decimal? watcherMaxTemp;
|
||||
private decimal? watcherMaxDeviation;
|
||||
|
||||
public void SetWatcher(decimal? MinTemp, decimal? MaxTemp, decimal? MaxDeviation)
|
||||
{
|
||||
watcherMinTemp = MinTemp;
|
||||
watcherMaxTemp = MaxTemp;
|
||||
watcherMaxDeviation = MaxDeviation;
|
||||
}
|
||||
|
||||
public MeterStateControl(string Text)
|
||||
{
|
||||
InitializeComponent();
|
||||
IsEnabled = cB_ZeroFlowCal_EnableMeter.Checked;
|
||||
Failed = false;
|
||||
setImage(Xylem.Common.Ui.CordonelPreadjustmentUi.Properties.Resources.NormalImage);
|
||||
Slot = -1;
|
||||
setSerialNumbersVisible(false);
|
||||
setTempinputVisible(false);
|
||||
nUD_TempField_Celsius.ValueChanged += delegate (Object sender, EventArgs args)
|
||||
{
|
||||
if (sender is NumericUpDown)
|
||||
{
|
||||
changedTempreture(((NumericUpDown)sender).Value);
|
||||
}
|
||||
};
|
||||
|
||||
l_ZeroFlowCal_Meter.Text = Text;
|
||||
}
|
||||
|
||||
public MeterStateControl(int slot)
|
||||
{
|
||||
InitializeComponent();
|
||||
IsEnabled = cB_ZeroFlowCal_EnableMeter.Checked;
|
||||
Failed = false;
|
||||
setImage(Xylem.Common.Ui.CordonelPreadjustmentUi.Properties.Resources.NormalImage);
|
||||
Slot = slot;
|
||||
setSerialNumbersVisible(false);
|
||||
setTempinputVisible(false);
|
||||
nUD_TempField_Celsius.ValueChanged += delegate (Object sender, EventArgs args)
|
||||
{
|
||||
if (sender is NumericUpDown)
|
||||
{
|
||||
changedTempreture(((NumericUpDown)sender).Value);
|
||||
}
|
||||
};
|
||||
|
||||
l_ZeroFlowCal_Meter.Text = $"METER {slot}";
|
||||
}
|
||||
|
||||
private void watcherIsFailed()
|
||||
{
|
||||
OnWatcherFailed?.Invoke(this, EventArgs.Empty);
|
||||
watcherFailed = true;
|
||||
Failed = true;
|
||||
}
|
||||
private void RunWatchActions()
|
||||
{
|
||||
try
|
||||
{
|
||||
var cRecords = Meter.CurrentRecords.ToList();
|
||||
Log($"cRecords.Count={cRecords.Count}");
|
||||
if (cRecords != null && cRecords.Any())
|
||||
{
|
||||
decimal checkTempMeter = 0;
|
||||
if (MeterTempMode == TempMode.CalcTof)
|
||||
{
|
||||
//
|
||||
|
||||
var sumTof = 0.0;
|
||||
var countTof = 0;
|
||||
foreach (var tofItem in cRecords.Where(c => c.Channel == 2))
|
||||
{
|
||||
|
||||
|
||||
if (tofItem.Channel == 2)
|
||||
{
|
||||
Log($"TotalTimeOfFlightS;{(tofItem.TotalTimeOfFlightS * 1000).ToString()}");
|
||||
Log($"RAWTEMP;{interPol(TempFromTofLUT, (tofItem.TotalTimeOfFlightS * 1000))}");
|
||||
sumTof = (tofItem.TotalTimeOfFlightS * 1000) + sumTof;
|
||||
countTof = countTof + 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var x = (sumTof / countTof) / 1000;
|
||||
|
||||
|
||||
Log($"avgTof;{x}({sumTof}/{countTof})");
|
||||
|
||||
|
||||
checkTempMeter = interPol(TempFromTofLUT, x);
|
||||
Meter.CurrentRecords.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
checkTempMeter = (decimal)cRecords.Last().TemperatureDegC;
|
||||
}
|
||||
|
||||
currentTemp = checkTempMeter;
|
||||
Log($"{DateTime.UtcNow};currentTemp;{currentTemp};°C");
|
||||
if (!minTemp.HasValue || currentTemp < minTemp.Value)
|
||||
{
|
||||
minTemp = currentTemp;
|
||||
}
|
||||
if (!maxTemp.HasValue || currentTemp > maxTemp.Value)
|
||||
{
|
||||
maxTemp = currentTemp;
|
||||
}
|
||||
|
||||
SetTemperature(currentTemp.Value, false);
|
||||
|
||||
|
||||
if (watcherMinTemp.HasValue && minTemp < watcherMinTemp.Value)
|
||||
{
|
||||
watcherIsFailed();
|
||||
}
|
||||
if (watcherMaxTemp.HasValue && maxTemp > watcherMaxTemp.Value)
|
||||
{
|
||||
watcherIsFailed();
|
||||
}
|
||||
|
||||
if (watcherMaxDeviation.HasValue && Math.Abs(maxTemp.Value - minTemp.Value) > watcherMaxDeviation.Value)
|
||||
{
|
||||
watcherIsFailed();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Log($"temp NA");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"temp NA - {ex.Message}");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static decimal interPol(List<Tuple<double, double>> points, double x)
|
||||
{
|
||||
var x1 = 0.000;
|
||||
var y1 = 0.000;
|
||||
var x2 = 0.000;
|
||||
var y2 = 0.000;
|
||||
decimal checkTempMeter;
|
||||
if ((x <= points[0].Item1) && (x >= points.Last().Item1))
|
||||
{
|
||||
var i = 0;
|
||||
foreach (var val in points)
|
||||
{
|
||||
if (points[i].Item1 <= x)
|
||||
{
|
||||
x1 = points[i - 1].Item1;
|
||||
y1 = points[i - 1].Item2;
|
||||
x2 = points[i].Item1;
|
||||
y2 = points[i].Item2;
|
||||
break;
|
||||
}
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
checkTempMeter = (decimal)((y2 - y1) / (x2 - x1) * (x - x1) + y1);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkTempMeter = 1;
|
||||
}
|
||||
|
||||
return checkTempMeter;
|
||||
}
|
||||
|
||||
public void setImage(Bitmap img)
|
||||
{
|
||||
pB_Meter.Image = img;
|
||||
}
|
||||
private StringBuilder logSb = new StringBuilder();
|
||||
public bool EnableOpening { get; internal set; }
|
||||
public bool IsEnabled { get; internal set; }
|
||||
public bool IsDisabeldForRetry { get; private set; }
|
||||
public bool Ok { get; internal set; }
|
||||
public bool SetToUnknownStatus { get; internal set; }
|
||||
public int Slot { get; internal set; }
|
||||
public ZeroFlowGenesisMeter Meter { get; internal set; }
|
||||
public bool LoginFailed { get; internal set; }
|
||||
public string OverridePassword { get; internal set; }
|
||||
|
||||
internal decimal GetTemperature()
|
||||
{
|
||||
return nUD_TempField_Celsius.Value;
|
||||
}
|
||||
|
||||
public bool Failed { get; internal set; }
|
||||
private string idText = "";
|
||||
public string Id
|
||||
{
|
||||
get { return idText; }
|
||||
|
||||
internal set
|
||||
{
|
||||
idText = value;
|
||||
UpdateLbl(l_PcbId, idText);
|
||||
setSerialNumbersVisible(!string.IsNullOrEmpty(idText));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string srn = "";
|
||||
public string Srn
|
||||
{
|
||||
get { return srn; }
|
||||
|
||||
internal set
|
||||
{
|
||||
srn = value;
|
||||
UpdateLbl(L_Srnr, srn);
|
||||
setSerialNumbersVisible(!string.IsNullOrEmpty(Srn));
|
||||
}
|
||||
}
|
||||
|
||||
private void setSerialNumbersVisible(bool vis)
|
||||
{
|
||||
if (vis && !IsEnabled)
|
||||
{
|
||||
vis = false;
|
||||
}
|
||||
UpdateVisControl(l_PcbId, vis);
|
||||
UpdateVisControl(L_Srnr, vis);
|
||||
}
|
||||
|
||||
private void setTempinputVisible(bool vis)
|
||||
{
|
||||
UpdateVisControl(l_TempField_Celsius, vis);
|
||||
UpdateVisControl(nUD_TempField_Celsius, vis);
|
||||
UpdateEnableControl(nUD_TempField_Celsius, vis);
|
||||
|
||||
}
|
||||
|
||||
internal void StopTempWatch()
|
||||
{
|
||||
watchActiv = false;
|
||||
}
|
||||
public class CordonelTempLut
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int PcbId { get; set; }
|
||||
public double RefTempC { get; set; }
|
||||
public double AvgTof { get; set; }
|
||||
|
||||
public bool Active { get; set; }
|
||||
|
||||
|
||||
}
|
||||
private TempMode MeterTempMode;
|
||||
private List<Tuple<double, double>> TempFromTofLUT;
|
||||
internal void StartTempWatch(TempMode tempMode = TempMode.Hand)
|
||||
{
|
||||
Meter.WriteLog($"StartTempWatch with {tempMode}");
|
||||
|
||||
Meter.logAmpTest = true;
|
||||
if (tempMode == TempMode.CalcTof)
|
||||
{
|
||||
TempFromTofLUT = new List<Tuple<double, double>>();
|
||||
|
||||
var pcbid = "notFound";
|
||||
try
|
||||
{
|
||||
pcbid = Meter.GetPcbId();
|
||||
if (string.IsNullOrEmpty(pcbid))
|
||||
{
|
||||
pcbid = Meter.GetPcbId();
|
||||
if (string.IsNullOrEmpty(pcbid))
|
||||
{
|
||||
if (Meter.Slot == 11)
|
||||
{
|
||||
pcbid = "18370042";
|
||||
Meter.WriteLog($"Fake pcbid {pcbid} for 2016 slot 11");
|
||||
}
|
||||
else if (Meter.Slot == 12)
|
||||
{
|
||||
pcbid = "182100096";
|
||||
Meter.WriteLog($"Fake pcbid {pcbid} for 2016 slot 11");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var resp = LocalWebRequest.GetRequest($"http://10.49.40.25/MeterProcessState/api/TempFlange/GetLut?PcbId={pcbid}", 10000);
|
||||
var cordonelTempLut = JsonConvert.DeserializeObject<List<CordonelTempLut>>(resp);
|
||||
TempFromTofLUT = new List<Tuple<double, double>>();
|
||||
|
||||
foreach (var item in cordonelTempLut.OrderBy(a => a.RefTempC))
|
||||
{
|
||||
TempFromTofLUT.Add(new Tuple<double, double>(item.AvgTof, item.RefTempC));
|
||||
}
|
||||
var sb = new StringBuilder();
|
||||
foreach (var t in TempFromTofLUT)
|
||||
{
|
||||
sb.Append("Tof:");
|
||||
sb.Append(t.Item1);
|
||||
sb.Append("=Temp:");
|
||||
sb.Append(t.Item2);
|
||||
sb.Append(",");
|
||||
}
|
||||
|
||||
|
||||
Meter.WriteLog($"Load LUT { sb.ToString() } for meter {pcbid}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Meter.WriteLog($"StartTempWatch with LUT faild for meter {pcbid} with ex{ex.Message}");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
watchActiv = true;
|
||||
MeterTempMode = tempMode;
|
||||
|
||||
}
|
||||
public enum TempMode
|
||||
{
|
||||
Hand,
|
||||
Meter,
|
||||
CalcTof
|
||||
}
|
||||
|
||||
private void WatchTmrOnTick(Object sender, EventArgs e)
|
||||
{
|
||||
var t = new Task(() => { RunWatchActions(); });
|
||||
t.Start();
|
||||
}
|
||||
|
||||
internal void DisableTemperatureinput(bool v)
|
||||
{
|
||||
UpdateEnableControl(nUD_TempField_Celsius, !v);
|
||||
}
|
||||
|
||||
public void SetTemperature(decimal temp, bool setControls = true)
|
||||
{
|
||||
if (nUD_TempField_Celsius.InvokeRequired)
|
||||
{
|
||||
Invoke((Action<decimal, bool>)SetTemperature, temp, setControls);
|
||||
return;
|
||||
}
|
||||
|
||||
if (setControls)
|
||||
{
|
||||
if (!nUD_TempField_Celsius.Visible)
|
||||
{
|
||||
setTempinputVisible(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
nUD_TempField_Celsius.Value = temp;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void changedTempreture(decimal newValue)
|
||||
{
|
||||
OnTempretureChangedHandler?.Invoke(this, new EventArgsDecimal(newValue));
|
||||
}
|
||||
|
||||
|
||||
private void UpdateLbl(Label lbl, string text)
|
||||
{
|
||||
if (lbl.InvokeRequired)
|
||||
{
|
||||
Invoke((Action<Label, string>)UpdateLbl, lbl, text);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
lbl.Text = text;
|
||||
}
|
||||
private void UpdateVisControl(Control lbl, bool vis)
|
||||
{
|
||||
if (lbl.InvokeRequired)
|
||||
{
|
||||
Invoke((Action<Control, bool>)UpdateVisControl, lbl, vis);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
lbl.Visible = vis;
|
||||
}
|
||||
|
||||
private void UpdateEnableControl(Control ctl, bool enab)
|
||||
{
|
||||
if (ctl.InvokeRequired)
|
||||
{
|
||||
Invoke((Action<Control, bool>)UpdateEnableControl, ctl, enab);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctl is NumericUpDown)
|
||||
{
|
||||
((NumericUpDown)ctl).ReadOnly = !enab;
|
||||
}
|
||||
|
||||
ctl.Enabled = enab;
|
||||
}
|
||||
|
||||
internal void Log(string v)
|
||||
{
|
||||
logSb?.AppendLine(v);
|
||||
Meter?.WriteLog(v);
|
||||
}
|
||||
public string GetLog()
|
||||
{
|
||||
if (logSb == null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return logSb.ToString();
|
||||
}
|
||||
|
||||
|
||||
private void cB_ZeroFlowCal_EnableMeter_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
IsEnabled = ((CheckBox)sender).Checked;
|
||||
}
|
||||
|
||||
internal void SetChecked(bool v)
|
||||
{
|
||||
|
||||
if (cB_ZeroFlowCal_EnableMeter.InvokeRequired)
|
||||
{
|
||||
Invoke((Action<bool>)SetChecked, v);
|
||||
|
||||
return;
|
||||
}
|
||||
cB_ZeroFlowCal_EnableMeter.Checked = v;
|
||||
}
|
||||
|
||||
internal void SetUi(bool v = false)
|
||||
{
|
||||
if (p_ZeroFlowCal_Meter.InvokeRequired)
|
||||
{
|
||||
Invoke((Action<bool>)SetUi, true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (SetToUnknownStatus || (!IsEnabled && !Failed))
|
||||
{
|
||||
p_ZeroFlowCal_Meter.BackColor = Color.Cornsilk;
|
||||
return;
|
||||
}
|
||||
if (Ok && !Failed)
|
||||
{
|
||||
p_ZeroFlowCal_Meter.BackColor = Color.LightGreen;
|
||||
//pB_Meter.Image = GenesisZeroFlow._GenesisZeroFlow.pB_AvailableImages.ErrorImage;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_ZeroFlowCal_Meter.BackColor = Color.LightPink;
|
||||
}
|
||||
}
|
||||
|
||||
private void numericUpDown1_EnabledChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void timBlink_Tick(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private bool watchActiv = false;
|
||||
private Color failedBackgroundColor = Color.OrangeRed;
|
||||
private void timWatch_Tick(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
if (IsEnabled && watchActiv)
|
||||
{
|
||||
var t = new Task(() => { RunWatchActions(); });
|
||||
t.Start();
|
||||
|
||||
if (watcherFailed)
|
||||
{
|
||||
var tmp = p_ZeroFlowCal_Meter.BackColor;
|
||||
p_ZeroFlowCal_Meter.BackColor = failedBackgroundColor;
|
||||
failedBackgroundColor = tmp;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (watchActiv)
|
||||
{
|
||||
Log("watcher activ but ctl is disabled!");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
internal void SetDisableForRetry()
|
||||
{
|
||||
IsEnabled = false;
|
||||
IsDisabeldForRetry = true;
|
||||
}
|
||||
|
||||
internal void SetEnableAfterRetry()
|
||||
{
|
||||
if (IsDisabeldForRetry)
|
||||
{
|
||||
IsEnabled = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal void EnabeldBoxEnabel(bool v)
|
||||
{
|
||||
UpdateEnableControl(cB_ZeroFlowCal_EnableMeter, v);
|
||||
}
|
||||
|
||||
private void pB_Meter_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnRequestDetails?.Invoke(this, e);
|
||||
}
|
||||
|
||||
private void l_TempField_Celsius_Click(object sender, EventArgs e)
|
||||
{
|
||||
Log("Click");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="timBlink.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timWatch.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>104, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
namespace Xylem.Common.Ui.CordonelPreadjustmentUi
|
||||
{
|
||||
partial class MsgBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.txt = new System.Windows.Forms.TextBox();
|
||||
this.btn = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txt
|
||||
//
|
||||
this.txt.Location = new System.Drawing.Point(15, 10);
|
||||
this.txt.Multiline = true;
|
||||
this.txt.Name = "txt";
|
||||
this.txt.Size = new System.Drawing.Size(236, 63);
|
||||
this.txt.TabIndex = 0;
|
||||
//
|
||||
// btn
|
||||
//
|
||||
this.btn.Location = new System.Drawing.Point(15, 72);
|
||||
this.btn.Name = "btn";
|
||||
this.btn.Size = new System.Drawing.Size(236, 30);
|
||||
this.btn.TabIndex = 1;
|
||||
this.btn.Text = "button1";
|
||||
this.btn.UseVisualStyleBackColor = true;
|
||||
this.btn.Click += new System.EventHandler(this.btn_Click);
|
||||
//
|
||||
// MsgBox
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(259, 104);
|
||||
this.Controls.Add(this.btn);
|
||||
this.Controls.Add(this.txt);
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(275, 143);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(275, 143);
|
||||
this.Name = "MsgBox";
|
||||
this.Text = "MsgBox";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox txt;
|
||||
private System.Windows.Forms.Button btn;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Xylem.Common.Ui.CordonelPreadjustmentUi
|
||||
{
|
||||
public partial class MsgBox : Form
|
||||
{
|
||||
public event EventHandler ButtonClicked;
|
||||
public MsgBox( string Title,string Msg, string ButtonText = "Ok", Icon Icon = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
if (Icon == null)
|
||||
{
|
||||
Icon = SystemIcons.Information;
|
||||
}
|
||||
this.Icon = Icon;
|
||||
this.Text = Title;
|
||||
txt.Text = Msg;
|
||||
btn.Text = ButtonText;
|
||||
}
|
||||
|
||||
private void btn_Click(object sender, EventArgs e)
|
||||
{
|
||||
ButtonClicked?.Invoke(sender, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Parameters
|
||||
{
|
||||
public class FlushParams
|
||||
{
|
||||
public int DurationS { get; private set; }
|
||||
public int FlowrateQmH { get; private set; }
|
||||
|
||||
public string Message { get; private set; }
|
||||
|
||||
public FlushParams(MeterSize meterSize)
|
||||
{
|
||||
switch (meterSize)
|
||||
{
|
||||
|
||||
case MeterSize.DN50:
|
||||
FlowrateQmH = 40;
|
||||
DurationS = 120;
|
||||
break;
|
||||
|
||||
default:
|
||||
Message = $"Warning no parameter for meter size {meterSize.GetHashCode()} use default!{Environment.NewLine}";
|
||||
FlowrateQmH = 40;
|
||||
DurationS = 120;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(Message))
|
||||
{
|
||||
Message = $"{Message} Flush for meter size {meterSize.GetHashCode()}: {Environment.NewLine} Flow {FlowrateQmH}m³/h for {DurationS}S";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,670 @@
|
||||
namespace CordonelPreadjustmentUi
|
||||
{
|
||||
partial class PreAdjustmentControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Komponenten-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PreAdjustmentControl));
|
||||
this.pB_Logo1 = new System.Windows.Forms.PictureBox();
|
||||
this.gB_Meters = new System.Windows.Forms.GroupBox();
|
||||
this.pB_Bubbles1 = new System.Windows.Forms.PictureBox();
|
||||
this.l_ZeroFlowCal_Status = new System.Windows.Forms.Label();
|
||||
this.gB_Progress = new System.Windows.Forms.GroupBox();
|
||||
this.p_ZeroFlowCal_Completion = new System.Windows.Forms.Panel();
|
||||
this.l_ZeroFlowCal_Completion = new System.Windows.Forms.Label();
|
||||
this.p_ZeroFlowCal_Offset = new System.Windows.Forms.Panel();
|
||||
this.l_ZeroFlowCal_Offset = new System.Windows.Forms.Label();
|
||||
this.cB_ZeroFlowOffsetTestEnable = new System.Windows.Forms.CheckBox();
|
||||
this.cB_AmplitudeTestEnable = new System.Windows.Forms.CheckBox();
|
||||
this.cB_TempCalEnable = new System.Windows.Forms.CheckBox();
|
||||
this.p_ZeroFlowCal_Detect = new System.Windows.Forms.Panel();
|
||||
this.l_ZeroFlowCal_Detect = new System.Windows.Forms.Label();
|
||||
this.p_ZeroFlowCal_TempCal = new System.Windows.Forms.Panel();
|
||||
this.l_ZeroFlowCal_TempCal = new System.Windows.Forms.Label();
|
||||
this.p_ZeroFlowCal_Prepare = new System.Windows.Forms.Panel();
|
||||
this.l_ZeroFlowCal_Prepare = new System.Windows.Forms.Label();
|
||||
this.p_ZeroFlowCal_Amplitude = new System.Windows.Forms.Panel();
|
||||
this.l_ZeroFlowCal_Amplitude = new System.Windows.Forms.Label();
|
||||
this.gB_TempMeters = new System.Windows.Forms.GroupBox();
|
||||
this.btn_StoreTempe = new System.Windows.Forms.Button();
|
||||
this.pB_ZeroFlowCal_Progress = new System.Windows.Forms.ProgressBar();
|
||||
this.l_ZeroFlowCal_ResttimeDisplayValue = new System.Windows.Forms.Label();
|
||||
this.l_ZeroFlowCal_Resttime = new System.Windows.Forms.Label();
|
||||
this.btn_ZeroFlowCal_Abort = new System.Windows.Forms.Button();
|
||||
this.btn_ZeroFlowCal_Start = new System.Windows.Forms.Button();
|
||||
this.btn_ZeroFlowCal_Pdf = new System.Windows.Forms.Button();
|
||||
this.btn_ZeroFlowCal_Save = new System.Windows.Forms.Button();
|
||||
this.btn_ZeroFlowCal_Clear = new System.Windows.Forms.Button();
|
||||
this.btn_ZeroFlowCal_Detect = new System.Windows.Forms.Button();
|
||||
this.gB_MeterLog = new System.Windows.Forms.GroupBox();
|
||||
this.btn_ShowAll = new System.Windows.Forms.Button();
|
||||
this.rTB_ZeroFlowCalMeter = new System.Windows.Forms.RichTextBox();
|
||||
this.pB_ZeroFlowCal_SubProgress = new System.Windows.Forms.ProgressBar();
|
||||
this.l_ZeroFlowCal_SubResttimeDisplayValue = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.rTB_ZeroFlowCal = new System.Windows.Forms.RichTextBox();
|
||||
this.l_SettingsPreparationMetersize = new System.Windows.Forms.Label();
|
||||
this.cb_Metersize = new System.Windows.Forms.ComboBox();
|
||||
this.lblBuildDate = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pB_Logo1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pB_Bubbles1)).BeginInit();
|
||||
this.gB_Progress.SuspendLayout();
|
||||
this.p_ZeroFlowCal_Completion.SuspendLayout();
|
||||
this.p_ZeroFlowCal_Offset.SuspendLayout();
|
||||
this.p_ZeroFlowCal_Detect.SuspendLayout();
|
||||
this.p_ZeroFlowCal_TempCal.SuspendLayout();
|
||||
this.p_ZeroFlowCal_Prepare.SuspendLayout();
|
||||
this.p_ZeroFlowCal_Amplitude.SuspendLayout();
|
||||
this.gB_TempMeters.SuspendLayout();
|
||||
this.gB_MeterLog.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pB_Logo1
|
||||
//
|
||||
this.pB_Logo1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pB_Logo1.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.pB_Logo1.Image = ((System.Drawing.Image)(resources.GetObject("pB_Logo1.Image")));
|
||||
this.pB_Logo1.InitialImage = null;
|
||||
this.pB_Logo1.Location = new System.Drawing.Point(781, 0);
|
||||
this.pB_Logo1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pB_Logo1.Name = "pB_Logo1";
|
||||
this.pB_Logo1.Size = new System.Drawing.Size(158, 86);
|
||||
this.pB_Logo1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pB_Logo1.TabIndex = 69;
|
||||
this.pB_Logo1.TabStop = false;
|
||||
//
|
||||
// gB_Meters
|
||||
//
|
||||
this.gB_Meters.Location = new System.Drawing.Point(1, 98);
|
||||
this.gB_Meters.Margin = new System.Windows.Forms.Padding(10);
|
||||
this.gB_Meters.Name = "gB_Meters";
|
||||
this.gB_Meters.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.gB_Meters.Size = new System.Drawing.Size(950, 174);
|
||||
this.gB_Meters.TabIndex = 71;
|
||||
this.gB_Meters.TabStop = false;
|
||||
this.gB_Meters.Text = "Meters";
|
||||
//
|
||||
// pB_Bubbles1
|
||||
//
|
||||
this.pB_Bubbles1.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.pB_Bubbles1.Image = ((System.Drawing.Image)(resources.GetObject("pB_Bubbles1.Image")));
|
||||
this.pB_Bubbles1.Location = new System.Drawing.Point(20, 2);
|
||||
this.pB_Bubbles1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pB_Bubbles1.Name = "pB_Bubbles1";
|
||||
this.pB_Bubbles1.Size = new System.Drawing.Size(267, 93);
|
||||
this.pB_Bubbles1.TabIndex = 70;
|
||||
this.pB_Bubbles1.TabStop = false;
|
||||
this.pB_Bubbles1.Visible = false;
|
||||
//
|
||||
// l_ZeroFlowCal_Status
|
||||
//
|
||||
this.l_ZeroFlowCal_Status.AutoSize = true;
|
||||
this.l_ZeroFlowCal_Status.Font = new System.Drawing.Font("Microsoft Sans Serif", 22.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.l_ZeroFlowCal_Status.Location = new System.Drawing.Point(10, 478);
|
||||
this.l_ZeroFlowCal_Status.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_ZeroFlowCal_Status.Name = "l_ZeroFlowCal_Status";
|
||||
this.l_ZeroFlowCal_Status.Size = new System.Drawing.Size(243, 36);
|
||||
this.l_ZeroFlowCal_Status.TabIndex = 72;
|
||||
this.l_ZeroFlowCal_Status.Text = "Press \'DETECT\'";
|
||||
//
|
||||
// gB_Progress
|
||||
//
|
||||
this.gB_Progress.Controls.Add(this.p_ZeroFlowCal_Completion);
|
||||
this.gB_Progress.Controls.Add(this.p_ZeroFlowCal_Offset);
|
||||
this.gB_Progress.Controls.Add(this.p_ZeroFlowCal_Detect);
|
||||
this.gB_Progress.Controls.Add(this.p_ZeroFlowCal_TempCal);
|
||||
this.gB_Progress.Controls.Add(this.p_ZeroFlowCal_Prepare);
|
||||
this.gB_Progress.Controls.Add(this.p_ZeroFlowCal_Amplitude);
|
||||
this.gB_Progress.Location = new System.Drawing.Point(8, 517);
|
||||
this.gB_Progress.Margin = new System.Windows.Forms.Padding(10);
|
||||
this.gB_Progress.Name = "gB_Progress";
|
||||
this.gB_Progress.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.gB_Progress.Size = new System.Drawing.Size(744, 89);
|
||||
this.gB_Progress.TabIndex = 80;
|
||||
this.gB_Progress.TabStop = false;
|
||||
//
|
||||
// p_ZeroFlowCal_Completion
|
||||
//
|
||||
this.p_ZeroFlowCal_Completion.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.p_ZeroFlowCal_Completion.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.p_ZeroFlowCal_Completion.Controls.Add(this.l_ZeroFlowCal_Completion);
|
||||
this.p_ZeroFlowCal_Completion.Location = new System.Drawing.Point(607, 17);
|
||||
this.p_ZeroFlowCal_Completion.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.p_ZeroFlowCal_Completion.Name = "p_ZeroFlowCal_Completion";
|
||||
this.p_ZeroFlowCal_Completion.Size = new System.Drawing.Size(117, 65);
|
||||
this.p_ZeroFlowCal_Completion.TabIndex = 32;
|
||||
//
|
||||
// l_ZeroFlowCal_Completion
|
||||
//
|
||||
this.l_ZeroFlowCal_Completion.AutoSize = true;
|
||||
this.l_ZeroFlowCal_Completion.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.l_ZeroFlowCal_Completion.ForeColor = System.Drawing.Color.Gray;
|
||||
this.l_ZeroFlowCal_Completion.Location = new System.Drawing.Point(0, 22);
|
||||
this.l_ZeroFlowCal_Completion.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_ZeroFlowCal_Completion.Name = "l_ZeroFlowCal_Completion";
|
||||
this.l_ZeroFlowCal_Completion.Size = new System.Drawing.Size(108, 17);
|
||||
this.l_ZeroFlowCal_Completion.TabIndex = 40;
|
||||
this.l_ZeroFlowCal_Completion.Text = "COMPLETION";
|
||||
this.l_ZeroFlowCal_Completion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// p_ZeroFlowCal_Offset
|
||||
//
|
||||
this.p_ZeroFlowCal_Offset.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.p_ZeroFlowCal_Offset.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.p_ZeroFlowCal_Offset.Controls.Add(this.l_ZeroFlowCal_Offset);
|
||||
this.p_ZeroFlowCal_Offset.Controls.Add(this.cB_ZeroFlowOffsetTestEnable);
|
||||
this.p_ZeroFlowCal_Offset.Controls.Add(this.cB_AmplitudeTestEnable);
|
||||
this.p_ZeroFlowCal_Offset.Controls.Add(this.cB_TempCalEnable);
|
||||
this.p_ZeroFlowCal_Offset.Location = new System.Drawing.Point(486, 17);
|
||||
this.p_ZeroFlowCal_Offset.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.p_ZeroFlowCal_Offset.Name = "p_ZeroFlowCal_Offset";
|
||||
this.p_ZeroFlowCal_Offset.Size = new System.Drawing.Size(121, 65);
|
||||
this.p_ZeroFlowCal_Offset.TabIndex = 94;
|
||||
//
|
||||
// l_ZeroFlowCal_Offset
|
||||
//
|
||||
this.l_ZeroFlowCal_Offset.AutoSize = true;
|
||||
this.l_ZeroFlowCal_Offset.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.l_ZeroFlowCal_Offset.ForeColor = System.Drawing.Color.Gray;
|
||||
this.l_ZeroFlowCal_Offset.Location = new System.Drawing.Point(24, 12);
|
||||
this.l_ZeroFlowCal_Offset.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_ZeroFlowCal_Offset.Name = "l_ZeroFlowCal_Offset";
|
||||
this.l_ZeroFlowCal_Offset.Size = new System.Drawing.Size(68, 34);
|
||||
this.l_ZeroFlowCal_Offset.TabIndex = 40;
|
||||
this.l_ZeroFlowCal_Offset.Text = "OFFSET\r\nTEST";
|
||||
this.l_ZeroFlowCal_Offset.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// cB_ZeroFlowOffsetTestEnable
|
||||
//
|
||||
this.cB_ZeroFlowOffsetTestEnable.AutoSize = true;
|
||||
this.cB_ZeroFlowOffsetTestEnable.Checked = true;
|
||||
this.cB_ZeroFlowOffsetTestEnable.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cB_ZeroFlowOffsetTestEnable.Enabled = false;
|
||||
this.cB_ZeroFlowOffsetTestEnable.Location = new System.Drawing.Point(24, 15);
|
||||
this.cB_ZeroFlowOffsetTestEnable.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cB_ZeroFlowOffsetTestEnable.Name = "cB_ZeroFlowOffsetTestEnable";
|
||||
this.cB_ZeroFlowOffsetTestEnable.Size = new System.Drawing.Size(58, 17);
|
||||
this.cB_ZeroFlowOffsetTestEnable.TabIndex = 90;
|
||||
this.cB_ZeroFlowOffsetTestEnable.Text = "enable";
|
||||
this.cB_ZeroFlowOffsetTestEnable.UseVisualStyleBackColor = true;
|
||||
this.cB_ZeroFlowOffsetTestEnable.Visible = false;
|
||||
//
|
||||
// cB_AmplitudeTestEnable
|
||||
//
|
||||
this.cB_AmplitudeTestEnable.AutoSize = true;
|
||||
this.cB_AmplitudeTestEnable.Checked = true;
|
||||
this.cB_AmplitudeTestEnable.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cB_AmplitudeTestEnable.Enabled = false;
|
||||
this.cB_AmplitudeTestEnable.Location = new System.Drawing.Point(-216, 48);
|
||||
this.cB_AmplitudeTestEnable.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cB_AmplitudeTestEnable.Name = "cB_AmplitudeTestEnable";
|
||||
this.cB_AmplitudeTestEnable.Size = new System.Drawing.Size(58, 17);
|
||||
this.cB_AmplitudeTestEnable.TabIndex = 92;
|
||||
this.cB_AmplitudeTestEnable.Text = "enable";
|
||||
this.cB_AmplitudeTestEnable.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cB_TempCalEnable
|
||||
//
|
||||
this.cB_TempCalEnable.AutoSize = true;
|
||||
this.cB_TempCalEnable.Checked = true;
|
||||
this.cB_TempCalEnable.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cB_TempCalEnable.Enabled = false;
|
||||
this.cB_TempCalEnable.Location = new System.Drawing.Point(-96, 48);
|
||||
this.cB_TempCalEnable.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cB_TempCalEnable.Name = "cB_TempCalEnable";
|
||||
this.cB_TempCalEnable.Size = new System.Drawing.Size(58, 17);
|
||||
this.cB_TempCalEnable.TabIndex = 94;
|
||||
this.cB_TempCalEnable.Text = "enable";
|
||||
this.cB_TempCalEnable.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// p_ZeroFlowCal_Detect
|
||||
//
|
||||
this.p_ZeroFlowCal_Detect.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.p_ZeroFlowCal_Detect.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.p_ZeroFlowCal_Detect.Controls.Add(this.l_ZeroFlowCal_Detect);
|
||||
this.p_ZeroFlowCal_Detect.Location = new System.Drawing.Point(4, 17);
|
||||
this.p_ZeroFlowCal_Detect.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.p_ZeroFlowCal_Detect.Name = "p_ZeroFlowCal_Detect";
|
||||
this.p_ZeroFlowCal_Detect.Size = new System.Drawing.Size(121, 65);
|
||||
this.p_ZeroFlowCal_Detect.TabIndex = 40;
|
||||
//
|
||||
// l_ZeroFlowCal_Detect
|
||||
//
|
||||
this.l_ZeroFlowCal_Detect.AutoSize = true;
|
||||
this.l_ZeroFlowCal_Detect.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.l_ZeroFlowCal_Detect.ForeColor = System.Drawing.Color.Gray;
|
||||
this.l_ZeroFlowCal_Detect.Location = new System.Drawing.Point(24, 22);
|
||||
this.l_ZeroFlowCal_Detect.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_ZeroFlowCal_Detect.Name = "l_ZeroFlowCal_Detect";
|
||||
this.l_ZeroFlowCal_Detect.Size = new System.Drawing.Size(69, 17);
|
||||
this.l_ZeroFlowCal_Detect.TabIndex = 39;
|
||||
this.l_ZeroFlowCal_Detect.Text = "DETECT";
|
||||
//
|
||||
// p_ZeroFlowCal_TempCal
|
||||
//
|
||||
this.p_ZeroFlowCal_TempCal.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.p_ZeroFlowCal_TempCal.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.p_ZeroFlowCal_TempCal.Controls.Add(this.l_ZeroFlowCal_TempCal);
|
||||
this.p_ZeroFlowCal_TempCal.Location = new System.Drawing.Point(365, 17);
|
||||
this.p_ZeroFlowCal_TempCal.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.p_ZeroFlowCal_TempCal.Name = "p_ZeroFlowCal_TempCal";
|
||||
this.p_ZeroFlowCal_TempCal.Size = new System.Drawing.Size(121, 65);
|
||||
this.p_ZeroFlowCal_TempCal.TabIndex = 41;
|
||||
//
|
||||
// l_ZeroFlowCal_TempCal
|
||||
//
|
||||
this.l_ZeroFlowCal_TempCal.AutoSize = true;
|
||||
this.l_ZeroFlowCal_TempCal.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.l_ZeroFlowCal_TempCal.ForeColor = System.Drawing.Color.Gray;
|
||||
this.l_ZeroFlowCal_TempCal.Location = new System.Drawing.Point(0, 12);
|
||||
this.l_ZeroFlowCal_TempCal.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_ZeroFlowCal_TempCal.Name = "l_ZeroFlowCal_TempCal";
|
||||
this.l_ZeroFlowCal_TempCal.Size = new System.Drawing.Size(123, 34);
|
||||
this.l_ZeroFlowCal_TempCal.TabIndex = 40;
|
||||
this.l_ZeroFlowCal_TempCal.Text = "TEMPERATURE\r\nCALIBRATION";
|
||||
this.l_ZeroFlowCal_TempCal.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// p_ZeroFlowCal_Prepare
|
||||
//
|
||||
this.p_ZeroFlowCal_Prepare.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.p_ZeroFlowCal_Prepare.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.p_ZeroFlowCal_Prepare.Controls.Add(this.l_ZeroFlowCal_Prepare);
|
||||
this.p_ZeroFlowCal_Prepare.Location = new System.Drawing.Point(124, 17);
|
||||
this.p_ZeroFlowCal_Prepare.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.p_ZeroFlowCal_Prepare.Name = "p_ZeroFlowCal_Prepare";
|
||||
this.p_ZeroFlowCal_Prepare.Size = new System.Drawing.Size(121, 65);
|
||||
this.p_ZeroFlowCal_Prepare.TabIndex = 31;
|
||||
//
|
||||
// l_ZeroFlowCal_Prepare
|
||||
//
|
||||
this.l_ZeroFlowCal_Prepare.AutoSize = true;
|
||||
this.l_ZeroFlowCal_Prepare.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.l_ZeroFlowCal_Prepare.ForeColor = System.Drawing.Color.Gray;
|
||||
this.l_ZeroFlowCal_Prepare.Location = new System.Drawing.Point(18, 22);
|
||||
this.l_ZeroFlowCal_Prepare.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_ZeroFlowCal_Prepare.Name = "l_ZeroFlowCal_Prepare";
|
||||
this.l_ZeroFlowCal_Prepare.Size = new System.Drawing.Size(80, 17);
|
||||
this.l_ZeroFlowCal_Prepare.TabIndex = 39;
|
||||
this.l_ZeroFlowCal_Prepare.Text = "PREPARE";
|
||||
//
|
||||
// p_ZeroFlowCal_Amplitude
|
||||
//
|
||||
this.p_ZeroFlowCal_Amplitude.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.p_ZeroFlowCal_Amplitude.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.p_ZeroFlowCal_Amplitude.Controls.Add(this.l_ZeroFlowCal_Amplitude);
|
||||
this.p_ZeroFlowCal_Amplitude.Location = new System.Drawing.Point(244, 17);
|
||||
this.p_ZeroFlowCal_Amplitude.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.p_ZeroFlowCal_Amplitude.Name = "p_ZeroFlowCal_Amplitude";
|
||||
this.p_ZeroFlowCal_Amplitude.Size = new System.Drawing.Size(121, 65);
|
||||
this.p_ZeroFlowCal_Amplitude.TabIndex = 32;
|
||||
//
|
||||
// l_ZeroFlowCal_Amplitude
|
||||
//
|
||||
this.l_ZeroFlowCal_Amplitude.AutoSize = true;
|
||||
this.l_ZeroFlowCal_Amplitude.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.l_ZeroFlowCal_Amplitude.ForeColor = System.Drawing.Color.Gray;
|
||||
this.l_ZeroFlowCal_Amplitude.Location = new System.Drawing.Point(12, 15);
|
||||
this.l_ZeroFlowCal_Amplitude.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_ZeroFlowCal_Amplitude.Name = "l_ZeroFlowCal_Amplitude";
|
||||
this.l_ZeroFlowCal_Amplitude.Size = new System.Drawing.Size(95, 34);
|
||||
this.l_ZeroFlowCal_Amplitude.TabIndex = 39;
|
||||
this.l_ZeroFlowCal_Amplitude.Text = "AMPLITUDE\r\nTEST";
|
||||
this.l_ZeroFlowCal_Amplitude.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// gB_TempMeters
|
||||
//
|
||||
this.gB_TempMeters.Controls.Add(this.btn_StoreTempe);
|
||||
this.gB_TempMeters.Location = new System.Drawing.Point(8, 275);
|
||||
this.gB_TempMeters.Margin = new System.Windows.Forms.Padding(10);
|
||||
this.gB_TempMeters.Name = "gB_TempMeters";
|
||||
this.gB_TempMeters.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.gB_TempMeters.Size = new System.Drawing.Size(403, 193);
|
||||
this.gB_TempMeters.TabIndex = 72;
|
||||
this.gB_TempMeters.TabStop = false;
|
||||
this.gB_TempMeters.Text = "Temp. Meters";
|
||||
//
|
||||
// btn_StoreTempe
|
||||
//
|
||||
this.btn_StoreTempe.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btn_StoreTempe.Enabled = false;
|
||||
this.btn_StoreTempe.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btn_StoreTempe.Location = new System.Drawing.Point(4, 158);
|
||||
this.btn_StoreTempe.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btn_StoreTempe.Name = "btn_StoreTempe";
|
||||
this.btn_StoreTempe.Size = new System.Drawing.Size(395, 31);
|
||||
this.btn_StoreTempe.TabIndex = 95;
|
||||
this.btn_StoreTempe.Text = "SAVE TEMP";
|
||||
this.btn_StoreTempe.UseVisualStyleBackColor = true;
|
||||
this.btn_StoreTempe.Click += new System.EventHandler(this.btn_StoreTempe_Click);
|
||||
//
|
||||
// pB_ZeroFlowCal_Progress
|
||||
//
|
||||
this.pB_ZeroFlowCal_Progress.Location = new System.Drawing.Point(8, 634);
|
||||
this.pB_ZeroFlowCal_Progress.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pB_ZeroFlowCal_Progress.Name = "pB_ZeroFlowCal_Progress";
|
||||
this.pB_ZeroFlowCal_Progress.Size = new System.Drawing.Size(724, 18);
|
||||
this.pB_ZeroFlowCal_Progress.Step = 1;
|
||||
this.pB_ZeroFlowCal_Progress.TabIndex = 35;
|
||||
//
|
||||
// l_ZeroFlowCal_ResttimeDisplayValue
|
||||
//
|
||||
this.l_ZeroFlowCal_ResttimeDisplayValue.AutoSize = true;
|
||||
this.l_ZeroFlowCal_ResttimeDisplayValue.Location = new System.Drawing.Point(843, 634);
|
||||
this.l_ZeroFlowCal_ResttimeDisplayValue.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_ZeroFlowCal_ResttimeDisplayValue.Name = "l_ZeroFlowCal_ResttimeDisplayValue";
|
||||
this.l_ZeroFlowCal_ResttimeDisplayValue.Size = new System.Drawing.Size(49, 13);
|
||||
this.l_ZeroFlowCal_ResttimeDisplayValue.TabIndex = 37;
|
||||
this.l_ZeroFlowCal_ResttimeDisplayValue.Text = "00:00:00";
|
||||
//
|
||||
// l_ZeroFlowCal_Resttime
|
||||
//
|
||||
this.l_ZeroFlowCal_Resttime.AutoSize = true;
|
||||
this.l_ZeroFlowCal_Resttime.Location = new System.Drawing.Point(736, 634);
|
||||
this.l_ZeroFlowCal_Resttime.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_ZeroFlowCal_Resttime.Name = "l_ZeroFlowCal_Resttime";
|
||||
this.l_ZeroFlowCal_Resttime.Size = new System.Drawing.Size(54, 13);
|
||||
this.l_ZeroFlowCal_Resttime.TabIndex = 36;
|
||||
this.l_ZeroFlowCal_Resttime.Text = "Est. total: ";
|
||||
//
|
||||
// btn_ZeroFlowCal_Abort
|
||||
//
|
||||
this.btn_ZeroFlowCal_Abort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btn_ZeroFlowCal_Abort.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btn_ZeroFlowCal_Abort.Location = new System.Drawing.Point(672, 44);
|
||||
this.btn_ZeroFlowCal_Abort.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btn_ZeroFlowCal_Abort.Name = "btn_ZeroFlowCal_Abort";
|
||||
this.btn_ZeroFlowCal_Abort.Size = new System.Drawing.Size(102, 52);
|
||||
this.btn_ZeroFlowCal_Abort.TabIndex = 84;
|
||||
this.btn_ZeroFlowCal_Abort.Text = "STOP";
|
||||
this.btn_ZeroFlowCal_Abort.UseVisualStyleBackColor = true;
|
||||
this.btn_ZeroFlowCal_Abort.Click += new System.EventHandler(this.btn_ZeroFlowCal_Abort_Click);
|
||||
//
|
||||
// btn_ZeroFlowCal_Start
|
||||
//
|
||||
this.btn_ZeroFlowCal_Start.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btn_ZeroFlowCal_Start.Enabled = false;
|
||||
this.btn_ZeroFlowCal_Start.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btn_ZeroFlowCal_Start.Location = new System.Drawing.Point(566, 44);
|
||||
this.btn_ZeroFlowCal_Start.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btn_ZeroFlowCal_Start.Name = "btn_ZeroFlowCal_Start";
|
||||
this.btn_ZeroFlowCal_Start.Size = new System.Drawing.Size(102, 51);
|
||||
this.btn_ZeroFlowCal_Start.TabIndex = 83;
|
||||
this.btn_ZeroFlowCal_Start.Text = "START";
|
||||
this.btn_ZeroFlowCal_Start.UseVisualStyleBackColor = true;
|
||||
this.btn_ZeroFlowCal_Start.Click += new System.EventHandler(this.btn_ZeroFlowCal_Start_Click);
|
||||
//
|
||||
// btn_ZeroFlowCal_Pdf
|
||||
//
|
||||
this.btn_ZeroFlowCal_Pdf.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btn_ZeroFlowCal_Pdf.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btn_ZeroFlowCal_Pdf.Location = new System.Drawing.Point(846, 529);
|
||||
this.btn_ZeroFlowCal_Pdf.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btn_ZeroFlowCal_Pdf.Name = "btn_ZeroFlowCal_Pdf";
|
||||
this.btn_ZeroFlowCal_Pdf.Size = new System.Drawing.Size(63, 38);
|
||||
this.btn_ZeroFlowCal_Pdf.TabIndex = 91;
|
||||
this.btn_ZeroFlowCal_Pdf.Text = "PDF";
|
||||
this.btn_ZeroFlowCal_Pdf.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn_ZeroFlowCal_Save
|
||||
//
|
||||
this.btn_ZeroFlowCal_Save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btn_ZeroFlowCal_Save.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btn_ZeroFlowCal_Save.Location = new System.Drawing.Point(779, 529);
|
||||
this.btn_ZeroFlowCal_Save.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btn_ZeroFlowCal_Save.Name = "btn_ZeroFlowCal_Save";
|
||||
this.btn_ZeroFlowCal_Save.Size = new System.Drawing.Size(63, 38);
|
||||
this.btn_ZeroFlowCal_Save.TabIndex = 90;
|
||||
this.btn_ZeroFlowCal_Save.Text = "Save";
|
||||
this.btn_ZeroFlowCal_Save.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn_ZeroFlowCal_Clear
|
||||
//
|
||||
this.btn_ZeroFlowCal_Clear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btn_ZeroFlowCal_Clear.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btn_ZeroFlowCal_Clear.Location = new System.Drawing.Point(779, 571);
|
||||
this.btn_ZeroFlowCal_Clear.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btn_ZeroFlowCal_Clear.Name = "btn_ZeroFlowCal_Clear";
|
||||
this.btn_ZeroFlowCal_Clear.Size = new System.Drawing.Size(130, 28);
|
||||
this.btn_ZeroFlowCal_Clear.TabIndex = 89;
|
||||
this.btn_ZeroFlowCal_Clear.Text = "Clear";
|
||||
this.btn_ZeroFlowCal_Clear.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn_ZeroFlowCal_Detect
|
||||
//
|
||||
this.btn_ZeroFlowCal_Detect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btn_ZeroFlowCal_Detect.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btn_ZeroFlowCal_Detect.Location = new System.Drawing.Point(291, 44);
|
||||
this.btn_ZeroFlowCal_Detect.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btn_ZeroFlowCal_Detect.Name = "btn_ZeroFlowCal_Detect";
|
||||
this.btn_ZeroFlowCal_Detect.Size = new System.Drawing.Size(102, 51);
|
||||
this.btn_ZeroFlowCal_Detect.TabIndex = 82;
|
||||
this.btn_ZeroFlowCal_Detect.Text = "DETECT";
|
||||
this.btn_ZeroFlowCal_Detect.UseVisualStyleBackColor = true;
|
||||
this.btn_ZeroFlowCal_Detect.Click += new System.EventHandler(this.btn_ZeroFlowCal_Detect_Click);
|
||||
//
|
||||
// gB_MeterLog
|
||||
//
|
||||
this.gB_MeterLog.Controls.Add(this.btn_ShowAll);
|
||||
this.gB_MeterLog.Controls.Add(this.rTB_ZeroFlowCalMeter);
|
||||
this.gB_MeterLog.Location = new System.Drawing.Point(419, 275);
|
||||
this.gB_MeterLog.Margin = new System.Windows.Forms.Padding(10);
|
||||
this.gB_MeterLog.Name = "gB_MeterLog";
|
||||
this.gB_MeterLog.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.gB_MeterLog.Size = new System.Drawing.Size(532, 193);
|
||||
this.gB_MeterLog.TabIndex = 72;
|
||||
this.gB_MeterLog.TabStop = false;
|
||||
this.gB_MeterLog.Text = "Meters";
|
||||
this.gB_MeterLog.Visible = false;
|
||||
//
|
||||
// btn_ShowAll
|
||||
//
|
||||
this.btn_ShowAll.Location = new System.Drawing.Point(5, 14);
|
||||
this.btn_ShowAll.Name = "btn_ShowAll";
|
||||
this.btn_ShowAll.Size = new System.Drawing.Size(123, 20);
|
||||
this.btn_ShowAll.TabIndex = 97;
|
||||
this.btn_ShowAll.Text = "ShowAll";
|
||||
this.btn_ShowAll.UseVisualStyleBackColor = true;
|
||||
this.btn_ShowAll.Click += new System.EventHandler(this.btn_ShowAll_Click);
|
||||
//
|
||||
// rTB_ZeroFlowCalMeter
|
||||
//
|
||||
this.rTB_ZeroFlowCalMeter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.rTB_ZeroFlowCalMeter.Location = new System.Drawing.Point(4, 39);
|
||||
this.rTB_ZeroFlowCalMeter.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.rTB_ZeroFlowCalMeter.Name = "rTB_ZeroFlowCalMeter";
|
||||
this.rTB_ZeroFlowCalMeter.ReadOnly = true;
|
||||
this.rTB_ZeroFlowCalMeter.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
|
||||
this.rTB_ZeroFlowCalMeter.Size = new System.Drawing.Size(516, 139);
|
||||
this.rTB_ZeroFlowCalMeter.TabIndex = 96;
|
||||
this.rTB_ZeroFlowCalMeter.Text = "";
|
||||
//
|
||||
// pB_ZeroFlowCal_SubProgress
|
||||
//
|
||||
this.pB_ZeroFlowCal_SubProgress.Location = new System.Drawing.Point(8, 612);
|
||||
this.pB_ZeroFlowCal_SubProgress.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pB_ZeroFlowCal_SubProgress.Name = "pB_ZeroFlowCal_SubProgress";
|
||||
this.pB_ZeroFlowCal_SubProgress.Size = new System.Drawing.Size(724, 18);
|
||||
this.pB_ZeroFlowCal_SubProgress.Step = 1;
|
||||
this.pB_ZeroFlowCal_SubProgress.TabIndex = 92;
|
||||
//
|
||||
// l_ZeroFlowCal_SubResttimeDisplayValue
|
||||
//
|
||||
this.l_ZeroFlowCal_SubResttimeDisplayValue.AutoSize = true;
|
||||
this.l_ZeroFlowCal_SubResttimeDisplayValue.Location = new System.Drawing.Point(845, 617);
|
||||
this.l_ZeroFlowCal_SubResttimeDisplayValue.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_ZeroFlowCal_SubResttimeDisplayValue.Name = "l_ZeroFlowCal_SubResttimeDisplayValue";
|
||||
this.l_ZeroFlowCal_SubResttimeDisplayValue.Size = new System.Drawing.Size(49, 13);
|
||||
this.l_ZeroFlowCal_SubResttimeDisplayValue.TabIndex = 94;
|
||||
this.l_ZeroFlowCal_SubResttimeDisplayValue.Text = "00:00:00";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(736, 616);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(105, 13);
|
||||
this.label2.TabIndex = 93;
|
||||
this.label2.Text = "Est. finish Proccess: ";
|
||||
//
|
||||
// rTB_ZeroFlowCal
|
||||
//
|
||||
this.rTB_ZeroFlowCal.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.rTB_ZeroFlowCal.Location = new System.Drawing.Point(419, 280);
|
||||
this.rTB_ZeroFlowCal.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.rTB_ZeroFlowCal.Name = "rTB_ZeroFlowCal";
|
||||
this.rTB_ZeroFlowCal.ReadOnly = true;
|
||||
this.rTB_ZeroFlowCal.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
|
||||
this.rTB_ZeroFlowCal.Size = new System.Drawing.Size(528, 193);
|
||||
this.rTB_ZeroFlowCal.TabIndex = 101;
|
||||
this.rTB_ZeroFlowCal.Text = "";
|
||||
//
|
||||
// l_SettingsPreparationMetersize
|
||||
//
|
||||
this.l_SettingsPreparationMetersize.AutoSize = true;
|
||||
this.l_SettingsPreparationMetersize.Location = new System.Drawing.Point(416, 64);
|
||||
this.l_SettingsPreparationMetersize.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.l_SettingsPreparationMetersize.Name = "l_SettingsPreparationMetersize";
|
||||
this.l_SettingsPreparationMetersize.Size = new System.Drawing.Size(55, 13);
|
||||
this.l_SettingsPreparationMetersize.TabIndex = 104;
|
||||
this.l_SettingsPreparationMetersize.Text = "Metersize:";
|
||||
//
|
||||
// cb_Metersize
|
||||
//
|
||||
this.cb_Metersize.FormattingEnabled = true;
|
||||
this.cb_Metersize.Location = new System.Drawing.Point(476, 64);
|
||||
this.cb_Metersize.Name = "cb_Metersize";
|
||||
this.cb_Metersize.Size = new System.Drawing.Size(73, 21);
|
||||
this.cb_Metersize.TabIndex = 105;
|
||||
//
|
||||
// lblBuildDate
|
||||
//
|
||||
this.lblBuildDate.AutoSize = true;
|
||||
this.lblBuildDate.Location = new System.Drawing.Point(779, 88);
|
||||
this.lblBuildDate.Name = "lblBuildDate";
|
||||
this.lblBuildDate.Size = new System.Drawing.Size(10, 13);
|
||||
this.lblBuildDate.TabIndex = 106;
|
||||
this.lblBuildDate.Text = "-";
|
||||
//
|
||||
// PreAdjustmentControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.lblBuildDate);
|
||||
this.Controls.Add(this.cb_Metersize);
|
||||
this.Controls.Add(this.l_SettingsPreparationMetersize);
|
||||
this.Controls.Add(this.rTB_ZeroFlowCal);
|
||||
this.Controls.Add(this.l_ZeroFlowCal_SubResttimeDisplayValue);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.pB_ZeroFlowCal_SubProgress);
|
||||
this.Controls.Add(this.gB_MeterLog);
|
||||
this.Controls.Add(this.gB_TempMeters);
|
||||
this.Controls.Add(this.btn_ZeroFlowCal_Pdf);
|
||||
this.Controls.Add(this.btn_ZeroFlowCal_Save);
|
||||
this.Controls.Add(this.btn_ZeroFlowCal_Clear);
|
||||
this.Controls.Add(this.btn_ZeroFlowCal_Abort);
|
||||
this.Controls.Add(this.l_ZeroFlowCal_ResttimeDisplayValue);
|
||||
this.Controls.Add(this.pB_ZeroFlowCal_Progress);
|
||||
this.Controls.Add(this.btn_ZeroFlowCal_Start);
|
||||
this.Controls.Add(this.l_ZeroFlowCal_Resttime);
|
||||
this.Controls.Add(this.btn_ZeroFlowCal_Detect);
|
||||
this.Controls.Add(this.l_ZeroFlowCal_Status);
|
||||
this.Controls.Add(this.gB_Progress);
|
||||
this.Controls.Add(this.pB_Logo1);
|
||||
this.Controls.Add(this.gB_Meters);
|
||||
this.Controls.Add(this.pB_Bubbles1);
|
||||
this.Name = "PreAdjustmentControl";
|
||||
this.Size = new System.Drawing.Size(970, 674);
|
||||
this.Load += new System.EventHandler(this.PreAdjustmentControl_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pB_Logo1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pB_Bubbles1)).EndInit();
|
||||
this.gB_Progress.ResumeLayout(false);
|
||||
this.p_ZeroFlowCal_Completion.ResumeLayout(false);
|
||||
this.p_ZeroFlowCal_Completion.PerformLayout();
|
||||
this.p_ZeroFlowCal_Offset.ResumeLayout(false);
|
||||
this.p_ZeroFlowCal_Offset.PerformLayout();
|
||||
this.p_ZeroFlowCal_Detect.ResumeLayout(false);
|
||||
this.p_ZeroFlowCal_Detect.PerformLayout();
|
||||
this.p_ZeroFlowCal_TempCal.ResumeLayout(false);
|
||||
this.p_ZeroFlowCal_TempCal.PerformLayout();
|
||||
this.p_ZeroFlowCal_Prepare.ResumeLayout(false);
|
||||
this.p_ZeroFlowCal_Prepare.PerformLayout();
|
||||
this.p_ZeroFlowCal_Amplitude.ResumeLayout(false);
|
||||
this.p_ZeroFlowCal_Amplitude.PerformLayout();
|
||||
this.gB_TempMeters.ResumeLayout(false);
|
||||
this.gB_MeterLog.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.PictureBox pB_Logo1;
|
||||
private System.Windows.Forms.GroupBox gB_Meters;
|
||||
private System.Windows.Forms.PictureBox pB_Bubbles1;
|
||||
private System.Windows.Forms.Label l_ZeroFlowCal_Status;
|
||||
private System.Windows.Forms.GroupBox gB_Progress;
|
||||
private System.Windows.Forms.Panel p_ZeroFlowCal_Completion;
|
||||
private System.Windows.Forms.Label l_ZeroFlowCal_Completion;
|
||||
private System.Windows.Forms.ProgressBar pB_ZeroFlowCal_Progress;
|
||||
private System.Windows.Forms.Label l_ZeroFlowCal_ResttimeDisplayValue;
|
||||
private System.Windows.Forms.Panel p_ZeroFlowCal_Offset;
|
||||
private System.Windows.Forms.Label l_ZeroFlowCal_Offset;
|
||||
private System.Windows.Forms.Label l_ZeroFlowCal_Resttime;
|
||||
private System.Windows.Forms.Panel p_ZeroFlowCal_Detect;
|
||||
private System.Windows.Forms.Label l_ZeroFlowCal_Detect;
|
||||
private System.Windows.Forms.Panel p_ZeroFlowCal_TempCal;
|
||||
private System.Windows.Forms.Label l_ZeroFlowCal_TempCal;
|
||||
private System.Windows.Forms.Panel p_ZeroFlowCal_Prepare;
|
||||
private System.Windows.Forms.Label l_ZeroFlowCal_Prepare;
|
||||
private System.Windows.Forms.Panel p_ZeroFlowCal_Amplitude;
|
||||
private System.Windows.Forms.Label l_ZeroFlowCal_Amplitude;
|
||||
private System.Windows.Forms.Button btn_ZeroFlowCal_Abort;
|
||||
private System.Windows.Forms.Button btn_ZeroFlowCal_Start;
|
||||
private System.Windows.Forms.Button btn_ZeroFlowCal_Pdf;
|
||||
private System.Windows.Forms.Button btn_ZeroFlowCal_Save;
|
||||
private System.Windows.Forms.Button btn_ZeroFlowCal_Clear;
|
||||
private System.Windows.Forms.Button btn_ZeroFlowCal_Detect;
|
||||
private System.Windows.Forms.GroupBox gB_TempMeters;
|
||||
private System.Windows.Forms.CheckBox cB_ZeroFlowOffsetTestEnable;
|
||||
private System.Windows.Forms.CheckBox cB_TempCalEnable;
|
||||
private System.Windows.Forms.CheckBox cB_AmplitudeTestEnable;
|
||||
private System.Windows.Forms.Button btn_StoreTempe;
|
||||
private System.Windows.Forms.GroupBox gB_MeterLog;
|
||||
private System.Windows.Forms.RichTextBox rTB_ZeroFlowCalMeter;
|
||||
private System.Windows.Forms.ProgressBar pB_ZeroFlowCal_SubProgress;
|
||||
private System.Windows.Forms.Label l_ZeroFlowCal_SubResttimeDisplayValue;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Button btn_ShowAll;
|
||||
private System.Windows.Forms.RichTextBox rTB_ZeroFlowCal;
|
||||
private System.Windows.Forms.Label l_SettingsPreparationMetersize;
|
||||
private System.Windows.Forms.ComboBox cb_Metersize;
|
||||
private System.Windows.Forms.Label lblBuildDate;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,139 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||
|
||||
namespace CordonelPreadjustmentUi
|
||||
{
|
||||
public class PreAdjustmentSettingsContainer
|
||||
{
|
||||
#region prep
|
||||
public Int32 CalFactor1 { get; internal set; } = 15625;
|
||||
public Int32 CalFactor2 { get; internal set; } = 15625;
|
||||
public Int32 CalFactor3 { get; internal set; } = 15625;
|
||||
public Int32 ZeroOffset1 { get; internal set; } = 0;
|
||||
public Int32 ZeroOffset2 { get; internal set; } = 0;
|
||||
public Int32 ZeroOffset3 { get; internal set; } = 0;
|
||||
public Int32 Samplerate { get; internal set; } = 10;
|
||||
public MeterSize MeterSize { get; internal set; } = MeterSize.DN50;
|
||||
public LedMode LedMode { get; internal set; } = LedMode.CalibData;
|
||||
#endregion
|
||||
|
||||
#region ProcessesEnabled
|
||||
//todo read from checkbox
|
||||
public bool doOffsetTest { get; internal set; } = true;
|
||||
public bool doAmplTest { get; internal set; } = true;
|
||||
#endregion
|
||||
|
||||
#region TempControl
|
||||
public Double UpperTempLimit { get; internal set; } = 35;
|
||||
public Double LowerTempLimit { get; internal set; } = 15;
|
||||
public Double TempDeviationLimit { get; internal set; } = 1;
|
||||
#endregion
|
||||
#region AmpTest
|
||||
public Int32 AmpTestTofRecordingTime { get; internal set; } = 6;
|
||||
public Double AmpTestTriggerValue { get; internal set; } = 0.5;
|
||||
public bool AmpTestGenerateLogfiles { get; internal set; } = true;
|
||||
public bool AmpTestGenerateMeanValuesFile { get; internal set; } = true;
|
||||
public Int32 AmpTestFirstHitLevelPropMin { get; internal set; } = 12;//(Int32)nUD_Settings_AmplitudeTestLowerLimit.Value,
|
||||
public Int32 AmpTestFirstHitLevelPropMax { get; internal set; } = 32;//(Int32)nUD_Settings_AmplitudeTestUpperLimit.Value,
|
||||
public Int32 AmpTestAmpTestDistance { get; internal set; } = 7;//(Int32)nUD_Settings_AmplitudeTestMinDistance.Value
|
||||
public Int32 AmpTestPercentageStart { get; internal set; } = 5;//(Int32)nUD_Settings_AmplitudeTestMinDistance.Value
|
||||
public Int32 AmpTestPercentageStop { get; internal set; } = 35;//(Int32)nUD_Settings_AmplitudeTestMinDistance.Value
|
||||
public Int32 AmpTestActivityCheckInverval { get; internal set; } = 6;//(Int32)nUD_Settings_AmplitudeTestMinDistance.Value
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region OffsetTest
|
||||
|
||||
public bool OffsetTestGenerateLogfiles { get; internal set; } = true;
|
||||
public Int32 OffsetTestUpperVoltageLimitMV { get; internal set; } = 650;//(Int32)nUD_Settings_AmplitudeTestLowerLimit.Value,
|
||||
public Int32 OffsetTestLowerVoltageLimitMV { get; internal set; } = 200;//(Int32)nUD_Settings_AmplitudeTestUpperLimit.Value,
|
||||
public Int32 OffsetTestOffsetLimitPS { get; internal set; } = 300;//(Int32)nUD_Settings_AmplitudeTestMinDistance.Value
|
||||
public Int32 OffsetTestSettlingTime { get; internal set; } = 60;//(Int32)nUD_Settings_AmplitudeTestMinDistance.Value
|
||||
public Int32 OffsetTestNumberOfLines { get; internal set; } = 9000;
|
||||
public Int32 OffsetTestActivityCheckInverval { get; internal set; } = 2;
|
||||
|
||||
public Int32 OffsetTestBadDataLimit { get; internal set; } = 3;
|
||||
#endregion
|
||||
|
||||
|
||||
private string CultureStr;
|
||||
public List<Int32> TempMeters = new List<Int32>() { 1,10 };
|
||||
public List<Int32> Meters = new List<Int32>() { 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
|
||||
public CultureInfo Culture
|
||||
{
|
||||
get { return CultureInfo.CreateSpecificCulture(CultureStr); }
|
||||
set { CultureStr = value.Name; }
|
||||
}
|
||||
|
||||
public Int32 NumberOfPaths { get; internal set; }
|
||||
public bool TempOnly { get; internal set; } = false;
|
||||
public bool TempMan { get; internal set; } = false;
|
||||
|
||||
public PreAdjustmentSettingsContainer(int numberOfPaths = 3, Int32[] meters = null, string cultureStr = "de-DE", Int32[] tempMeters = null, MeterSize meterSize = MeterSize.DN50, Double upperTempLimit = 35, Double lowerTempLimit = 15, Double tempDeviationLimit = 1, Int32 ampTestTofRecordingTime = 2, Double ampTestTriggerValue = 0.5, bool ampTestGenerateLogfiles = true, bool ampTestGenerateMeanValuesFile = true, Int32 ampTestFirstHitLevelPropMin = 12, Int32 ampTestFirstHitLevelPropMax = 32, Int32 ampTestAmpTestDistance = 7, Int32 ampTestPercentageStart = 5, Int32 ampTestPercentageStop = 35, Int32 ampTestActivityCheckInverval = 6, bool offsetTestGenerateLogfiles = true, Int32 offsetTestUpperVoltageLimitMV = 650, Int32 offsetTestLowerVoltageLimitMV = 200, Int32 offsetTestOffsetLimitPS = 300, Int32 offsetTestSettlingTime = 60, Int32 offsetTestZeroflowOffsetTestNumberOfLines = 9000, Int32 offsetTestActivityCheckInverval = 2, Int32 offsetTestBadDataLimit = 3, Int32 samplerate = 16)
|
||||
{
|
||||
NumberOfPaths = numberOfPaths;
|
||||
|
||||
CultureStr = cultureStr;//"en-US"
|
||||
MeterSize = meterSize;
|
||||
if (meters != null)
|
||||
{
|
||||
Meters = meters.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
Meters = new List<int>() { 2, 3, 4, 5, 6, 7, 8, 9 };
|
||||
}
|
||||
if (tempMeters != null)
|
||||
{
|
||||
TempMeters = tempMeters.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
TempMeters = new List<int>() { 1, 10 };
|
||||
}
|
||||
UpperTempLimit = upperTempLimit;
|
||||
LowerTempLimit = lowerTempLimit;
|
||||
TempDeviationLimit = tempDeviationLimit;
|
||||
AmpTestTofRecordingTime = ampTestTofRecordingTime;
|
||||
AmpTestTriggerValue = ampTestTriggerValue;
|
||||
AmpTestGenerateLogfiles = ampTestGenerateLogfiles;
|
||||
AmpTestGenerateMeanValuesFile = ampTestGenerateMeanValuesFile;
|
||||
AmpTestFirstHitLevelPropMin = ampTestFirstHitLevelPropMin;
|
||||
AmpTestFirstHitLevelPropMax = ampTestFirstHitLevelPropMax;
|
||||
AmpTestAmpTestDistance = ampTestAmpTestDistance;
|
||||
AmpTestPercentageStart = ampTestPercentageStart;
|
||||
AmpTestPercentageStop = ampTestPercentageStop;
|
||||
AmpTestActivityCheckInverval = ampTestActivityCheckInverval;
|
||||
OffsetTestGenerateLogfiles = offsetTestGenerateLogfiles;
|
||||
OffsetTestUpperVoltageLimitMV = offsetTestUpperVoltageLimitMV;
|
||||
OffsetTestLowerVoltageLimitMV = offsetTestLowerVoltageLimitMV;
|
||||
OffsetTestOffsetLimitPS = offsetTestOffsetLimitPS;
|
||||
OffsetTestSettlingTime = offsetTestSettlingTime;
|
||||
OffsetTestNumberOfLines = offsetTestZeroflowOffsetTestNumberOfLines;
|
||||
OffsetTestActivityCheckInverval = offsetTestActivityCheckInverval;
|
||||
OffsetTestBadDataLimit = offsetTestBadDataLimit;
|
||||
Samplerate = samplerate;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (var p in this.GetType().GetProperties().Where(p => !p.GetGetMethod().GetParameters().Any()))
|
||||
{
|
||||
sb.Append($"{p.Name}={p.GetValue(this, null).ToString()}");
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,540 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Eventing.Reader;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using System.Threading;
|
||||
using static CordonelPreadjustmentUi.PreAdjustmentControl;
|
||||
using System.Threading.Tasks;
|
||||
using CordonelPreadjustmentUi.Helper;
|
||||
using CordonelPreadjustmentUi.Const;
|
||||
using CordonelPreadjustmentUi.Helper.Extensions;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
{
|
||||
public class AmplitudeTestProcess : BaseProcess
|
||||
{
|
||||
public AmplitudeTestProcess(string processName, StatusPanelItems panelState, string performMessage, string failedMessage, int? expectedTimeS) : base(processName, panelState, performMessage, failedMessage, expectedTimeS)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<Task> StartWork()
|
||||
{
|
||||
return doWorkProcess(base.CurrentProcessProgress);
|
||||
}
|
||||
|
||||
private List<Task> doWorkProcess(ProcessProgress pp)
|
||||
{
|
||||
var MetersToProcess = MeterStateCtls.Where(e => e.IsEnabled).ToList();
|
||||
|
||||
var listOfProcessTask = new List<Task>();
|
||||
|
||||
foreach (var meterctl in MetersToProcess)
|
||||
{
|
||||
listOfProcessTask.Add(new Task<bool>(() =>
|
||||
{
|
||||
|
||||
pp.DebugMessage($"Performing {ProcessName} procedure", null , "CC");
|
||||
|
||||
#region Definitions and initializations
|
||||
const Int32 FirstHitShiftValue = 4;
|
||||
const Int32 FirstHitShiftValueEnd = 4;
|
||||
const Int32 FirstHitUpdatePeriodeValue = 1;
|
||||
const Int32 FirstHitUpdatePeriodeValueEnd = 10;
|
||||
const Int32 WaitBeforeLogging = 5;
|
||||
String DebugMessage = String.Empty;
|
||||
|
||||
var TofAvgMean = new MultiPathDataLogContainer<Double>(pp.Setting.NumberOfPaths);
|
||||
var OptimalPoint = new MultiPathDataLogContainer<Int32>(pp.Setting.NumberOfPaths);
|
||||
var TofAvgMeanTotal = new MultiPathDataLogContainer<List<Double>>(pp.Setting.NumberOfPaths);
|
||||
TofAvgMeanTotal.Update(null,new List<Double>());
|
||||
|
||||
Boolean Ok = false;
|
||||
#endregion
|
||||
#region StartLogging
|
||||
if (pp.Setting.AmpTestGenerateLogfiles)
|
||||
{
|
||||
String time = System.DateTime.Now.ToString(Formats.LogFileDateTimeString);
|
||||
String Header = $"Genesis ZeroFlowOffsetCalibration {meterctl.Meter.Slot}; PCB ID = {meterctl.Meter.PcbId}; Date = {time}; Operator = {Environment.UserName}\n";
|
||||
meterctl.Meter.DataLog(Header);
|
||||
//GenesisZeroFlow._GenesisZeroFlow.SetLoggingPathAmplitudeTest(this.MeterNumber, $"{DataLogging.DefaultPath}AmplitudeTest_RawData_{TempPcbID}_{time}.txt");
|
||||
meterctl.Meter.logAmpTest = true;
|
||||
pp.DebugMessage($" Start logging", meterctl.Meter.Slot, "DC",meterctl.Meter.PcbId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Ok = false;
|
||||
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "First hit update period", Register.Genesisflow.FirstHitUpdatePeriod, FirstHitUpdatePeriodeValue);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
|
||||
pp.StatusLabel = (PredefinedMessages.WaitUntilRegisterWriteFinished(pp.Setting.Culture));
|
||||
Ok = false;
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "WorkAround TriggerIdle", Register.Genesisflow.TriggerIdle, 1, false);
|
||||
Thread.Sleep(150);
|
||||
|
||||
pp.StatusLabel = (PredefinedMessages.WaitUntilRegisterWriteFinished(pp.Setting.Culture));
|
||||
Ok = false;
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "first hit shift", Register.Genesisflow.FirstHitShift, FirstHitShiftValueEnd);
|
||||
|
||||
Thread.Sleep(150);
|
||||
pp.StatusLabel = (PredefinedMessages.WaitUntilRegisterWriteFinished(pp.Setting.Culture));
|
||||
Ok = false;
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "WorkAround TriggerActive", Register.Genesisflow.TriggerActive, 1, false);
|
||||
Thread.Sleep(150);
|
||||
|
||||
#region Set first hit level percentage from 5 to 35
|
||||
pp.DebugMessage($"Start first hit level percentage sweep ", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
for (Int32 FirstHitLevelPercentage = pp.Setting.AmpTestPercentageStart; FirstHitLevelPercentage <= pp.Setting.AmpTestPercentageStop; FirstHitLevelPercentage++)
|
||||
{
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
|
||||
pp.StatusLabel = $"{PredefinedMessages.WaitUntilPercentageSweepFinished(pp.Setting.Culture)} {FirstHitLevelPercentage.ToString(pp.Setting.Culture)}/{pp.Setting.AmpTestPercentageStop.ToString(pp.Setting.Culture)}";
|
||||
#region Write to percentage register PATH0
|
||||
|
||||
Ok = false;
|
||||
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Percentage", Register.Genesisflow.FirstHitPercent1, FirstHitLevelPercentage);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
#endregion
|
||||
#region Write to percentage register PATH1
|
||||
if (pp.Setting.NumberOfPaths > 1)
|
||||
{
|
||||
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Percentage", Register.Genesisflow.FirstHitPercent2, FirstHitLevelPercentage);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
#endregion
|
||||
#region Write to percentage register PATH2
|
||||
if (pp.Setting.NumberOfPaths > 2)
|
||||
{
|
||||
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Percentage", Register.Genesisflow.FirstHitPercent3, FirstHitLevelPercentage);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
#endregion
|
||||
#region Wait for 1 second
|
||||
for (Int32 i = 0; i < WaitBeforeLogging; i++)
|
||||
{
|
||||
Thread.Sleep(200);
|
||||
}
|
||||
#endregion
|
||||
#region Record TOF
|
||||
|
||||
|
||||
Ok = RecordData(pp, meterctl, Ok, FirstHitLevelPercentage);
|
||||
|
||||
bool retryRecord = false;
|
||||
|
||||
for (UInt16 Path = 0; Path < meterctl.Meter.listOfTotalTimeOfFlightSPerPath.GetPathCount(); Path++)
|
||||
{
|
||||
if (!meterctl.Meter.listOfTotalTimeOfFlightSPerPath.Get(Path).Any())
|
||||
{
|
||||
pp.StatusLabel = $"No Data for Path {Path}. Start one recollect";
|
||||
|
||||
retryRecord = true;
|
||||
}
|
||||
|
||||
}
|
||||
if (retryRecord)
|
||||
{
|
||||
Ok = RecordData(pp, meterctl, Ok, FirstHitLevelPercentage);
|
||||
}
|
||||
|
||||
|
||||
pp.StatusLabel = $"{PredefinedMessages.WaitUntilPercentageSweepFinished(pp.Setting.Culture)} {FirstHitLevelPercentage.ToString(pp.Setting.Culture)}/{ pp.Setting.AmpTestPercentageStop.ToString(pp.Setting.Culture)}; 0s";
|
||||
Ok = true;
|
||||
#endregion
|
||||
#region Calculate mean value
|
||||
|
||||
|
||||
for (UInt16 Path = 0; Path < meterctl.Meter.listOfTotalTimeOfFlightSPerPath.GetPathCount(); Path++)
|
||||
{
|
||||
var meanVal = meterctl.Meter.listOfTotalTimeOfFlightSPerPath.Get(Path).ToList().Mean();
|
||||
pp.DebugMessage($"Calculate mean value {meanVal} at {meterctl.Meter.Slot}; PATH{(Path + 1).ToString(pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
//earlier TofAvgMeanTotal
|
||||
//TofAvgMean.Update(Path, meanVal);
|
||||
|
||||
if (meanVal == 0)
|
||||
{
|
||||
pp.DebugMessage($"Mean value is zero at {meterctl.Meter.Slot}; PATH{(Path + 1).ToString(pp.Setting.Culture)}; Value = {Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"" +
|
||||
$"PATH {Path + 1}", Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture));
|
||||
|
||||
if (CheckAbort(false, meterctl)) { return false; }
|
||||
}
|
||||
|
||||
pp.DebugMessage($"Mean value at {meterctl.Meter.Slot}; PATH{(Path + 1).ToString(pp.Setting.Culture)}; Value = {Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Amp. Test Mean value PATH {Path + 1}", $"at {FirstHitLevelPercentage}={Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}");
|
||||
var cTofAvgMeanTotal = TofAvgMeanTotal.Get(Path).ToList();
|
||||
|
||||
cTofAvgMeanTotal.Add(meanVal);
|
||||
TofAvgMeanTotal.Update(Path, cTofAvgMeanTotal);
|
||||
//meterctl.Meter.listOfTotalTimeOfFlightSPerPath.Update(Path,new List<Double>());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
#region Write raw data to files
|
||||
//if (this.GenerateLogFiles)
|
||||
//{
|
||||
// GenesisZeroFlow._GenesisZeroFlow.SetLoggingIndicatorAmpTest(this.MeterNumber, false);
|
||||
// String temp = GenesisZeroFlow._GenesisZeroFlow.GetDataToLog()[this.MeterNumber];
|
||||
// pp.DebugMessage =$"{meterctl.Meter.PcbId}\tAPPLICATION:\t\t Write data to files at {meterctl.Meter.Slot}\n";
|
||||
// Logging.WriteToFile(temp, GenesisZeroFlow._GenesisZeroFlow.GetLoggingPathAmplitudeTest()[this.MeterNumber]);
|
||||
//}
|
||||
#endregion
|
||||
#region Write mean values to file
|
||||
//String DateTime = System.DateTime.Now.ToString(Formats.LogFileDateTimeString;
|
||||
//if (this.GenerateMeanFiles)
|
||||
//{
|
||||
// for (UInt16 Path = Constants.PATH0; Path < Constants.NumberOfPaths; Path++)
|
||||
// Logging.WriteToFile(GenesisZeroFlow._GenesisZeroFlow.GetAmpValuesToLog()[this.MeterNumber][Constants.PATH0], $@"..\ZeroflowCalibrationTool_MeanAmplitude_{meterctl.Meter.Slot}_PATH{Path + 1}_{TempPcbID}_{DateTime}.csv");
|
||||
//}
|
||||
|
||||
|
||||
//this.ClearData();
|
||||
//#endregion
|
||||
#region Calculate optimal point
|
||||
|
||||
var DistanceLeft = new MultiPathDataLogContainer<double>(pp.Setting.NumberOfPaths);
|
||||
var DistanceRight = new MultiPathDataLogContainer<double>(pp.Setting.NumberOfPaths);
|
||||
|
||||
var CalculationFailed = new MultiPathDataLogContainer<bool>(pp.Setting.NumberOfPaths);
|
||||
|
||||
pp.DebugMessage($"Start calculating optimal points", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
|
||||
for (UInt16 Path = 0; Path < TofAvgMeanTotal.GetPathCount(); Path++)
|
||||
{
|
||||
var tmpOptimalPoint = 0;
|
||||
var tmpDistanceLeft = 0.0;
|
||||
var tmpDistanceRight = 0.0;
|
||||
|
||||
var r = CalculateOptimalPoint(pp, meterctl.Meter.Slot, TofAvgMeanTotal.Get(Path).ToList(),out tmpDistanceLeft, out tmpDistanceRight, out tmpOptimalPoint);
|
||||
OptimalPoint.Update(Path, tmpOptimalPoint);
|
||||
DistanceLeft.Update(Path, tmpDistanceLeft);
|
||||
DistanceRight.Update(Path, tmpDistanceRight);
|
||||
|
||||
CalculationFailed.Update(Path, r);
|
||||
|
||||
if (!r)
|
||||
{
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Amp. Test OptimalPoint PATH {Path + 1}", OptimalPoint.Get(Path).ToString(pp.Setting.Culture));
|
||||
pp.DebugMessage($"Optimal point calculation successful PATH{Path + 1}; Value = {OptimalPoint.Get(Path).ToString(pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
}
|
||||
else
|
||||
{
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Amp. Test OptimalPoint PATH {Path + 1}", "NaN");
|
||||
pp.DebugMessage($"Optimal point calculation failed, PATH{Path + 1}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
if (CheckAbort(!r, meterctl)) { return !r; }
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region Check value
|
||||
pp.DebugMessage($"Start optimal point values check", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
|
||||
Boolean OptimalPointOK = true;
|
||||
for (UInt16 Path = 0; Path < OptimalPoint.GetPathCount(); Path++)
|
||||
{
|
||||
if (!this.CheckOptimalPoint(pp,OptimalPoint.Get(Path), out DebugMessage, meterctl.Meter.Slot))
|
||||
OptimalPointOK = false;
|
||||
|
||||
pp.DebugMessage($"{DebugMessage}, PATH{Path + 1}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
}
|
||||
|
||||
if (CheckAbort(OptimalPointOK, meterctl)) { return OptimalPointOK; }
|
||||
#endregion
|
||||
#region Check distance
|
||||
Boolean CheckDistOK = true;
|
||||
for (UInt16 Path = 0; Path < DistanceLeft.GetPathCount(); Path++)
|
||||
{
|
||||
if (!this.CheckDistance(pp,DistanceLeft.Get(Path), DistanceRight.Get(Path), out DebugMessage, meterctl.Meter.Slot ))
|
||||
CheckDistOK = false;
|
||||
|
||||
pp.DebugMessage($"{DebugMessage}, PATH{Path + 1}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
}
|
||||
if (CheckAbort(CheckDistOK, meterctl)) { return CheckDistOK; }
|
||||
|
||||
#endregion
|
||||
#region Set first hit level percentage registers
|
||||
pp.DebugMessage($"Start writing to percentage registers", meterctl.Meter.Slot, "CC", meterctl.Meter.PcbId);
|
||||
for (UInt16 Path = 0; Path < OptimalPoint.GetPathCount(); Path++)
|
||||
{
|
||||
pp.StatusLabel = ($"{PredefinedMessages.WaitUntilRegisterWriteFinished(pp.Setting.Culture)}");
|
||||
Ok = false;
|
||||
String RegValue = String.Empty;
|
||||
switch (Path)
|
||||
{
|
||||
case 0:
|
||||
RegValue = Register.Genesisflow.FirstHitPercent1;
|
||||
break;
|
||||
case 1:
|
||||
RegValue = Register.Genesisflow.FirstHitPercent2;
|
||||
break;
|
||||
case 2:
|
||||
RegValue = Register.Genesisflow.FirstHitPercent3;
|
||||
break;
|
||||
default:
|
||||
RegValue = Register.Genesisflow.FirstHitPercent1;
|
||||
break;
|
||||
};
|
||||
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Percentage", RegValue, OptimalPoint.Get(Path));
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
//here
|
||||
|
||||
#region Set first hit update period to 10
|
||||
pp.StatusLabel = (PredefinedMessages.WaitUntilRegisterWriteFinished(pp.Setting.Culture));
|
||||
Ok = false;
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "first hit update period", Register.Genesisflow.FirstHitUpdatePeriod, FirstHitUpdatePeriodeValueEnd);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
#endregion
|
||||
|
||||
#region Wait for 1 second
|
||||
for (Int32 i = 0; i < WaitBeforeLogging; i++)
|
||||
{
|
||||
Thread.Sleep(300);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region Set first hit shift to 4
|
||||
//Frost, Alex <AFrost@sentec.co.uk> Do 02.07.2020 17:12
|
||||
//RE: Writing 4 to 'First hit shift'-register failed
|
||||
//I think a workaround would be to go into idle mode before changing this register then back to active mode after.I haven’t tried this out yet
|
||||
pp.StatusLabel = (PredefinedMessages.WaitUntilRegisterWriteFinished(pp.Setting.Culture));
|
||||
Ok = false;
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "WorkAround TriggerIdle", Register.Genesisflow.TriggerIdle, 1, false);
|
||||
Thread.Sleep(150);
|
||||
pp.StatusLabel = (PredefinedMessages.WaitUntilRegisterWriteFinished(pp.Setting.Culture));
|
||||
Ok = false;
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "first hit shift", Register.Genesisflow.FirstHitShift, FirstHitShiftValueEnd);
|
||||
Thread.Sleep(150);
|
||||
pp.StatusLabel = (PredefinedMessages.WaitUntilRegisterWriteFinished(pp.Setting.Culture));
|
||||
Ok = false;
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "WorkAround TriggerActive", Register.Genesisflow.TriggerActive, 1, false);
|
||||
Thread.Sleep(150);
|
||||
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
#endregion
|
||||
#endregion
|
||||
return Ok;
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
|
||||
return listOfProcessTask;
|
||||
|
||||
}
|
||||
|
||||
private bool RecordData(ProcessProgress pp, MeterStateControl meterctl, bool Ok, int FirstHitLevelPercentage)
|
||||
{
|
||||
meterctl.Meter.listOfTotalTimeOfFlightSPerPath.Update(null, new List<Double>());
|
||||
meterctl.Meter.logAmpTest = true;
|
||||
|
||||
pp.DebugMessage($"Start collecting data", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
var LinecounterFollowing = new MultiPathDataLogContainer<Int32>(pp.Setting.NumberOfPaths);
|
||||
|
||||
|
||||
for (Int32 Seconds = 0; Seconds < pp.Setting.AmpTestTofRecordingTime; Seconds++) // eight seconds remove /2
|
||||
{
|
||||
if (Int32.Equals((Seconds % pp.Setting.AmpTestActivityCheckInverval), 0))
|
||||
{
|
||||
pp.StatusLabel = $"{PredefinedMessages.WaitUntilPercentageSweepFinished(pp.Setting.Culture)} {FirstHitLevelPercentage.ToString(pp.Setting.Culture)}/{ pp.Setting.AmpTestPercentageStop.ToString(pp.Setting.Culture)}; {(pp.Setting.AmpTestTofRecordingTime - Seconds).ToString(pp.Setting.Culture)}s";
|
||||
|
||||
Thread.Sleep(1000);
|
||||
Ok = ActivityCheck(pp, meterctl.Meter.listOfTotalTimeOfFlightSPerPath, pp.Setting.AmpTestTofRecordingTime);
|
||||
if (!Ok)
|
||||
{
|
||||
pp.DebugMessage($"Activity check failed", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
// if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return Ok;
|
||||
}
|
||||
|
||||
private Boolean CalculateOptimalPoint(ProcessProgress pp,int Slot, List<Double> TofAvg, out Double left, out Double right, out Int32 xAtOptimalPoint)
|
||||
{
|
||||
|
||||
List<Double> ValuesLeft = new List<Double>();
|
||||
List<Double> ValuesRight = new List<Double>();
|
||||
List<Double> MinDistance = new List<Double>();
|
||||
xAtOptimalPoint = 0;
|
||||
Boolean SubError = true;
|
||||
left = 0;
|
||||
right = 0;
|
||||
|
||||
ValuesLeft = this.CalculateNearestDistanceLeft(pp,TofAvg, out left);
|
||||
ValuesRight = this.CalculateNearestDistanceRight(pp,TofAvg, out right);
|
||||
|
||||
for (UInt16 i = 0; i < ValuesLeft.Count(); i++)
|
||||
{
|
||||
Double temp1 = ValuesLeft.ElementAt(i);
|
||||
Double temp2 = ValuesRight.ElementAt(i);
|
||||
Thread.Sleep(10);
|
||||
MinDistance.Add(Math.Min(temp1, temp2));
|
||||
}
|
||||
|
||||
//String mindistance = $"mindistance: PATH{path.ToString(GlobalCulture)}\n";
|
||||
//for (Int16 i = 0; i < MinDistance.Count(); i++)
|
||||
//{
|
||||
// Double temp = MinDistance.ElementAt(i);
|
||||
// Misc.WaitNMilliseconds(10);
|
||||
// mindistance = $"{mindistance}{temp.ToString(GlobalCulture)}\n";
|
||||
//}
|
||||
//Logging.WriteToFile(mindistance, @"..\mindistance_PATH"+ path.ToString() + ".txt");
|
||||
|
||||
Double Maximum = 0;
|
||||
|
||||
for (Int16 i = 0; i < MinDistance.Count(); i++)
|
||||
{
|
||||
if ((!Int16.Equals(i, 0)) && (!Int16.Equals(i, (Int16)(TofAvg.Count() - 1))))
|
||||
{
|
||||
if (MinDistance.ElementAt(i) > Maximum)
|
||||
{
|
||||
Maximum = MinDistance.ElementAt(i);
|
||||
xAtOptimalPoint = (Int32)i + pp.Setting.AmpTestPercentageStart;
|
||||
;
|
||||
SubError = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return SubError;
|
||||
}
|
||||
private List<Double> CalculateNearestDistanceLeft(ProcessProgress pp, List<Double> TofAvg, out Double left)
|
||||
{
|
||||
List<Double> Distance = new List<Double>();
|
||||
Double NearestDistance = 0;
|
||||
Boolean Detected = false;
|
||||
left = 0;
|
||||
|
||||
for (Int32 Percentage = pp.Setting.AmpTestFirstHitLevelPropMin; Percentage <= pp.Setting.AmpTestFirstHitLevelPropMax ; Percentage++)
|
||||
{
|
||||
Detected = false;
|
||||
for (Int32 PercentageFollowing = Percentage; PercentageFollowing <= pp.Setting.AmpTestFirstHitLevelPropMax; PercentageFollowing++)
|
||||
{
|
||||
if ((TofAvg.ElementAt(PercentageFollowing - pp.Setting.AmpTestFirstHitLevelPropMin) - TofAvg.ElementAt(Percentage - pp.Setting.AmpTestFirstHitLevelPropMin)) > pp.Setting.AmpTestTriggerValue)
|
||||
{
|
||||
NearestDistance = PercentageFollowing - Percentage;
|
||||
Detected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!Detected)
|
||||
NearestDistance = pp.Setting.AmpTestFirstHitLevelPropMax - Percentage;
|
||||
|
||||
Distance.Add(NearestDistance);
|
||||
}
|
||||
|
||||
for (Int16 i = 0; i < (Int16)Distance.Count(); i++)
|
||||
{
|
||||
if (Distance.ElementAt(i) >= left)
|
||||
{
|
||||
left = Distance.ElementAt(i);
|
||||
}
|
||||
}
|
||||
return Distance;
|
||||
}
|
||||
private List<Double> CalculateNearestDistanceRight(ProcessProgress pp, List<Double> TofAvg, out Double right)
|
||||
{
|
||||
List<Double> Distance = new List<Double>();
|
||||
Double NearestDistance = 0;
|
||||
Boolean Detected = false;
|
||||
right = 0;
|
||||
|
||||
for (Int32 Percentage = pp.Setting.AmpTestFirstHitLevelPropMax; Percentage >= (pp.Setting.AmpTestFirstHitLevelPropMin); Percentage--)
|
||||
{
|
||||
Detected = false;
|
||||
|
||||
for (Int32 ProportionFollowing = Percentage; ProportionFollowing >= pp.Setting.AmpTestFirstHitLevelPropMin; ProportionFollowing--)
|
||||
{
|
||||
if ((TofAvg.ElementAt(ProportionFollowing - pp.Setting.AmpTestFirstHitLevelPropMin)) - (TofAvg.ElementAt(Percentage - pp.Setting.AmpTestFirstHitLevelPropMin)) < -pp.Setting.AmpTestTriggerValue)
|
||||
{
|
||||
NearestDistance = Percentage - ProportionFollowing;
|
||||
Detected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Detected)
|
||||
NearestDistance = Percentage - pp.Setting.AmpTestFirstHitLevelPropMin;
|
||||
|
||||
Distance.Add(NearestDistance);
|
||||
}
|
||||
|
||||
|
||||
Distance.Reverse();
|
||||
|
||||
for (Int16 i = 0; i < Distance.Count(); i++)
|
||||
{
|
||||
if (Distance.ElementAt(i) >= right)
|
||||
{
|
||||
right = Distance.ElementAt(i);
|
||||
}
|
||||
}
|
||||
return Distance;
|
||||
}
|
||||
private Boolean CheckOptimalPoint(ProcessProgress pp, Int32 optimalPoint, out String debugMessage, int Slot)
|
||||
{
|
||||
Boolean Ok = true;
|
||||
debugMessage = $"Optimal point check successful at {Slot}";
|
||||
// ampTestLowerLimit, ampTestUpperLimit, ampTestDistance
|
||||
if (optimalPoint > pp.Setting.AmpTestFirstHitLevelPropMax)
|
||||
{
|
||||
debugMessage = $"Optimal point maximum check failed at {Slot}";
|
||||
Ok = false;
|
||||
return Ok;
|
||||
}
|
||||
|
||||
if (optimalPoint < pp.Setting.AmpTestFirstHitLevelPropMin)
|
||||
{
|
||||
debugMessage = $"Optimal point minimum check failed at {Slot}";
|
||||
Ok = false;
|
||||
return Ok;
|
||||
}
|
||||
|
||||
return Ok;
|
||||
}
|
||||
private Boolean CheckDistance(ProcessProgress pp,Double left, Double right, out String debugMessage, int Slot)
|
||||
{
|
||||
Boolean Ok = true;
|
||||
debugMessage = $"Distance check successful at {Slot}";
|
||||
|
||||
if (left < pp.Setting.AmpTestFirstHitLevelPropMin)
|
||||
{
|
||||
Ok = false;
|
||||
debugMessage = $"Distance check failed at {Slot}";
|
||||
return Ok;
|
||||
}
|
||||
|
||||
if (right < pp.Setting.AmpTestFirstHitLevelPropMin)
|
||||
{
|
||||
Ok = false;
|
||||
debugMessage = $"Distance check failed at {Slot}";
|
||||
return Ok;
|
||||
}
|
||||
|
||||
return Ok;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using Xylem.Common.CommonCore.Configuration;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using static CordonelPreadjustmentUi.PreAdjustmentControl;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
{
|
||||
public class CompletionProcess : BaseProcess
|
||||
{
|
||||
|
||||
public CompletionProcess(string processName, StatusPanelItems panelState, string performMessage, string failedMessage, int? expectedTimeS) : base(processName, panelState, performMessage, failedMessage, expectedTimeS)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<Task> StartWork()
|
||||
{
|
||||
return doWorkProcess(base.CurrentProcessProgress);
|
||||
}
|
||||
|
||||
private List<Task> doWorkProcess(ProcessProgress pp)
|
||||
{
|
||||
var MetersToProcess = MeterStateCtls.Where(e => e.IsEnabled).ToList();
|
||||
|
||||
var listOfProcessTask = new List<Task>();
|
||||
|
||||
foreach (var meterctl in MetersToProcess)
|
||||
{
|
||||
listOfProcessTask.Add(new Task<bool>(() =>
|
||||
{
|
||||
var Result = true;
|
||||
pp.DebugMessage($"Performing {ProcessName} procedure", null, "APP");
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
var Ok = false;
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, $"Samplerate", Register.Genesisflow.SampleRate, 10);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, $"LED mode", Register.Genesisflow.LedMode, (Byte)6);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, $"Store calibration", Register.Genesisflow.StoreCalibration, 1, false);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
pp.DebugMessage($"Read out", meterctl.Slot, "CC");
|
||||
|
||||
|
||||
|
||||
|
||||
var readsOk = new List<bool>();
|
||||
byte[] retByte;
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "MeterSize", Register.Genesisflow.MeterSize, out retByte));
|
||||
meterctl.Meter.calibrationResult.MeterSize = RegisterConverter.ConvertTo<ushort>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "CalFactor1", Register.Genesisflow.CalFactor1, out retByte));
|
||||
meterctl.Meter.calibrationResult.CalFactor1 = RegisterConverter.ConvertTo<uint>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "CalFactor2", Register.Genesisflow.CalFactor2, out retByte));
|
||||
meterctl.Meter.calibrationResult.CalFactor2 = RegisterConverter.ConvertTo<uint>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "CalFactor3", Register.Genesisflow.CalFactor3, out retByte));
|
||||
meterctl.Meter.calibrationResult.CalFactor3 = RegisterConverter.ConvertTo<uint>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "ZeroOffset1", Register.Genesisflow.ZeroOffset1, out retByte));
|
||||
meterctl.Meter.calibrationResult.ZeroOffset1 = RegisterConverter.ConvertTo<int>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "ZeroOffset2", Register.Genesisflow.ZeroOffset2, out retByte));
|
||||
meterctl.Meter.calibrationResult.ZeroOffset2 = RegisterConverter.ConvertTo<int>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "ZeroOffset3", Register.Genesisflow.ZeroOffset3, out retByte));
|
||||
meterctl.Meter.calibrationResult.ZeroOffset3 = RegisterConverter.ConvertTo<int>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "FirstHitUpdatePeriod", Register.Genesisflow.FirstHitUpdatePeriod, out retByte));
|
||||
meterctl.Meter.calibrationResult.FirstHitUpdatePeriod = RegisterConverter.ConvertTo<ushort>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "FirstHitShift", Register.Genesisflow.FirstHitShift, out retByte));
|
||||
meterctl.Meter.calibrationResult.FirstHitShift = RegisterConverter.ConvertTo<ushort>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "FirstHitPercent1", Register.Genesisflow.FirstHitPercent1, out retByte));
|
||||
meterctl.Meter.calibrationResult.FirstHitPercent1 = RegisterConverter.ConvertTo<ushort>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "FirstHitPercent2", Register.Genesisflow.FirstHitPercent2, out retByte));
|
||||
meterctl.Meter.calibrationResult.FirstHitPercent2 = RegisterConverter.ConvertTo<ushort>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "FirstHitPercent3", Register.Genesisflow.FirstHitPercent3, out retByte));
|
||||
meterctl.Meter.calibrationResult.FirstHitPercent3 = RegisterConverter.ConvertTo<ushort>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "ToFTempOffset1", Register.Genesisflow.ToFTempOffset1, out retByte));
|
||||
meterctl.Meter.calibrationResult.ToFTempOffset1 = RegisterConverter.ConvertTo<int>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "ToFTempOffset2", Register.Genesisflow.ToFTempOffset2, out retByte));
|
||||
meterctl.Meter.calibrationResult.ToFTempOffset2 = RegisterConverter.ConvertTo<int>(retByte);
|
||||
readsOk.Add(ReadRegister(meterctl.Meter, "ToFTempOffset3", Register.Genesisflow.ToFTempOffset3, out retByte));
|
||||
meterctl.Meter.calibrationResult.ToFTempOffset3 = RegisterConverter.ConvertTo<int>(retByte);
|
||||
|
||||
if (readsOk.Any(a => !a))
|
||||
{
|
||||
Ok = false;
|
||||
}
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
|
||||
Exception exPost = new Exception();
|
||||
int code = 0;
|
||||
|
||||
var r = LocalWebRequest.PostRequestAsync($"{ServiceUrls.PostGenesisCalibrationResultUrl()}?PcbId={meterctl.Meter.PcbId}", ref code, ref exPost, 8000, meterctl.Meter.calibrationResult);
|
||||
if (!r)
|
||||
{
|
||||
meterctl.Meter.WriteLog($"Could not store CalibrationResults on server CODE {code}EX:{exPost} ");
|
||||
throw new Exception("Could not store CalibrationResults on server");
|
||||
}
|
||||
if (pp.IsAutomaticMode)
|
||||
{
|
||||
meterctl.Meter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.ZeroFlow);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
pp.DebugMessage($"Error on {ProcessName} procedure", null, "APP");
|
||||
pp.DebugMessage($"{e.Message}", null, "APP");
|
||||
}
|
||||
|
||||
var meterIndex = (meterctl.Slot).ToString(pp.Setting.Culture);
|
||||
meterctl.Failed = !Result;
|
||||
if (!Result)
|
||||
{
|
||||
if (pp.IsAutomaticMode)
|
||||
{
|
||||
meterctl.Meter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.ZeroFlowFailed);
|
||||
}
|
||||
pp.DebugMessage($"{ProcessName} procedure failed", meterctl.Slot, "APP", meterctl.Meter.PcbId);
|
||||
pp.GenerateReturnNote(PredefinedMessages.CompletionFailed(pp.Setting.Culture), meterctl);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
pp.DebugMessage($"{ProcessName} procedure successful", meterctl.Slot, "APP", meterctl.Meter.PcbId);
|
||||
if (pp.IsAutomaticMode)
|
||||
{
|
||||
meterctl.Meter.SetProcessState(Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts.DisplayCodes.ZeroFlow);
|
||||
}
|
||||
|
||||
}
|
||||
meterctl.Meter.PushProgress("CordonelPreadjustmentUi", Assembly.GetExecutingAssembly().GetName().Version.ToString());
|
||||
|
||||
return Result;
|
||||
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
|
||||
return listOfProcessTask;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Eventing.Reader;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using System.Threading;
|
||||
using static CordonelPreadjustmentUi.PreAdjustmentControl;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
{
|
||||
public class DemoProcess : BaseProcess
|
||||
{
|
||||
public DemoProcess(string processName, StatusPanelItems panelState, string performMessage, string failedMessage ) : base(processName, panelState, performMessage, failedMessage )
|
||||
{
|
||||
}
|
||||
|
||||
public override List<Task> StartWork()
|
||||
{
|
||||
return doWorkProcess(base.CurrentProcessProgress);
|
||||
}
|
||||
|
||||
private List<Task> doWorkProcess(ProcessProgress pp)
|
||||
{
|
||||
var MetersToProcess = MeterStateCtls.Where(e => e.IsEnabled).ToList();
|
||||
|
||||
var listOfProcessTask = new List<Task>();
|
||||
|
||||
foreach (var meterctl in MetersToProcess)
|
||||
{
|
||||
listOfProcessTask.Add(new Task<bool>(() =>
|
||||
{
|
||||
var Result = false;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
pp.DebugMessage = $"\tCOMMAND CHANNEL: \t Performing {ProcessName} procedure\n";
|
||||
|
||||
try
|
||||
{
|
||||
Result = string.IsNullOrEmpty(meterctl.OverridePassword)
|
||||
? meterctl.Meter.Login()
|
||||
: meterctl.Meter.Login(meterctl.OverridePassword);
|
||||
|
||||
if (Result)
|
||||
{
|
||||
break;
|
||||
}
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
pp.DebugMessage = $"\tCOMMAND CHANNEL: \t Error on {ProcessName} procedure\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var meterIndex = (meterctl.Slot).ToString(pp.Setting.Culture);
|
||||
meterctl.Failed = !Result;
|
||||
if (!Result)
|
||||
{
|
||||
pp.DebugMessage = $"\tCOMMAND CHANNEL: \t {ProcessName} procedure failed at METER{meterIndex}\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
pp.DebugMessage = $"\tCOMMAND CHANNEL: \t {ProcessName} procedure successful at METER{meterIndex}\n";
|
||||
pp.GenerateReturnNote($"{meterctl.Slot}", meterctl.Meter.PcbId, PredefinedMessages.LoginFailed(pp.Setting.Culture));
|
||||
}
|
||||
|
||||
return Result;
|
||||
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
|
||||
return listOfProcessTask;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Eventing.Reader;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using System.Threading;
|
||||
using static CordonelPreadjustmentUi.PreAdjustmentControl;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
{
|
||||
public class FlushProcess : BaseProcess
|
||||
{
|
||||
public FlushProcess(string processName, StatusPanelItems panelState, string performMessage, string failedMessage, int? expectedTimeS) : base(processName, panelState, performMessage, failedMessage, expectedTimeS)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<Task> StartWork()
|
||||
{
|
||||
return doWorkProcess(base.CurrentProcessProgress);
|
||||
}
|
||||
|
||||
private List<Task> doWorkProcess(ProcessProgress pp)
|
||||
{
|
||||
var MetersToProcess = MeterStateCtls.Where(e => e.IsEnabled).ToList();
|
||||
|
||||
var listOfProcessTask = new List<Task>();
|
||||
|
||||
listOfProcessTask.Add(new Task<bool>(() =>
|
||||
{
|
||||
pp.DebugMessage($"Performing {ProcessName} procedure", null, "APP");
|
||||
pp.RequestFlush(pp.Setting.MeterSize);
|
||||
var FlushTimeOut = DateTimeOffset.UtcNow.AddMinutes(5);
|
||||
|
||||
while (!pp.FlushDone)
|
||||
{
|
||||
if (FlushTimeOut < DateTimeOffset.UtcNow)
|
||||
{
|
||||
pp.DebugMessage($"Flush time out!", null, "APP");
|
||||
break;
|
||||
}
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
return true;
|
||||
}));
|
||||
|
||||
|
||||
return listOfProcessTask;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using static CordonelPreadjustmentUi.PreAdjustmentControl;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
{
|
||||
public class LoginProcess : BaseProcess
|
||||
{
|
||||
public LoginProcess(string processName, StatusPanelItems panelState, string performMessage, string failedMessage, int? expectedTimeS) : base(processName, panelState, performMessage, failedMessage, expectedTimeS)
|
||||
{
|
||||
}
|
||||
public override List<Task> StartWork()
|
||||
{
|
||||
return Login(base.CurrentProcessProgress);
|
||||
}
|
||||
|
||||
private List<Task> Login(ProcessProgress pp)
|
||||
{
|
||||
var MetersToProcess = MeterStateCtls.Where(e => e.IsEnabled).ToList();
|
||||
MetersToProcess.ForEach(lf => lf.LoginFailed = false);
|
||||
var listOfLoginTask = new List<Task>();
|
||||
|
||||
|
||||
foreach (var tempmeterctl in TempMeterStateCtls)
|
||||
{
|
||||
|
||||
listOfLoginTask.Add(new Task<bool>(() =>
|
||||
{
|
||||
|
||||
|
||||
if (!pp.Setting.TempMan)
|
||||
{
|
||||
pp.DebugMessage($"Load Temp {tempmeterctl.Slot} with {MeterStateControl.TempMode.CalcTof}\n");
|
||||
|
||||
tempmeterctl.StartTempWatch(MeterStateControl.TempMode.CalcTof);
|
||||
}
|
||||
else
|
||||
{
|
||||
pp.DebugMessage($"Load Temp {tempmeterctl.Slot} with {MeterStateControl.TempMode.Hand}\n");
|
||||
|
||||
tempmeterctl.StartTempWatch();
|
||||
}
|
||||
|
||||
tempmeterctl.SetTemperature(0);
|
||||
tempmeterctl.DisableTemperatureinput(true);
|
||||
return true;
|
||||
}));
|
||||
|
||||
}
|
||||
var delay = 1000;
|
||||
foreach (var meterctl in MetersToProcess)
|
||||
{
|
||||
listOfLoginTask.Add(new Task<bool>(() =>
|
||||
{
|
||||
Thread.Sleep(delay * listOfLoginTask.Count);
|
||||
var Result = false;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
pp.DebugMessage($"Performing {ProcessName} procedure\n");
|
||||
|
||||
try
|
||||
{
|
||||
Result = string.IsNullOrEmpty(meterctl.OverridePassword)
|
||||
? meterctl.Meter.Login()
|
||||
: meterctl.Meter.Login(meterctl.OverridePassword);
|
||||
if (Result)
|
||||
{
|
||||
break;
|
||||
}
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
pp.DebugMessage($"Error on {ProcessName} procedure\n");
|
||||
pp.DebugMessage($"Error {e.Message}\n");
|
||||
}
|
||||
}
|
||||
if (meterctl.Meter!= null)
|
||||
{
|
||||
meterctl.Meter.SerialNumber = meterctl.Srn;
|
||||
meterctl.Meter.CurrentActionText = "PreAdjustment";
|
||||
}
|
||||
|
||||
|
||||
|
||||
var meterIndex = (meterctl.Slot).ToString(pp.Setting.Culture);
|
||||
meterctl.LoginFailed = !Result;
|
||||
meterctl.Failed = !Result;
|
||||
if (!Result)
|
||||
{
|
||||
pp.DebugMessage($"{ProcessName} procedure failed", meterctl.Slot, "APP", meterctl.Meter.PcbId);
|
||||
//pp.GenerateReturnNote(PredefinedMessages.LoginFailed(pp.Setting.Culture), meterctl);
|
||||
}
|
||||
else
|
||||
{
|
||||
pp.DebugMessage($"{ProcessName} procedure successful", meterctl.Slot, "APP", meterctl.Meter.PcbId);
|
||||
}
|
||||
Thread.Sleep(delay);
|
||||
return Result;
|
||||
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
|
||||
return listOfLoginTask;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
using CordonelPreadjustmentUi.Helper;
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
using Xylem.Common.Ui.CordonelPreadjustmentUi.Helper.Extensions;
|
||||
using static CordonelPreadjustmentUi.PreAdjustmentControl;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
{
|
||||
public class OffsetTestProcess : BaseProcess
|
||||
{
|
||||
public OffsetTestProcess(string processName, StatusPanelItems panelState, string performMessage, string failedMessage, int? expectedTimeS) : base(processName, panelState, performMessage, failedMessage, expectedTimeS)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<Task> StartWork()
|
||||
{
|
||||
return doWorkProcess(base.CurrentProcessProgress);
|
||||
}
|
||||
|
||||
private List<Task> doWorkProcess(ProcessProgress pp)
|
||||
{
|
||||
var MetersToProcess = MeterStateCtls.Where(e => e.IsEnabled).ToList();
|
||||
|
||||
var listOfProcessTask = new List<Task>();
|
||||
|
||||
|
||||
listOfProcessTask.Add(new Task<bool>(() =>
|
||||
{
|
||||
|
||||
#region Wait for settling time (60s)
|
||||
for (Int32 Time = pp.Setting.OffsetTestSettlingTime; Time >= 0; Time--)
|
||||
{
|
||||
if (CheckAbort(true)) { return false; }
|
||||
|
||||
pp.StatusLabel = $"{PredefinedMessages.ZeroflowOffsetWaitForSettling(pp.Setting.Culture)}{Time.ToString(pp.Setting.Culture)}";
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
#endregion
|
||||
|
||||
var listOfSubTask = new List<Task>();
|
||||
|
||||
foreach (var meterctl in MetersToProcess)
|
||||
{
|
||||
meterctl.Meter.CurrentRecords.Clear();
|
||||
|
||||
listOfSubTask.Add(new Task<bool>(() =>
|
||||
{
|
||||
var Ok = true;
|
||||
Boolean PerformCheck = true;
|
||||
|
||||
//Timeout calculation for offset test
|
||||
//(pp.Setting.OffsetTestNumberOfLines * number of path) / 1000
|
||||
//((9000 * 3) / 1000 ) = 27 min
|
||||
|
||||
|
||||
var pataDataActivitCheck = new MultiPathDataLogContainer<int>(pp.Setting.NumberOfPaths);
|
||||
var MaxTimeoutWarnings = 300;
|
||||
pataDataActivitCheck.Update(null, -1);
|
||||
Thread.Sleep(1800);
|
||||
while (PerformCheck)
|
||||
{
|
||||
var offsetRecords = new List<CalibrationRecord>();
|
||||
try
|
||||
{
|
||||
offsetRecords = meterctl.Meter.CurrentRecords.ToList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
try
|
||||
{
|
||||
offsetRecords = meterctl.Meter.CurrentRecords.ToList();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Ok = false;
|
||||
PerformCheck = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
pp.StatusLabel = ($"{PredefinedMessages.ZeroflowOffsetAqqFinished(pp.Setting.Culture)} {offsetRecords.Count}/{(pp.Setting.OffsetTestNumberOfLines * 3)}"); // "Wait until data aquisition has finished:"
|
||||
Thread.Sleep(1800);
|
||||
for (UInt16 PathSum = 0; PathSum < pp.Setting.NumberOfPaths; PathSum++)
|
||||
{
|
||||
var currentCount = offsetRecords.Count(c => c.Channel == PathSum + 1);
|
||||
var oldCound = pataDataActivitCheck.Get(PathSum);
|
||||
if (currentCount <= oldCound + 1)
|
||||
{
|
||||
pp.DebugMessage($"Warn! Receive no new lines on path {PathSum}", meterctl.Slot, "DC", meterctl.Meter.PcbId);
|
||||
MaxTimeoutWarnings = MaxTimeoutWarnings - 1;
|
||||
|
||||
}
|
||||
pataDataActivitCheck.Update(PathSum, currentCount);
|
||||
}
|
||||
|
||||
//todo:enable timeout and canneclation token
|
||||
if (MaxTimeoutWarnings <= 0)
|
||||
{
|
||||
pp.DebugMessage($"Fatal timeout while collecting data. Please check LED singnal. Has {offsetRecords.Count} from {pp.Setting.OffsetTestNumberOfLines * 3}", meterctl.Slot, "DC", meterctl.Meter.PcbId);
|
||||
Ok = false;
|
||||
}
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
|
||||
bool testDone = true;
|
||||
for (UInt16 Path = 0; Path < pp.Setting.NumberOfPaths; Path++)
|
||||
{
|
||||
var lstPathRecords = offsetRecords.Where(c => c.Channel == Path + 1).ToList();
|
||||
if (lstPathRecords.Count(v => !v.IsValid) > pp.Setting.OffsetTestNumberOfLines * 0.1)
|
||||
{
|
||||
pp.DebugMessage($" To many bad data Packages {meterctl.Meter.Slot}; PATH {Path + 1}; Linecounter = {lstPathRecords.Count}", null, "DC");
|
||||
|
||||
Ok = false;
|
||||
break;
|
||||
}
|
||||
if (lstPathRecords.Count < pp.Setting.OffsetTestNumberOfLines)
|
||||
{
|
||||
testDone = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (testDone)
|
||||
{
|
||||
Ok = true;
|
||||
PerformCheck = false;
|
||||
}
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
|
||||
var PathDataContainerBaddata = new MultiPathDataLogContainer<List<CalibrationRecord>>(pp.Setting.NumberOfPaths);
|
||||
var PathDataContainer = new MultiPathDataLogContainer<List<CalibrationRecord>>(pp.Setting.NumberOfPaths);
|
||||
|
||||
for (UInt16 Path = 0; Path < PathDataContainer.GetPathCount(); Path++)
|
||||
{
|
||||
var offsetRecords = meterctl.Meter.CurrentRecords.ToList().Where(c => (c.Channel == (Path + 1)) && c.IsValid).ToList();
|
||||
PathDataContainer.Update(Path, offsetRecords);
|
||||
|
||||
offsetRecords = meterctl.Meter.CurrentRecords.ToList().Where(c => (c.Channel == (Path + 1)) && !c.IsValid).ToList();
|
||||
PathDataContainerBaddata.Update(Path, offsetRecords);
|
||||
}
|
||||
|
||||
|
||||
#region Calculating mean values
|
||||
|
||||
pp.DebugMessage($"Calculating mean values", meterctl.Meter.Slot, "APP", meterctl.Meter.PcbId);
|
||||
|
||||
var amplitudeValuesMeanUp = new MultiPathDataLogContainer<double>(pp.Setting.NumberOfPaths);
|
||||
var amplitudeValuesMeanDown = new MultiPathDataLogContainer<double>(pp.Setting.NumberOfPaths);
|
||||
var DeltaTimeOfFlightAverage = new MultiPathDataLogContainer<double>(pp.Setting.NumberOfPaths);
|
||||
|
||||
for (UInt16 Path = 0; Path < PathDataContainer.GetPathCount(); Path++)
|
||||
{
|
||||
var meanAmplitudeUpV = PathDataContainer.Get(Path).Sum(ad => ad.AmplitudeUpV) / PathDataContainer.Get(Path).Count;
|
||||
var meanAmplitudeDownV = PathDataContainer.Get(Path).Sum(ad => ad.AmplitudeDownV) / PathDataContainer.Get(Path).Count;
|
||||
var avgDeltaTimeOfFlight = PathDataContainer.Get(Path).Sum(ad => ad.DeltaTimeOfFlightS) / PathDataContainer.Get(Path).Count;
|
||||
|
||||
if (meanAmplitudeUpV == 0 || meanAmplitudeDownV == 0 || avgDeltaTimeOfFlight == 0)
|
||||
{
|
||||
pp.DebugMessage($"Mean value is zero at {meterctl.Meter.Slot}; PATH{Path + 1}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
Ok = false;
|
||||
}
|
||||
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
|
||||
amplitudeValuesMeanUp.Update(Path, meanAmplitudeUpV);
|
||||
amplitudeValuesMeanDown.Update(Path, meanAmplitudeDownV);
|
||||
DeltaTimeOfFlightAverage.Update(Path, avgDeltaTimeOfFlight);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
var BadDataCheckOK = true;
|
||||
var AmplitudeCheckOK = true;
|
||||
var OffsetCheckOK = true;
|
||||
|
||||
for (UInt16 Path = 0; Path < PathDataContainer.GetPathCount(); Path++)
|
||||
{
|
||||
pp.DebugMessage($"Bad data at PATH{Path + 1}:{PathDataContainerBaddata.Get(Path).Count()}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
|
||||
|
||||
if (PathDataContainerBaddata.Get(Path).Count() > pp.Setting.OffsetTestBadDataLimit)
|
||||
{
|
||||
BadDataCheckOK = false;
|
||||
pp.DebugMessage($"Bad datacheck failed!", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
}
|
||||
|
||||
pp.DebugMessage($"Average positive amplitude, PATH{(Path + 1)}: {Math.Round(amplitudeValuesMeanUp.Get(Path), 2).ToString("000.00")}mV", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
pp.DebugMessage($"Average negative amplitude, PATH{(Path + 1)}: {Math.Round(amplitudeValuesMeanDown.Get(Path), 2).ToString("000.00")}mV", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Offset Average positive amplitude PATH { (Path + 1)}", $"{ Math.Round(amplitudeValuesMeanUp.Get(Path), 2).ToString("000.00")}mV");
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Offset Average negative amplitude PATH { (Path + 1)}", $"{ Math.Round(amplitudeValuesMeanDown.Get(Path), 2).ToString("000.00")}mV");
|
||||
|
||||
if ((amplitudeValuesMeanUp.Get(Path) > pp.Setting.OffsetTestUpperVoltageLimitMV) ||
|
||||
(amplitudeValuesMeanUp.Get(Path) < pp.Setting.OffsetTestLowerVoltageLimitMV) ||
|
||||
(amplitudeValuesMeanDown.Get(Path) < pp.Setting.OffsetTestLowerVoltageLimitMV) ||
|
||||
(amplitudeValuesMeanDown.Get(Path) > pp.Setting.OffsetTestUpperVoltageLimitMV))
|
||||
{
|
||||
AmplitudeCheckOK = false;
|
||||
pp.DebugMessage($"Amplitude check failed!", meterctl.Meter.Slot, "APP", meterctl.Meter.PcbId);
|
||||
}
|
||||
|
||||
pp.DebugMessage($"Average delta time of flight valuePATH{(Path + 1)}: Raw{DeltaTimeOfFlightAverage.Get(Path)} -> in picoseconds= { Math.Round((DeltaTimeOfFlightAverage.Get(Path) / (Math.Pow(2, 38) * Math.Pow(10, 12))), 2).ToString("000.00")}", meterctl.Meter.Slot, "APP", meterctl.Meter.PcbId);
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Offset Average delta time of flight value PATH { (Path + 1)} RAW ", $"{DeltaTimeOfFlightAverage.Get(Path)}");
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Offset Average delta time of flight value PATH { (Path + 1)} picoseconds ", $"{Math.Round((DeltaTimeOfFlightAverage.Get(Path) / (Math.Pow(2, 38) * Math.Pow(10, 12))), 2).ToString("000.00")}");
|
||||
|
||||
if ((DeltaTimeOfFlightAverage.Get(Path) > pp.Setting.OffsetTestOffsetLimitPS) ||
|
||||
(DeltaTimeOfFlightAverage.Get(Path) < -pp.Setting.OffsetTestOffsetLimitPS))
|
||||
{
|
||||
pp.DebugMessage($"Delta time of flight check failed", meterctl.Meter.Slot, "APP", meterctl.Meter.PcbId);
|
||||
|
||||
OffsetCheckOK = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!BadDataCheckOK
|
||||
|| !AmplitudeCheckOK
|
||||
|| !OffsetCheckOK)
|
||||
{
|
||||
pp.DebugMessage($"Skip offset test at least one test is failed", meterctl.Meter.Slot, "APP", meterctl.Meter.PcbId);
|
||||
|
||||
if (CheckAbort(false, meterctl)) { return false; }
|
||||
}
|
||||
|
||||
Ok = meterctl.Meter.ReLogin();
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
|
||||
|
||||
for (UInt16 Path = 0; Path < DeltaTimeOfFlightAverage.GetPathCount(); Path++)
|
||||
{
|
||||
var OffsetValue = (Int32)((DeltaTimeOfFlightAverage.Get(Path) * Math.Pow(2, 40)));
|
||||
pp.StatusLabel = ($"{PredefinedMessages.WaitUntilRegisterWriteFinished(pp.Setting.Culture)}");
|
||||
String RegValue = String.Empty;
|
||||
switch (Path)
|
||||
{
|
||||
case 0:
|
||||
RegValue = Register.Genesisflow.ZeroOffset1;
|
||||
break;
|
||||
case 1:
|
||||
RegValue = Register.Genesisflow.ZeroOffset2;
|
||||
break;
|
||||
case 2:
|
||||
RegValue = Register.Genesisflow.ZeroOffset3;
|
||||
break;
|
||||
default:
|
||||
RegValue = Register.Genesisflow.ZeroOffset1;
|
||||
break;
|
||||
};
|
||||
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, $"Zero flow offset Path {Path + 1}", RegValue, OffsetValue);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
return Ok;
|
||||
}));
|
||||
}
|
||||
|
||||
listOfSubTask.ForEach(t => t.Start());
|
||||
|
||||
while (listOfSubTask.Any(t => !t.IsCompleted))
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
return true;
|
||||
}));
|
||||
|
||||
return listOfProcessTask;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.Eventing.Reader;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using System.Threading;
|
||||
using static CordonelPreadjustmentUi.PreAdjustmentControl;
|
||||
using System.Threading.Tasks;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
using Xylem.Common.CommonCore.Configuration;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
{
|
||||
public class PreparationProcess : BaseProcess
|
||||
{
|
||||
|
||||
|
||||
public PreparationProcess(string processName, StatusPanelItems panelState, string performMessage, string failedMessage, int? expectedTimeS) : base(processName, panelState, performMessage, failedMessage, expectedTimeS)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<Task> StartWork()
|
||||
{
|
||||
return doWorkProcess(base.CurrentProcessProgress);
|
||||
}
|
||||
|
||||
private List<Task> doWorkProcess(ProcessProgress pp)
|
||||
{
|
||||
var MetersToProcess = MeterStateCtls.Where(e => e.IsEnabled).ToList();
|
||||
|
||||
//MetersToProcess.AddRange(TempMeterStateCtls.Where(e => e.IsEnabled));
|
||||
|
||||
var listOfProcessTask = new List<Task>();
|
||||
|
||||
foreach (var item in TempMeterStateCtls.Where(e => e.IsEnabled))
|
||||
{
|
||||
listOfProcessTask.Add(new Task<bool>(() =>
|
||||
{
|
||||
item.Meter.StartRecordData();
|
||||
return true;
|
||||
}));
|
||||
}
|
||||
foreach (var meterctl in MetersToProcess)
|
||||
{
|
||||
listOfProcessTask.Add(new Task<bool>(() =>
|
||||
{
|
||||
|
||||
|
||||
meterctl.Id = string.IsNullOrEmpty(meterctl.Meter.PcbId) ? "Unknown" : $"Pcb:{meterctl.Meter.PcbId}";
|
||||
meterctl.Meter.StartRecordData();
|
||||
|
||||
|
||||
|
||||
Boolean Ok = false;
|
||||
|
||||
|
||||
if (pp.Setting.NumberOfPaths > 0)
|
||||
{
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Calibration factor1", Register.Genesisflow.CalFactor1, pp.Setting.CalFactor1);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
if (pp.Setting.NumberOfPaths > 1)
|
||||
{
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Calibration factor2", Register.Genesisflow.CalFactor2, pp.Setting.CalFactor2);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
if (pp.Setting.NumberOfPaths > 2)
|
||||
{
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Calibration factor3", Register.Genesisflow.CalFactor3, pp.Setting.CalFactor3);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
|
||||
|
||||
if (pp.Setting.doOffsetTest)
|
||||
{
|
||||
if (pp.Setting.NumberOfPaths > 0)
|
||||
{
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Zeroflow offset1", Register.Genesisflow.ZeroOffset1, pp.Setting.ZeroOffset1);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
if (pp.Setting.NumberOfPaths > 1)
|
||||
{
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Zeroflow offset2", Register.Genesisflow.ZeroOffset2, pp.Setting.ZeroOffset2);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
if (pp.Setting.NumberOfPaths > 2)
|
||||
{
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Zeroflow offset3", Register.Genesisflow.ZeroOffset3, pp.Setting.ZeroOffset3);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
|
||||
}
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"OffsetTestNumberOfLines", pp.Setting.OffsetTestNumberOfLines.ToString());
|
||||
meterctl.Meter.calibrationResult.AddAditonlaLog($"Samplerate", pp.Setting.Samplerate.ToString());
|
||||
|
||||
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Samplerate", Register.Genesisflow.SampleRate, pp.Setting.Samplerate);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "Metersize", Register.Genesisflow.MeterSize, pp.Setting.MeterSize.GetHashCode());
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "LED mode", Register.Genesisflow.LedMode, pp.Setting.LedMode.GetHashCode());
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
|
||||
Ok = WriteRegisterSafe(meterctl.Meter, "TriggerActive", Register.Genesisflow.TriggerActive, 1, false);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
|
||||
|
||||
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
|
||||
var r = LocalWebRequest.GetRequest($"{ ServiceUrls.GenesisFinalCheckServiceUrl()}GetMetersizeProgrammingData?MeterSize={pp.Setting.MeterSize.GetHashCode()}", 2000);
|
||||
var dt = JsonConvert.DeserializeObject<Dictionary<string, UInt32>>(r);
|
||||
|
||||
foreach (var item in dt)
|
||||
{
|
||||
Ok = meterctl.Meter.WriteRegisterSafe(item.Key, item.Value);
|
||||
if (CheckAbort(Ok, meterctl)) { return Ok; }
|
||||
}
|
||||
|
||||
|
||||
return Ok;
|
||||
}));
|
||||
|
||||
}
|
||||
return listOfProcessTask;
|
||||
|
||||
}
|
||||
private static byte[] ReservandFill(byte[] b)
|
||||
{
|
||||
return b.Reverse().ToArray();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using static CordonelPreadjustmentUi.PreAdjustmentControl;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
{
|
||||
public class PrepareTestProcess : BaseProcess
|
||||
{
|
||||
|
||||
|
||||
public PrepareTestProcess(string processName, StatusPanelItems panelState, string performMessage, string failedMessage, int? expectedTimeS) : base(processName, panelState, performMessage, failedMessage, expectedTimeS)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<Task> StartWork()
|
||||
{
|
||||
return doWorkProcess(base.CurrentProcessProgress);
|
||||
}
|
||||
|
||||
private List<Task> doWorkProcess(ProcessProgress pp)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
var listOfProcessTask = new List<Task>();
|
||||
|
||||
listOfProcessTask.Add(new Task<bool>(() =>
|
||||
{
|
||||
pp.DebugMessage("test start");
|
||||
//var Result = false;
|
||||
//for (int i = 0; i < 3; i++)
|
||||
//{
|
||||
// pp.DebugMessage = $"\tCOMMAND CHANNEL: \t Performing {ProcessName} procedure\n";
|
||||
|
||||
// try
|
||||
// {
|
||||
// Result = string.IsNullOrEmpty(meterctl.OverridePassword)
|
||||
// ? meterctl.Meter.Login()
|
||||
// : meterctl.Meter.Login(meterctl.OverridePassword);
|
||||
|
||||
// if (Result)
|
||||
// {
|
||||
// break;
|
||||
// }
|
||||
// Thread.Sleep(100);
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// pp.DebugMessage = $"\tCOMMAND CHANNEL: \t Error on {ProcessName} procedure\n";
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
//var meterIndex = (meterctl.Slot).ToString(pp.Setting.Culture);
|
||||
//meterctl.Failed = !Result;
|
||||
//if (!Result)
|
||||
//{
|
||||
// pp.DebugMessage = $"\tCOMMAND CHANNEL: \t {ProcessName} procedure failed at METER{meterIndex}\n";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// pp.DebugMessage = $"\tCOMMAND CHANNEL: \t {ProcessName} procedure successful at METER{meterIndex}\n";
|
||||
// pp.GenerateReturnNote($"{meterctl.Slot}", meterctl.Meter.PcbId, PredefinedMessages.LoginFailed(pp.Setting.Culture));
|
||||
//}
|
||||
//no preperation test needed
|
||||
|
||||
pp.DebugMessage($"found {MeterStateCtls.Count} slots for meters");
|
||||
|
||||
pp.DebugMessage($"found {TempMeterStateCtls.Count} slots for temp meters");
|
||||
|
||||
return true;
|
||||
|
||||
}));
|
||||
return listOfProcessTask;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
|
||||
throw new ApplicationException("PrepareTestProcess", ex);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,264 @@
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
|
||||
using Xylem.Common.Ui.CordonelPreadjustmentUi.Helper.Extensions;
|
||||
using static CordonelPreadjustmentUi.PreAdjustmentControl;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
{
|
||||
public class TemperatureCalibrationProcess : BaseProcess
|
||||
{
|
||||
public TemperatureCalibrationProcess(string processName, StatusPanelItems panelState, string performMessage, string failedMessage, int? expectedTimeS) : base(processName, panelState, performMessage, failedMessage, expectedTimeS)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<Task> StartWork()
|
||||
{
|
||||
return doWorkProcess(base.CurrentProcessProgress);
|
||||
}
|
||||
|
||||
private List<Task> doWorkProcess(ProcessProgress pp)
|
||||
{
|
||||
#region Wait for settling time (60s)
|
||||
for (Int32 Time = pp.Setting.OffsetTestSettlingTime; Time >= 0; Time--)
|
||||
{
|
||||
|
||||
pp.StatusLabel = $"{PredefinedMessages.ZeroflowOffsetWaitForSettling(pp.Setting.Culture)}{Time.ToString(pp.Setting.Culture)}";
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
#endregion
|
||||
|
||||
var MetersToProcess = MeterStateCtls.Where(e => e.IsEnabled).ToList();
|
||||
|
||||
var listOfProcessTask = new List<Task>();
|
||||
|
||||
|
||||
pp.StatusLabel = (PredefinedMessages.WaitUntilTemperatureAcquisitionFinished(pp.Setting.Culture));
|
||||
|
||||
if (!pp.Setting.TempMan || TempMeterStateCtls.Any(a => a.IsEnabled))
|
||||
{
|
||||
//aoutmatic
|
||||
decimal avgTemp = 0;
|
||||
var listOFEnabledTempMeters = TempMeterStateCtls.Where(a => a.IsEnabled).ToList();
|
||||
foreach (var avgTempCtls in listOFEnabledTempMeters)
|
||||
{
|
||||
avgTemp = avgTemp + avgTempCtls.GetTemperature();
|
||||
}
|
||||
|
||||
avgTemp = avgTemp / listOFEnabledTempMeters.Count;
|
||||
|
||||
foreach (var meterctl in MetersToProcess)
|
||||
{
|
||||
meterctl.SetTemperature(avgTemp);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//manual input
|
||||
foreach (var meterctl in MetersToProcess)
|
||||
{
|
||||
meterctl.SetTemperature((decimal)25.0);
|
||||
}
|
||||
pp.RequestTemperatur();
|
||||
foreach (var meterctl in TempMeterStateCtls)
|
||||
{
|
||||
meterctl.SetTemperature((decimal)25.0);
|
||||
meterctl.OnTempretureChangedHandler += delegate (Object sender, EventArgsDecimal d)
|
||||
{
|
||||
decimal avgTemp = 0;
|
||||
foreach (var tempMeter in TempMeterStateCtls)
|
||||
{
|
||||
avgTemp = avgTemp + tempMeter.GetTemperature();
|
||||
}
|
||||
|
||||
avgTemp = avgTemp / TempMeterStateCtls.Count;
|
||||
|
||||
foreach (var updateMeter in MetersToProcess)
|
||||
{
|
||||
updateMeter.SetTemperature(avgTemp);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
pp.DebugMessage($"Performing {ProcessName} procedure");
|
||||
|
||||
listOfProcessTask.Add(new Task<bool>(() =>
|
||||
{
|
||||
|
||||
pp.RequestTempretureSelection();
|
||||
while (!pp.TempretureSelected)
|
||||
{
|
||||
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
if (!pp.Setting.TempMan && pp.PushedTestBenchTemp.HasValue)
|
||||
{
|
||||
foreach (var updateMeter in MetersToProcess)
|
||||
{
|
||||
updateMeter.SetTemperature(Convert.ToDecimal(pp.PushedTestBenchTemp.Value));
|
||||
}
|
||||
}
|
||||
var listOfSubTasks = new List<Task<bool>>();
|
||||
foreach (var disableTempInputMeter in MetersToProcess)
|
||||
{
|
||||
disableTempInputMeter.DisableTemperatureinput(true);
|
||||
}
|
||||
foreach (var disableTempInputMeter in TempMeterStateCtls)
|
||||
{
|
||||
disableTempInputMeter.DisableTemperatureinput(true);
|
||||
}
|
||||
|
||||
|
||||
foreach (var putTempIntoMeter in MetersToProcess)
|
||||
{
|
||||
listOfSubTasks.Add(new Task<bool>(() =>
|
||||
{
|
||||
|
||||
var originTemp = putTempIntoMeter.GetTemperature();
|
||||
UInt32 TempToRegister = (UInt32)(originTemp * 4096);
|
||||
|
||||
#region Set temperature calibration register
|
||||
var Ok = false;
|
||||
pp.StatusLabel = PredefinedMessages.WaitUntilRegisterWriteFinished(pp.Setting.Culture);
|
||||
Ok = WriteRegisterSafe(putTempIntoMeter.Meter, "Temperature calibration", Register.Genesisflow.ToFTempCalibrate, TempToRegister, false);
|
||||
if (CheckAbort(Ok, putTempIntoMeter)) { return Ok; }
|
||||
putTempIntoMeter.Meter.calibrationResult.AddAditonlaLog($"Temperature calibration Register", TempToRegister.ToString());
|
||||
putTempIntoMeter.Meter.calibrationResult.AddAditonlaLog($"Temperature calibration Origin", originTemp.ToString());
|
||||
|
||||
#endregion
|
||||
#region Wait for some seconds
|
||||
const UInt16 WaitingTime = 10;
|
||||
|
||||
|
||||
putTempIntoMeter.Meter.listOfTotalTimeOfFlightSPerPath.Update(null, new List<Double>());
|
||||
putTempIntoMeter.Meter.CurrentRecords.Clear();
|
||||
putTempIntoMeter.Meter.logAmpTest = true;
|
||||
|
||||
|
||||
for (Int32 Seconds = 0; Seconds < WaitingTime; Seconds++) // eight seconds remove /2
|
||||
{
|
||||
Ok = ActivityCheck(pp, putTempIntoMeter.Meter.listOfTotalTimeOfFlightSPerPath, Seconds);
|
||||
if (CheckAbort(Ok, putTempIntoMeter))
|
||||
{
|
||||
|
||||
pp.DebugMessage($"Activity check failed", putTempIntoMeter.Meter.Slot, "DC", putTempIntoMeter.Meter.PcbId);
|
||||
return Ok;
|
||||
}
|
||||
pp.StatusLabel = $"{PredefinedMessages.WaitSeconds(Seconds, pp.Setting.Culture)}";
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
#endregion
|
||||
#region Check temperature
|
||||
putTempIntoMeter.Meter.CurrentRecords.Clear();
|
||||
putTempIntoMeter.Meter.logAmpTest = true;
|
||||
Thread.Sleep(1000);
|
||||
var tmpTempCheckRecords = putTempIntoMeter.Meter.CurrentRecords.ToList();
|
||||
if (tmpTempCheckRecords.Any())
|
||||
{
|
||||
|
||||
|
||||
var checkTempMeter = (decimal)tmpTempCheckRecords.Average(a => a.TemperatureDegC);
|
||||
|
||||
var sbTemp = new StringBuilder();
|
||||
|
||||
sbTemp.AppendLine(
|
||||
$"Ref. temp = {Math.Round(originTemp, 2).ToString("00.00", pp.Setting.Culture)}°C vs. Meter temp = {checkTempMeter}°C at {putTempIntoMeter.Meter.Slot}");
|
||||
|
||||
if (Math.Abs(originTemp - checkTempMeter) > (decimal)pp.Setting.TempDeviationLimit)
|
||||
{
|
||||
pp.DebugMessage($"Temperature check failed", putTempIntoMeter.Meter.Slot, "APP", putTempIntoMeter.Meter.PcbId);
|
||||
Ok = false;
|
||||
}
|
||||
if (CheckAbort(Ok, putTempIntoMeter)) { return Ok; }
|
||||
|
||||
pp.DebugMessage($"Temperature check OK", putTempIntoMeter.Meter.Slot, "APP", putTempIntoMeter.Meter.PcbId);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Get 'TOF offset' registers
|
||||
if (pp.Setting.NumberOfPaths > 0)
|
||||
{
|
||||
byte[] rawResult;
|
||||
Ok = ReadRegister(putTempIntoMeter.Meter, "TOF offset1", Register.Genesisflow.ToFTempOffset1, out rawResult);
|
||||
if (CheckAbort(Ok, putTempIntoMeter)) { return Ok; }
|
||||
if (rawResult != null)
|
||||
{
|
||||
var tmp = BitConverter.ToInt32(rawResult, 0);
|
||||
}
|
||||
|
||||
}
|
||||
if (pp.Setting.NumberOfPaths > 1)
|
||||
{
|
||||
byte[] rawResult;
|
||||
Ok = ReadRegister(putTempIntoMeter.Meter, "TOF offset2", Register.Genesisflow.ToFTempOffset2, out rawResult);
|
||||
if (CheckAbort(Ok, putTempIntoMeter)) { return Ok; }
|
||||
if (rawResult != null)
|
||||
{
|
||||
var tmp = BitConverter.ToInt32(rawResult, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (pp.Setting.NumberOfPaths > 2)
|
||||
{
|
||||
byte[] rawResult;
|
||||
Ok = ReadRegister(putTempIntoMeter.Meter, "TOF offset3", Register.Genesisflow.ToFTempOffset3, out rawResult);
|
||||
if (CheckAbort(Ok, putTempIntoMeter)) { return Ok; }
|
||||
if (rawResult != null)
|
||||
{
|
||||
var tmp = BitConverter.ToInt32(rawResult, 0);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
putTempIntoMeter.SetWatcher((decimal)pp.Setting.LowerTempLimit, (decimal)pp.Setting.UpperTempLimit, (decimal)pp.Setting.TempDeviationLimit);
|
||||
putTempIntoMeter.StartTempWatch();
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pp.DebugMessage($"Temperature check failed - No Records", putTempIntoMeter.Meter.Slot, "APP", putTempIntoMeter.Meter.PcbId);
|
||||
return false;
|
||||
}
|
||||
|
||||
}));
|
||||
}
|
||||
|
||||
listOfSubTasks.ForEach(t => t.Start());
|
||||
while (!listOfSubTasks.All(t => t.IsCompleted))
|
||||
{
|
||||
Thread.Sleep(5);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}));
|
||||
|
||||
|
||||
|
||||
|
||||
return listOfProcessTask;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,367 @@
|
||||
using CordonelPreadjustmentUi.Helper;
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using static CordonelPreadjustmentUi.PreAdjustmentControl;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes
|
||||
{
|
||||
public abstract class BaseProcess : IProcess
|
||||
{
|
||||
public ProcessProgress CurrentProcessProgress;
|
||||
internal List<MeterStateControl> MeterStateCtls = new List<MeterStateControl>();
|
||||
internal List<MeterStateControl> TempMeterStateCtls = new List<MeterStateControl>();
|
||||
internal readonly string ProcessName;
|
||||
public readonly StatusPanelItems PanelState;
|
||||
public readonly string FailedMessage;
|
||||
public readonly string PerformMessage;
|
||||
public readonly int ExpectedTimeS;
|
||||
public DateTimeOffset StartTime;
|
||||
public BaseProcess(string processName, StatusPanelItems panelState, string performMessage, string failedMessage, int? expectedTimeS = null)
|
||||
{
|
||||
ProcessName = processName;
|
||||
PanelState = panelState;
|
||||
FailedMessage = failedMessage;
|
||||
PerformMessage = performMessage;
|
||||
StartTime = DateTimeOffset.UtcNow;
|
||||
|
||||
ExpectedTimeS = expectedTimeS.HasValue ? expectedTimeS.Value : 0;
|
||||
}
|
||||
internal List<MeterStateControl> AllMeterStateCtrls()
|
||||
{
|
||||
var r = new List<MeterStateControl>();
|
||||
r.AddRange(MeterStateCtls);
|
||||
r.AddRange(TempMeterStateCtls);
|
||||
return r;
|
||||
}
|
||||
|
||||
public ProcessProgress StartProcess(ProcessProgress pp, List<MeterStateControl> MeterCtsl, List<MeterStateControl> TempMeterCtls)
|
||||
{
|
||||
var listOfProcessTasks = new List<Task>();
|
||||
try
|
||||
{
|
||||
StartTime = DateTimeOffset.UtcNow;
|
||||
MeterStateCtls = MeterCtsl;
|
||||
TempMeterStateCtls = TempMeterCtls;
|
||||
CurrentProcessProgress = pp;
|
||||
//SetUi
|
||||
//Check meters
|
||||
|
||||
|
||||
pp.Bubbles = true;
|
||||
pp.StatusLabel = PerformMessage;
|
||||
pp.DebugMessage($"{ProcessName} procedure started");
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
listOfProcessTasks = StartWork();
|
||||
|
||||
}
|
||||
catch (Exception innerEX)
|
||||
{
|
||||
pp.DebugMessage($"Error on Start Work ex:{innerEX}");
|
||||
}
|
||||
|
||||
listOfProcessTasks.ForEach(t => t.Start());
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw new ApplicationException("Error on prepare process start", ex);
|
||||
}
|
||||
|
||||
|
||||
var completTasks = new Task(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
while (!listOfProcessTasks.All(t => t.IsCompleted))
|
||||
{
|
||||
if (pp.CancellationSource != null && pp.CancellationSource.IsCancellationRequested)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Thread.Sleep(5);
|
||||
}
|
||||
|
||||
GetSequenceResult($"{ProcessName} sequence");
|
||||
pp.IsBusy = false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw new ApplicationException("Error on waiting for completition", ex);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
completTasks.Start();
|
||||
|
||||
|
||||
//todo for all task failed offer a retry
|
||||
//SetUi
|
||||
//Check meters and remove meters
|
||||
return pp;
|
||||
}
|
||||
|
||||
public abstract List<Task> StartWork();
|
||||
|
||||
public bool ActivityCheck(ProcessProgress pp, ActivityCheckMultiPathDataLogContainer<List<double>> listOfTotalTimeOfFlightSPerPath, int seconds)
|
||||
{
|
||||
//no update or last update was more AmpTestActivityCheckInverval ago
|
||||
if (listOfTotalTimeOfFlightSPerPath.GetSecondsSinceLastUpdate() < 0 || listOfTotalTimeOfFlightSPerPath.GetSecondsSinceLastUpdate() > pp.Setting.AmpTestActivityCheckInverval)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
public void GetSequenceResult(String name)
|
||||
{
|
||||
#region Definitions and initializations
|
||||
|
||||
CurrentProcessProgress.Aborted = false;
|
||||
|
||||
Boolean NoDeviceEnabled = true;
|
||||
Boolean AtLeastOneMeterEnabled = false;
|
||||
Boolean AtLeastOneThermometerEnabled = false;
|
||||
Boolean AllDevicesFailed = true;
|
||||
Boolean AllMetersOk = true;
|
||||
Boolean AllMetersFailed = true;
|
||||
Boolean AllThermometersFailed = true;
|
||||
Boolean AllThermometersOk = true;
|
||||
|
||||
String MeterSeqSucceeded = String.Empty;
|
||||
String MeterSeqFailed = String.Empty;
|
||||
String ThermoSeqSucceeded = String.Empty;
|
||||
String ThermoSeqFailed = String.Empty;
|
||||
#endregion
|
||||
|
||||
#region No device enabled
|
||||
|
||||
NoDeviceEnabled = !MeterStateCtls.Any(m => m.IsEnabled);
|
||||
AtLeastOneMeterEnabled = MeterStateCtls.Any(m => m.IsEnabled);
|
||||
|
||||
AllDevicesFailed = AllMeterStateCtrls().Where(e => e.Enabled).All(f => f.Failed);
|
||||
AllMetersOk = !AllDevicesFailed;
|
||||
AllMetersFailed = MeterStateCtls.Where(e => e.Enabled).All(f => f.Failed);
|
||||
|
||||
AllThermometersFailed = TempMeterStateCtls.Where(e => e.Enabled).All(f => f.Failed);
|
||||
AtLeastOneThermometerEnabled = TempMeterStateCtls.Any(e => e.Enabled);
|
||||
AllThermometersOk = !AllThermometersFailed;
|
||||
|
||||
|
||||
if (NoDeviceEnabled)
|
||||
{
|
||||
CurrentProcessProgress.DebugMessage($"\tAPPLICATION:\t\t No device enabled");
|
||||
CurrentProcessProgress.DebugMessage($"\tAPPLICATION:\t\t ZEROFLOW CALIBRATION sequence failed");
|
||||
|
||||
CurrentProcessProgress.Aborted = true;
|
||||
return;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region At least one METER/ THERMOMETER enabled
|
||||
AtLeastOneMeterEnabled = MeterStateCtls.Any(m => m.IsEnabled);
|
||||
AtLeastOneThermometerEnabled = TempMeterStateCtls.Any(m => m.IsEnabled);
|
||||
|
||||
#endregion
|
||||
#region All Devices failed
|
||||
if (AtLeastOneMeterEnabled | AtLeastOneThermometerEnabled)
|
||||
{
|
||||
|
||||
AllDevicesFailed = MeterStateCtls.Where(m => m.IsEnabled).All(m => m.Failed);
|
||||
|
||||
if (AllDevicesFailed)
|
||||
{
|
||||
#region All devices failed
|
||||
CurrentProcessProgress.Aborted = true;
|
||||
CurrentProcessProgress.DebugMessage($"{name} failed!");
|
||||
CurrentProcessProgress.DebugMessage($"ZEROFLOW CALIBRATION sequence failed");
|
||||
|
||||
CurrentProcessProgress.ForceFailedMessage();
|
||||
return;
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Meter string
|
||||
if (!AtLeastOneMeterEnabled)
|
||||
{
|
||||
CurrentProcessProgress.Aborted = true;
|
||||
CurrentProcessProgress.DebugMessage($"No METER enabled");
|
||||
CurrentProcessProgress.DebugMessage($"ZEROFLOW CALIBRATION sequence failed");
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var checkMeter in MeterStateCtls)
|
||||
{
|
||||
if (checkMeter.IsEnabled & !checkMeter.Failed)
|
||||
{
|
||||
MeterSeqSucceeded = $"{MeterSeqSucceeded} Meter {checkMeter.Slot} {Environment.NewLine}";
|
||||
}
|
||||
if (checkMeter.IsEnabled & checkMeter.Failed)
|
||||
{
|
||||
MeterSeqFailed = $"{MeterSeqFailed} Meter {checkMeter.Slot} {Environment.NewLine}";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region AllMetersOk/ Failed
|
||||
|
||||
AllMetersOk = !MeterStateCtls.Any(m => m.IsEnabled && m.Failed);
|
||||
AllMetersFailed = !MeterStateCtls.Where(m => m.IsEnabled).All(m => !m.Failed);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Summary METER
|
||||
if (AtLeastOneMeterEnabled)
|
||||
{
|
||||
#region All METERS FAILED
|
||||
if (AllMetersFailed)
|
||||
{
|
||||
CurrentProcessProgress.Aborted = true;
|
||||
CurrentProcessProgress.DebugMessage($"{name} failed at all METERS");
|
||||
}
|
||||
#endregion
|
||||
#region All METERS ok
|
||||
if (AllMetersOk)
|
||||
{
|
||||
CurrentProcessProgress.DebugMessage($"SUMMARY: ");
|
||||
CurrentProcessProgress.DebugMessage($"{name} {name} successful at all {MeterStateCtls.Count(a => a.IsEnabled)} Meters");
|
||||
}
|
||||
#endregion
|
||||
if (!AllMetersOk && !AllMetersFailed)
|
||||
{
|
||||
if (AtLeastOneMeterEnabled)
|
||||
{
|
||||
CurrentProcessProgress.DebugMessage($"SUMMARY:");
|
||||
if (String.IsNullOrEmpty(MeterSeqFailed))
|
||||
{
|
||||
MeterSeqFailed = "None";
|
||||
}
|
||||
|
||||
CurrentProcessProgress.DebugMessage($"{name} failed at {MeterSeqFailed}");
|
||||
if (String.IsNullOrEmpty(MeterSeqSucceeded))
|
||||
{
|
||||
MeterSeqSucceeded = "None";
|
||||
}
|
||||
|
||||
CurrentProcessProgress.DebugMessage($"{name} successful at {MeterSeqSucceeded}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region Summary THERMOMETER
|
||||
if (AtLeastOneThermometerEnabled)
|
||||
{
|
||||
CurrentProcessProgress.DebugMessage($"SUMMARY: ");
|
||||
if (AllThermometersFailed)
|
||||
{
|
||||
CurrentProcessProgress.Aborted = true;
|
||||
CurrentProcessProgress.DebugMessage($"{name} failed at all THERMOMETERS");
|
||||
}
|
||||
if (AllThermometersOk)
|
||||
{
|
||||
CurrentProcessProgress.DebugMessage($"{name} successful at all THERMOMETERS");
|
||||
}
|
||||
if (!AllThermometersOk && !AllThermometersFailed)
|
||||
{
|
||||
if (AtLeastOneThermometerEnabled)
|
||||
{
|
||||
if (String.IsNullOrEmpty(ThermoSeqFailed))
|
||||
{
|
||||
ThermoSeqFailed = "None";
|
||||
}
|
||||
|
||||
CurrentProcessProgress.DebugMessage($"{name} failed at {ThermoSeqFailed}");
|
||||
if (String.IsNullOrEmpty(ThermoSeqSucceeded))
|
||||
{
|
||||
ThermoSeqSucceeded = "None";
|
||||
}
|
||||
|
||||
CurrentProcessProgress.DebugMessage($"{name} successful at {ThermoSeqSucceeded}");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
if (CurrentProcessProgress.Aborted)
|
||||
{
|
||||
CurrentProcessProgress.DebugMessage($"{name} finished");
|
||||
CurrentProcessProgress.DebugMessage($"ZEROFLOW CALIBRATION sequence failed");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public bool CheckAbort(bool resultFromAction, MeterStateControl ctl = null)
|
||||
{
|
||||
if (!resultFromAction || CurrentProcessProgress.CancellationSource.Token.IsCancellationRequested)
|
||||
{
|
||||
if (ctl != null)
|
||||
{
|
||||
ctl.Failed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
AllMeterStateCtrls().Where(e => e.IsEnabled).ToList().ForEach(f => f.Failed = true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool ReadRegister(ZeroFlowGenesisMeter m, string displayName, string registerName, out byte[] ret)
|
||||
{
|
||||
CurrentProcessProgress.StatusLabel = PredefinedMessages.WaitUntilRegisterReadFinished(CurrentProcessProgress.Setting.Culture);
|
||||
var Ok = false;
|
||||
CurrentProcessProgress.DebugMessage($"Reading '{displayName}'-register", m.Slot, "CC", m.PcbId);
|
||||
try
|
||||
{
|
||||
ret = m.ReadRegister(registerName);
|
||||
CurrentProcessProgress.DebugMessage($"Reading '{displayName}'-register successful", m.Slot, "CC", m.PcbId);
|
||||
Ok = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ret = null;
|
||||
CurrentProcessProgress.DebugMessage($"Reading '{displayName}'-register failed", m.Slot, "CC", m.PcbId);
|
||||
Ok = false;
|
||||
}
|
||||
return Ok;
|
||||
}
|
||||
public bool WriteRegisterSafe<T>(ZeroFlowGenesisMeter m, string displayName, string registerName, T Value, bool CheckResult = true)
|
||||
{
|
||||
CurrentProcessProgress.DebugMessage($"Writing {Value} to '{displayName}'-register", m.Slot, "CC", m.PcbId);
|
||||
var Ok = false;
|
||||
if (CheckResult)
|
||||
{
|
||||
Ok = m.WriteRegisterSafe(registerName, Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ok = m.WriteRegisterUnsafe(registerName, Value);
|
||||
}
|
||||
|
||||
if (Ok)
|
||||
{
|
||||
CurrentProcessProgress.DebugMessage($"Writing {Value} to '{displayName}'-register successful", m.Slot, "CC", m.PcbId);
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentProcessProgress.DebugMessage($"Writing {Value} to '{displayName}'-register failed", m.Slot, "CC", m.PcbId);
|
||||
}
|
||||
return Ok;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes
|
||||
{
|
||||
interface IProcess
|
||||
{
|
||||
ProcessProgress StartProcess(ProcessProgress pp,List<MeterStateControl> MeterCtsl, List<MeterStateControl> TempMeterCtls);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
using CordonelPreadjustmentUi.Parameters;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore.Consts;
|
||||
using Xylem.Common.Ui.CordonelPreadjustmentUi;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Processes.Itinerary
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
public class EventArgsMeterSuccsessfull : EventArgs
|
||||
{
|
||||
public EventArgsMeterSuccsessfull(List<int> v)
|
||||
{
|
||||
Value = v;
|
||||
}
|
||||
public readonly List<int> Value;
|
||||
}
|
||||
|
||||
public class EventArgsFlushRequest : EventArgs
|
||||
{
|
||||
public EventArgsFlushRequest(FlushParams v)
|
||||
{
|
||||
Value = v;
|
||||
}
|
||||
public readonly FlushParams Value;
|
||||
}
|
||||
|
||||
public class EventArgsDecimal : EventArgs
|
||||
{
|
||||
public EventArgsDecimal(decimal v)
|
||||
{
|
||||
Value = v;
|
||||
}
|
||||
public readonly decimal Value;
|
||||
}
|
||||
|
||||
public class EventArgsBool : EventArgs
|
||||
{
|
||||
public EventArgsBool(bool v)
|
||||
{
|
||||
Value = v;
|
||||
}
|
||||
public readonly bool Value;
|
||||
}
|
||||
public class EventArgsMeterSize : EventArgs
|
||||
{
|
||||
public EventArgsMeterSize(MeterSize v)
|
||||
{
|
||||
Value = v;
|
||||
}
|
||||
public readonly MeterSize Value;
|
||||
}
|
||||
public class EventArgsString : EventArgs
|
||||
{
|
||||
public EventArgsString(string v)
|
||||
{
|
||||
Value = v;
|
||||
}
|
||||
public readonly string Value;
|
||||
}
|
||||
|
||||
public class EventArgsDebug : EventArgs
|
||||
{
|
||||
public EventArgsDebug(string v, string source = "", int? slot = null, string pcbID = "")
|
||||
{
|
||||
Value = v;
|
||||
Slot = slot;
|
||||
Source = source;
|
||||
PcbId = pcbID;
|
||||
}
|
||||
public readonly string Value;
|
||||
public readonly string Source;
|
||||
public readonly string PcbId;
|
||||
public readonly int? Slot;
|
||||
}
|
||||
|
||||
public class ProcessProgress
|
||||
{
|
||||
public String[] Passwords;
|
||||
public String[] ThermoPasswords;
|
||||
public Boolean[] MeterEnable;
|
||||
public Boolean[] ThermoEnable;
|
||||
|
||||
public Boolean StopSequence;
|
||||
public Boolean Aborted;
|
||||
|
||||
public Boolean[] AllOk;
|
||||
public Boolean[] MeterOk;
|
||||
public Boolean[] ThermoOk;
|
||||
|
||||
|
||||
public CancellationTokenSource CancellationSource = new CancellationTokenSource();
|
||||
|
||||
public event EventHandler<EventArgsBool> OnBubblesChanged;
|
||||
public event EventHandler<EventArgsBool> OnRequestTempretureSelection;
|
||||
|
||||
internal void RequestTempretureSelection()
|
||||
{
|
||||
if (OnRequestTempretureSelection == null)
|
||||
{
|
||||
TempretureSelected = true;
|
||||
return;
|
||||
}
|
||||
OnRequestTempretureSelection.Invoke(this, new EventArgsBool(true));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public event EventHandler<EventArgsString> OnStatusLabelChanged;
|
||||
public event EventHandler<EventArgsDebug> OnDebugMessageChanged;
|
||||
|
||||
public event EventHandler OnForceFailedMessage;
|
||||
|
||||
public event EventHandler<EventArgsMeterSize> OnRequestFlush;
|
||||
public event EventHandler<EventArgs> OnRequestTemperatur;
|
||||
|
||||
public Image Logo { get; internal set; }
|
||||
|
||||
|
||||
private bool bubbles;
|
||||
|
||||
|
||||
|
||||
public bool Bubbles
|
||||
{
|
||||
get { return bubbles;}
|
||||
internal set
|
||||
{
|
||||
bubbles = value;
|
||||
OnBubblesChanged?.Invoke(this,new EventArgsBool(value));
|
||||
}
|
||||
}
|
||||
|
||||
internal bool CheckForCancellation(MeterStateControl meterctl = null)
|
||||
{
|
||||
|
||||
if (CancellationSource.IsCancellationRequested)
|
||||
{
|
||||
return CancellationSource.IsCancellationRequested;
|
||||
}
|
||||
if (meterctl == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!meterctl.IsEnabled)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
//no CancellationRequested and meter state was request but it is enbaled
|
||||
return false;
|
||||
}
|
||||
|
||||
private string statusLabel;
|
||||
public string StatusLabel
|
||||
{
|
||||
get { return statusLabel; }
|
||||
internal set
|
||||
{
|
||||
statusLabel = value;
|
||||
OnStatusLabelChanged?.Invoke(this, new EventArgsString(value));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
internal PreAdjustmentSettingsContainer Setting { get; set; }
|
||||
public bool IsBusy { get; internal set; }
|
||||
public bool TempretureSelected { get; internal set; }
|
||||
public bool FlushDone { get; internal set; }
|
||||
public bool IsAutomaticMode { get; internal set; }
|
||||
public double? PushedTestBenchTemp { get; internal set; } = null;
|
||||
|
||||
#region UI Actions
|
||||
|
||||
public void ForceFailedMessage()
|
||||
{
|
||||
OnForceFailedMessage?.Invoke(this,EventArgs.Empty);
|
||||
}
|
||||
|
||||
public void RequestFlush(MeterSize size)
|
||||
{
|
||||
FlushDone = false;
|
||||
OnRequestFlush?.Invoke(this, new EventArgsMeterSize(size));
|
||||
|
||||
}
|
||||
public void RequestTemperatur()
|
||||
{
|
||||
OnRequestTemperatur?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
internal void GenerateReturnNote(string v, MeterStateControl meterctl)
|
||||
{
|
||||
GenerateReport.GenerateReturnNote(meterctl.Slot, meterctl.Meter.PcbId, v, meterctl.GetLog(), Setting.Culture, Logo);
|
||||
}
|
||||
|
||||
public void DebugMessage(string msg, int? slot = null, string source = "APP", string PcbID = "")
|
||||
{
|
||||
OnDebugMessageChanged?.Invoke(this, new EventArgsDebug(msg,source,slot, PcbID));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CordonelPreadjustmentUi
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
try
|
||||
{
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
MessageBox.Show(ex.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("CordonelPreadjustmentUi")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CordonelPreadjustmentUi")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("d0c8d887-ed52-40ab-a069-90bce0e801e2")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("2.1.*")]
|
||||
[assembly: AssemblyFileVersion("2.1.0.4")]
|
||||
@@ -0,0 +1,123 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Xylem.Common.Ui.CordonelPreadjustmentUi.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Xylem.Common.Ui.CordonelPreadjustmentUi.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ErrorImage {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ErrorImage", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Meter {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Meter", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap NormalImage {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("NormalImage", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap QuestionImage {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("QuestionImage", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Sensus_Xylem_lockup {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Sensus_Xylem_lockup", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap thermometer {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("thermometer", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="ErrorImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ErrorImage.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Meter" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Meter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="NormalImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NormalImage.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="QuestionImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\QuestionImage.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Sensus_Xylem_lockup" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Sensus-Xylem-lockup.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="thermometer" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\thermometer.GIF;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Xylem.Common.Ui.CordonelPreadjustmentUi.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 106 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using CordonelPreadjustmentUi.Processes.Itinerary;
|
||||
|
||||
namespace CordonelPreadjustmentUi
|
||||
{
|
||||
public class TempMeterStateControl : MeterStateControl
|
||||
{
|
||||
public bool HasMeter { get; set; }
|
||||
public TempMeterStateControl(int slot) : base(slot)
|
||||
{
|
||||
HasMeter = true;
|
||||
setImage(Xylem.Common.Ui.CordonelPreadjustmentUi.Properties.Resources.thermometer);
|
||||
}
|
||||
|
||||
public TempMeterStateControl(string text) : base(text)
|
||||
{
|
||||
HasMeter = false;
|
||||
setImage(Xylem.Common.Ui.CordonelPreadjustmentUi.Properties.Resources.thermometer);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Watcher
|
||||
{
|
||||
interface IWatcher
|
||||
{
|
||||
event EventHandler OnWatcherFailed;
|
||||
Task<bool> RunWatch();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Watcher
|
||||
{
|
||||
interface IWatcherNeedCalibrationData
|
||||
{
|
||||
void SetData(List<CalibrationRecord> l);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords;
|
||||
|
||||
namespace CordonelPreadjustmentUi.Watcher
|
||||
{
|
||||
public class TempWatcher : IWatcher, IWatcherNeedCalibrationData
|
||||
{
|
||||
private List<CalibrationRecord> cRecords;
|
||||
private decimal? minTemp;
|
||||
private decimal? maxTemp;
|
||||
private decimal? currentTemp;
|
||||
|
||||
public event EventHandler OnWatcherFailed;
|
||||
|
||||
public Task<bool> RunWatch()
|
||||
{
|
||||
var t = new Task<bool>(() =>
|
||||
{
|
||||
var failed = false;
|
||||
|
||||
|
||||
//if (cRecords != null && cRecords.Any())
|
||||
//{
|
||||
// var recordsSinceLastRun = cRecords.Where(d => d.DecodedTime <= DateTimeOffset.UtcNow.AddSeconds(WatcherInvervalS)).ToList();
|
||||
// var checkTempMeter = (decimal)recordsSinceLastRun.Average(a => a.TemperatureDegC);
|
||||
// currentTemp = checkTempMeter;
|
||||
// if (!minTemp.HasValue || currentTemp < minTemp.Value)
|
||||
// {
|
||||
// minTemp = currentTemp;
|
||||
// }
|
||||
// if (!maxTemp.HasValue || currentTemp > maxTemp.Value)
|
||||
// {
|
||||
// maxTemp = currentTemp;
|
||||
// }
|
||||
|
||||
// SetTemperature(currentTemp.Value, false);
|
||||
|
||||
|
||||
// if (minTemp)
|
||||
// {
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
if (failed)
|
||||
{
|
||||
|
||||
|
||||
OnWatcherFailed.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
return failed;
|
||||
});
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
public void SetData(List<CalibrationRecord> l)
|
||||
{
|
||||
|
||||
cRecords = l.ToList();
|
||||
|
||||
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,414 @@
|
||||
using CordonelPreadjustmentUi.Const;
|
||||
using CordonelPreadjustmentUi.Helper;
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Logic.ProductionToProductMapper.Cordonel;
|
||||
using Xylem.Common.CommonCore.Consts;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.EventArguments;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
|
||||
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
|
||||
using Xylem.Common.Ui.CordonelPreadjustmentUi.Helper.Extensions;
|
||||
|
||||
namespace CordonelPreadjustmentUi
|
||||
{
|
||||
public class ZeroFlowGenesisMeter : GenesisMeter
|
||||
{
|
||||
|
||||
|
||||
#region Data logging
|
||||
|
||||
private bool logZeroFlow = false;
|
||||
public bool logAmpTest = false;
|
||||
|
||||
#endregion
|
||||
private CultureInfo GlobalCulture { get; set; }
|
||||
public Byte Gp30LastByte { get; set; }
|
||||
private Byte[] GP30LastRegister { get; set; }
|
||||
public void SetGP30LastRegister(Byte[] data)
|
||||
{
|
||||
GP30LastRegister = data;
|
||||
}
|
||||
private Byte GP30LastPayloadLsb { get; set; }
|
||||
public Byte GP30LastCommand { get; set; }
|
||||
private Byte GP30RXPayload { get; set; }
|
||||
private Boolean GP30RequestStarted { get; set; }
|
||||
private Boolean GP30RequestFailed { get; set; }
|
||||
private Boolean GP30RequestGotAnswer { get; set; }
|
||||
private Byte Privilege { get; set; }
|
||||
private Byte FirstHitLevelUpPath0 { get; set; }
|
||||
private Byte FirstHitLevelUpPath1 { get; set; }
|
||||
private Byte FirstHitLevelUpPath2 { get; set; }
|
||||
private Byte FirstHitLevelDownPath0 { get; set; }
|
||||
private Byte FirstHitLevelDownPath1 { get; set; }
|
||||
private Byte FirstHitLevelDownPath2 { get; set; }
|
||||
private Byte PercentPath0 { get; set; }
|
||||
private Byte PercentPath1 { get; set; }
|
||||
private Byte PercentPath2 { get; set; }
|
||||
public Byte Subreason { get; set; }
|
||||
private Byte Starthit { get; set; }
|
||||
private Byte StoreCalibration { get; set; }
|
||||
private Byte Amplitude { get; set; }
|
||||
private Byte Samplerate { get; set; }
|
||||
private UInt16 CalibrationFactorPath0 { get; set; }
|
||||
private UInt16 CalibrationFactorPath1 { get; set; }
|
||||
private UInt16 CalibrationFactorPath2 { get; set; }
|
||||
private Int32 ZeroOffsetPath0 { get; set; }
|
||||
private Int32 ZeroOffsetPath1 { get; set; }
|
||||
private Int32 ZeroOffsetPath2 { get; set; }
|
||||
private Byte LedMode { get; set; }
|
||||
private Byte UpdatePeriode { get; set; }
|
||||
private Byte FirstHitShift { get; set; }
|
||||
private UInt32 ToFTempCalibrate { get; set; }
|
||||
|
||||
|
||||
|
||||
private Int32 ToFTempOffsetPath0 { get; set; }
|
||||
private Int32 ToFTempOffsetPath1 { get; set; }
|
||||
private Int32 ToFTempOffsetPath2 { get; set; }
|
||||
public Int32 MeterNumber { get; set; }
|
||||
private Byte MeterSize { get; set; }
|
||||
public bool CalculationIndicatorZeroFlowTest { get; private set; }
|
||||
public bool LoggingIndicatorZeroFlowTest { get; private set; }
|
||||
public long ZeroflowOffsetTestNumberOfLines { get; private set; }
|
||||
|
||||
public Boolean LogOnEnable;
|
||||
public Boolean AmplitudeEnable;
|
||||
public Boolean ZeroFlowOffsetEnable;
|
||||
public Boolean TempCalEnable;
|
||||
public Boolean CompletionEnable;
|
||||
public Boolean LoginFailed;
|
||||
public Boolean PreparationFailed;
|
||||
public Boolean AmplitudeFailed;
|
||||
public Boolean ZeroFlowOffsetFailed;
|
||||
public Boolean TempCalFailed;
|
||||
public Boolean CompletionFailed;
|
||||
public Boolean Ok;
|
||||
public Boolean EmptyPipeCheckEnable;
|
||||
public Boolean EmptyPipeCheckFailed;
|
||||
public Boolean MeterSelected;
|
||||
|
||||
|
||||
public CalibrationResult calibrationResult = new CalibrationResult();
|
||||
public ConcurrentQueue<CalibrationRecord> CurrentRecords = new ConcurrentQueue<CalibrationRecord>();
|
||||
public ZeroFlowGenesisMeter(int Slot, int PathsCount = 3, bool ignorCurruptdata = true) : base()
|
||||
{
|
||||
|
||||
base.SetupFromConfigFile(Slot, ignorCurruptdata);
|
||||
|
||||
|
||||
//base.EnableAutoLogon();
|
||||
Setup(PathsCount);
|
||||
|
||||
//on zeroflow every param has to be stored
|
||||
_configuration.UseRegisterWatchService = true;
|
||||
_configuration.RegisterWatchServiceUrl = Xylem.Common.CommonCore.Configuration.ServiceUrls.RegisterWatchServiceUrl();
|
||||
|
||||
}
|
||||
public ZeroFlowGenesisMeter(int Slot, int PathsCount, PortConfig request, PortConfig streaming, bool ignoreCurrptData) : base()
|
||||
{
|
||||
base.SetupGenesisMeter(Slot, request, streaming, ignoreCurrptData);
|
||||
// base.EnableAutoLogon();
|
||||
Setup(PathsCount);
|
||||
|
||||
//overide register watch service
|
||||
//on zeroflow every param has to be stored
|
||||
_configuration.UseRegisterWatchService = true;
|
||||
|
||||
}
|
||||
private void Setup(int PathsCount)
|
||||
{
|
||||
base.LogRawData(true);
|
||||
this.GP30LastRegister = new Byte[2] { 0, 0 };
|
||||
this.GP30LastPayloadLsb = 0;
|
||||
this.GP30LastCommand = 0;
|
||||
this.GP30RXPayload = 0;
|
||||
this.GP30RequestStarted = false;
|
||||
this.GP30RequestFailed = false;
|
||||
this.GP30RequestGotAnswer = false;
|
||||
this.FirstHitLevelUpPath0 = 0;
|
||||
this.FirstHitLevelUpPath1 = 0;
|
||||
this.FirstHitLevelUpPath2 = 0;
|
||||
this.FirstHitLevelDownPath0 = 0;
|
||||
this.FirstHitLevelDownPath1 = 0;
|
||||
this.FirstHitLevelDownPath2 = 0;
|
||||
this.Starthit = 0;
|
||||
this.Amplitude = 0;
|
||||
this.Samplerate = 0;
|
||||
this.CalibrationFactorPath0 = 0;
|
||||
this.CalibrationFactorPath1 = 0;
|
||||
this.CalibrationFactorPath2 = 0;
|
||||
this.ZeroOffsetPath0 = 0;
|
||||
this.ZeroOffsetPath1 = 0;
|
||||
this.ZeroOffsetPath2 = 0;
|
||||
this.LedMode = 0;
|
||||
this.MeterNumber = Slot;
|
||||
this.GlobalCulture = CultureInfo.CreateSpecificCulture("en-US");
|
||||
this.Gp30LastByte = 0;
|
||||
|
||||
linesRecived = new MultiPathDataLogContainer<Int64>(PathsCount);
|
||||
listOfTotalTimeOfFlightSPerPath = new ActivityCheckMultiPathDataLogContainer<List<Double>>(PathsCount);
|
||||
listOfTotalTimeOfFlightSPerPath.Update(null, new List<Double>());
|
||||
|
||||
BadDataCounterZeroFlowTest = new MultiPathDataLogContainer<Int64>(PathsCount);
|
||||
LineCounterZeroFlowTest = new MultiPathDataLogContainer<Int64>(PathsCount);
|
||||
AmplitudeValuesUp = new MultiPathDataLogContainer<List<double>>(PathsCount);
|
||||
AmplitudeValuesDown = new MultiPathDataLogContainer<List<double>>(PathsCount);
|
||||
DeltaTimeOfFlightAverage = new MultiPathDataLogContainer<List<double>>(PathsCount);
|
||||
Decoded = new MultiPathDataLogContainer<CalibrationRecord>(PathsCount);
|
||||
}
|
||||
|
||||
public Boolean CheckStreamingPort()
|
||||
{
|
||||
if (!StreamingPort.IsOpen())
|
||||
{
|
||||
base.StreamingPort.Open();
|
||||
}
|
||||
return StreamingPort.IsOpen();
|
||||
}
|
||||
public Boolean CheckRequestPort()
|
||||
{
|
||||
if (!RequestPort.IsOpen())
|
||||
{
|
||||
base.RequestPort.Open();
|
||||
}
|
||||
return RequestPort.IsOpen();
|
||||
}
|
||||
public void StartRecordData(int zeroflowOffsetTestNumberOfLines = 0)
|
||||
{
|
||||
CurrentRecords.Clear();
|
||||
StreamingProtocol.OnRecordIsDecoded += StreamingProtocol_OnRecordIsDecoded; ;
|
||||
SyncStreamingBuffer(SyncMarkRecord.DecodeEveryPackage);
|
||||
ZeroflowOffsetTestNumberOfLines = zeroflowOffsetTestNumberOfLines;
|
||||
}
|
||||
private List<string> logContent = new List<String>();
|
||||
|
||||
public ActivityCheckMultiPathDataLogContainer<List<double>> listOfTotalTimeOfFlightSPerPath;
|
||||
private MultiPathDataLogContainer<Int64> linesRecived;
|
||||
|
||||
private MultiPathDataLogContainer<Int64> BadDataCounterZeroFlowTest;
|
||||
private MultiPathDataLogContainer<Int64> LineCounterZeroFlowTest;
|
||||
private MultiPathDataLogContainer<List<double>> AmplitudeValuesUp;
|
||||
private MultiPathDataLogContainer<List<double>> AmplitudeValuesDown;
|
||||
private MultiPathDataLogContainer<List<double>> DeltaTimeOfFlightAverage;
|
||||
|
||||
private MultiPathDataLogContainer<CalibrationRecord> Decoded;
|
||||
internal void DataLog(string text)
|
||||
{
|
||||
logContent.Add(text);
|
||||
//todo nlog!
|
||||
}
|
||||
private void StreamingProtocol_OnRecordIsDecoded(object sender, BaseDataEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (e is CalibDataEventArgs)
|
||||
{
|
||||
|
||||
var decodedDate = (CalibDataEventArgs)e;
|
||||
var data = decodedDate.CalibChl;
|
||||
if (Slot == 10 && data.Channel == 2)
|
||||
{
|
||||
String time = DateTime.Now.ToString(Formats.RawDataDateTimeLogString);
|
||||
DataLog($"{time} {decodedDate.RawData}\n");
|
||||
}
|
||||
CurrentRecords.Enqueue(data);
|
||||
//todo make new imesturementrecord according to units need by zeroflow app
|
||||
var TotalTimeOfFlightS = data.TotalTimeOfFlightS * 1000000;
|
||||
Double temp = data.DeltaTimeOfFlightS;
|
||||
//data.DeltaTimeOfFlightS = data.DeltaTimeOfFlightS * (1.0 / 0x4000000000); // 2^38;
|
||||
data.AmplitudeUpV = data.AmplitudeUpV * 1000.0;
|
||||
data.AmplitudeDownV = data.AmplitudeDownV * 1000.0;
|
||||
|
||||
#region Logging (Zero flow test)
|
||||
if (logZeroFlow || logAmpTest)
|
||||
{
|
||||
String time = DateTime.Now.ToString(Formats.RawDataDateTimeLogString);
|
||||
DataLog($"{time} {decodedDate.RawData}\n");
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region Add to list h-protocol
|
||||
UInt16 Path = (UInt16)(decodedDate.CalibChl.Channel - 1);
|
||||
//todo check if isValid == crc Ok
|
||||
if (decodedDate.CalibChl.IsValid)
|
||||
{
|
||||
#region Activity check for empty pipe test
|
||||
linesRecived.Update(Path, linesRecived.Get(Path) + 1);
|
||||
#endregion
|
||||
|
||||
#region Data for amplitude test
|
||||
|
||||
if (logAmpTest)
|
||||
{
|
||||
DataLog($"Add {TotalTimeOfFlightS} for chnl {Path}\n");
|
||||
var tmp = listOfTotalTimeOfFlightSPerPath.Get(Path).ToList();
|
||||
tmp.Add(TotalTimeOfFlightS);
|
||||
listOfTotalTimeOfFlightSPerPath.Update(Path, tmp);
|
||||
}
|
||||
#endregion
|
||||
#region Data for zero flow test
|
||||
|
||||
var meterDone = true;
|
||||
|
||||
for (int i = 0; i < LineCounterZeroFlowTest.GetPathCount(); i++)
|
||||
{
|
||||
if (LineCounterZeroFlowTest.Get(i) < ZeroflowOffsetTestNumberOfLines)
|
||||
{
|
||||
meterDone = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (meterDone)
|
||||
{
|
||||
CalculationIndicatorZeroFlowTest = false;
|
||||
LoggingIndicatorZeroFlowTest = false;
|
||||
}
|
||||
if (CalculationIndicatorZeroFlowTest)
|
||||
{
|
||||
#region Bad data check
|
||||
if (decodedDate.CalibChl.Validation == DataErrorCodes.NoError)
|
||||
{
|
||||
AmplitudeValuesUp.Get(Path).Add(decodedDate.CalibChl.AmplitudeUpV);
|
||||
AmplitudeValuesDown.Get(Path).Add(decodedDate.CalibChl.AmplitudeDownV);
|
||||
DeltaTimeOfFlightAverage.Get(Path).Add(decodedDate.CalibChl.DeltaTimeOfFlightS);
|
||||
|
||||
LineCounterZeroFlowTest.Update(Path, LineCounterZeroFlowTest.Get(Path) + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
BadDataCounterZeroFlowTest.Update(Path, BadDataCounterZeroFlowTest.Get(Path) + 1);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
#region Copy to global object
|
||||
Decoded.Update(Path, data);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
DataLog($"Exception occur {e}\n");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void StopRecordData()
|
||||
{
|
||||
StreamingProtocol.OnRecordIsDecoded -= StreamingProtocol_OnRecordIsDecoded;
|
||||
SyncStreamingBuffer(SyncMarkRecord.SkipDecoding);
|
||||
}
|
||||
|
||||
internal void Flush()
|
||||
{
|
||||
if (StreamingPort == null)
|
||||
{
|
||||
throw new ApplicationException("Synchronization not possible due to undefined streaming port");
|
||||
}
|
||||
SyncStreamingBuffer(SyncMarkRecord.FlushBuffer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public new Boolean WriteRegisterUnsafe<T>(string reg, T value)
|
||||
{
|
||||
var RetrysLeft = 12;
|
||||
|
||||
|
||||
while (RetrysLeft >= 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = base.WriteRegister(reg, value, true, false);
|
||||
if (result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
Thread.Sleep(1500);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
base.WriteLog($"Can not WriteRegisterUnsafe retry left: {RetrysLeft}, message: {e.Message}");
|
||||
}
|
||||
RetrysLeft = RetrysLeft - 1;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public new Boolean WriteRegisterSafe<T>(string reg, T value)
|
||||
{
|
||||
var RetrysLeft = 12;
|
||||
|
||||
|
||||
while (RetrysLeft >= 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = base.WriteRegister(reg, value, true, true);
|
||||
if (result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
Thread.Sleep(1500);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
base.WriteLog($"Can not WriteRegisterUnsafe retry left: {RetrysLeft}, message: {e.Message}");
|
||||
}
|
||||
RetrysLeft = RetrysLeft - 1;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public new Byte[] ReadRegister(string reg)
|
||||
{
|
||||
|
||||
|
||||
var RetrysLeft = 12;
|
||||
|
||||
Exception lastEx = null;
|
||||
while (RetrysLeft >= 0)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
return base.ReadRegister(reg);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
lastEx = e;
|
||||
base.WriteLog($"Can not WriteRegisterUnsafe retry left: {RetrysLeft}, message: {e.Message}");
|
||||
}
|
||||
Thread.Sleep(1500);
|
||||
RetrysLeft = RetrysLeft - 1;
|
||||
}
|
||||
|
||||
if (lastEx == null)
|
||||
{
|
||||
throw new ApplicationException("something went totally wrong on ReadRegister. no Exception found");
|
||||
}
|
||||
throw new ApplicationException($"something went wrong on ReadRegister.Message{lastEx.Message}");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" />
|
||||
<package id="PDFsharp" version="1.50.5147" targetFramework="net40" />
|
||||
</packages>
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+28
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<assemblyIdentity name="Xylem.Common.Ui.CordonelPreadjustmentUi.application" version="1.0.0.0" publicKeyToken="45b773ab065a3524" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<description asmv2:publisher="Xylem.Common.Ui.CordonelPreadjustmentUi" asmv2:product="Xylem.Common.Ui.CordonelPreadjustmentUi" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<deployment install="true" mapFileExtensions="true">
|
||||
<subscription>
|
||||
<update>
|
||||
<beforeApplicationStartup />
|
||||
</update>
|
||||
</subscription>
|
||||
<deploymentProvider codebase="file://sla12file/auftrag/Aktuelle%20Anwendungen/CordonelPreadjustmentUiBETAV2/Xylem.Common.Ui.CordonelPreadjustmentUi.application" />
|
||||
</deployment>
|
||||
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<framework targetVersion="4.0" profile="Full" supportedRuntime="4.0.30319" />
|
||||
</compatibleFrameworks>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" codebase="Application Files\Xylem.Common.Ui.CordonelPreadjustmentUi_1_0_0_0\Xylem.Common.Ui.CordonelPreadjustmentUi.exe.manifest" size="28666">
|
||||
<assemblyIdentity name="Xylem.Common.Ui.CordonelPreadjustmentUi.exe" version="1.0.0.0" publicKeyToken="45b773ab065a3524" language="neutral" processorArchitecture="msil" type="win32" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>CjIFOA1c7cggjt5HysjCqyqQ8xg=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<publisherIdentity name="CN=SPXMLU\DRABESCH_RO" issuerKeyHash="bd82ddf899bf55d825be194180e60f08684831e3" /><Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>pm3UNc4f9ixczL3xH6WDMJZzKSo=</DigestValue></Reference></SignedInfo><SignatureValue>Ev67jJAhUQSJa4pWmTXbQV4nPyKll5SdhWHa2Wtvzw1EOzusIlH99bxOe3/r8qsA8bSMTerLzrQv7264xx5tAgeHOEUcYtgHqB9yaqk2rV7qOBPiv6Jw1axqOmtGlOShpU+0LC9wyh48ifxCef7cjkbdGYBlGFJBHjiqPA+M0w8=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>vFEhJ9u6UX2fzGXb+ouEhrySdp9QZPmMIW4vxQV2W9oH7IbXF85QBYIL60xEmm91SUxMhJdihF3lnQvllfPLAqeurqXSpNgFIPcBIbr/ruRvr7ef2gLL/6AOr3A1aicXcZ9cHDRaavw1Z41LKSbkD7ik1uxoQKLN1XHhMi7wosk=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="2a2973963083a51ff1bdcc5c2cf61fce35d46da6" Description="" Url=""><as:assemblyIdentity name="Xylem.Common.Ui.CordonelPreadjustmentUi.application" version="1.0.0.0" publicKeyToken="45b773ab065a3524" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=SPXMLU\DRABESCH_RO</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>SlYRXfDu1R2mOEREbZIa2iXSLb8=</DigestValue></Reference></SignedInfo><SignatureValue>GOSAM2ep08S1YpQLWLNaS4Rj56D5SomgPr1AZRxdTGVwYEPSP1cxXpD1q9dDYBARghYHfftLC+8jK0h7ylmlK5GovOeGJnCRL/ghswX8xIpDbc6xGzZHjhX8TUyNkWgq1a8fiaqbDJ4ixNwWRbACNtDJv1QAiCCfD2/dB+b+HYk=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>vFEhJ9u6UX2fzGXb+ouEhrySdp9QZPmMIW4vxQV2W9oH7IbXF85QBYIL60xEmm91SUxMhJdihF3lnQvllfPLAqeurqXSpNgFIPcBIbr/ruRvr7ef2gLL/6AOr3A1aicXcZ9cHDRaavw1Z41LKSbkD7ik1uxoQKLN1XHhMi7wosk=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIB4TCCAUqgAwIBAgIQK6+bO+IxUJ5K0u3ej/IiLjANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDHiQAUwBQAFgATQBMAFUAXABEAFIAQQBCAEUAUwBDAEgAXwBSAE8wHhcNMjAwOTE2MDYwMDAzWhcNMjEwOTE2MTIwMDAzWjAvMS0wKwYDVQQDHiQAUwBQAFgATQBMAFUAXABEAFIAQQBCAEUAUwBDAEgAXwBSAE8wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALxRISfbulF9n8xl2/qLhIa8knafUGT5jCFuL8UFdlvaB+yG1xfOUAWCC+tMRJpvdUlMTISXYoRd5Z0L5ZXzywKnrq6l0qTYBSD3ASG6/67kb6+3n9oCy/+gDq9wNWonF3GfXBw0Wmr8NWeNSykm5A+4pNbsaECizdVx4TIu8KLJAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAeNUFq2GIZ4mpG8O/prqu35nqLwfjwlvlbtXdwyFGU9F7v+aDxoc+cPhSvL8phsG2XthyhSO2C1/okYdiTjguwD7xNcMS8/5Kh+OIv2Js9GKufV/nrtroxc7NCmfaG8ecNY1E/U6aJnm6H/+qdpvGq0H0U35+3CVRHVelVp6pe1o=</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
BIN
Binary file not shown.
+449
@@ -0,0 +1,449 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<asmv1:assemblyIdentity name="Xylem.Common.Ui.CordonelPreadjustmentUi.exe" version="1.0.0.0" publicKeyToken="45b773ab065a3524" language="neutral" processorArchitecture="msil" type="win32" />
|
||||
<application />
|
||||
<entryPoint>
|
||||
<assemblyIdentity name="Xylem.Common.Ui.CordonelPreadjustmentUi" version="1.0.7564.14404" language="neutral" processorArchitecture="msil" />
|
||||
<commandLine file="Xylem.Common.Ui.CordonelPreadjustmentUi.exe" parameters="" />
|
||||
</entryPoint>
|
||||
<trustInfo>
|
||||
<security>
|
||||
<applicationRequestMinimum>
|
||||
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
|
||||
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||
</applicationRequestMinimum>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!--
|
||||
UAC Manifest Options
|
||||
If you want to change the Windows User Account Control level replace the
|
||||
requestedExecutionLevel node with one of the following.
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
If you want to utilize File and Registry Virtualization for backward
|
||||
compatibility then delete the requestedExecutionLevel node.
|
||||
-->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<dependency>
|
||||
<dependentOS>
|
||||
<osVersionInfo>
|
||||
<os majorVersion="5" minorVersion="1" buildNumber="2600" servicePackMajor="0" />
|
||||
</osVersionInfo>
|
||||
</dependentOS>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="CommonCore.ThreadWatcher.dll" size="5632">
|
||||
<assemblyIdentity name="CommonCore.ThreadWatcher" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>U51wPkAOYqfXPgZIXa3PVl2C1Vg=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Logic.ProductionToProductMapper.dll" size="13824">
|
||||
<assemblyIdentity name="Logic.ProductionToProductMapper" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>c52FNTJbtoVs1MHwhEEZVQzLHLI=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Newtonsoft.Json.dll" size="574376">
|
||||
<assemblyIdentity name="Newtonsoft.Json" version="12.0.0.0" publicKeyToken="30AD4FE6B2A6AEED" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>fPRsuBw7UZZcH3h2KEDrV5dZR3g=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="NLog.dll" size="816640">
|
||||
<assemblyIdentity name="NLog" version="4.0.0.0" publicKeyToken="5120E14C03D0593C" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>N8bfu5NE4Mqj/usnD7lzG+uC/XI=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PdfSharp.dll" size="535040">
|
||||
<assemblyIdentity name="PdfSharp" version="1.50.5147.0" publicKeyToken="F94615AA0424F9EB" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>o5lptA+hf3Vw/hMU6eiyHaabOf4=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="PdfSharp.Charting.dll" size="80896">
|
||||
<assemblyIdentity name="PdfSharp.Charting" version="1.50.5147.0" publicKeyToken="F94615AA0424F9EB" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>hqLa3vZ3TlB2sFukVu14wQliigM=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="de\PdfSharp.Charting.resources.dll" size="4608">
|
||||
<assemblyIdentity name="PdfSharp.Charting.resources" version="1.50.5147.0" publicKeyToken="F94615AA0424F9EB" language="de" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>PX8jGeSgNLBkxrAupb0yDO5RUts=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="de\PdfSharp.resources.dll" size="5120">
|
||||
<assemblyIdentity name="PdfSharp.resources" version="1.50.5147.0" publicKeyToken="F94615AA0424F9EB" language="de" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>Kc8r1l/csUf3l37w+jqpUh79JoE=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="RestSharp.dll" size="165376">
|
||||
<assemblyIdentity name="RestSharp" version="105.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>8rcd5Qxo0sVyAgbWlsuf57PmM1Q=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.CommonCore.dll" size="8192">
|
||||
<assemblyIdentity name="Xylem.Common.CommonCore" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>HksiXY3nzbpjsgd+RKPHuGWBXmk=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.CommonCore.Configuration.dll" size="11264">
|
||||
<assemblyIdentity name="Xylem.Common.CommonCore.Configuration" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>U7ZSGck1ryjUUy4/MtTvkS9aSCY=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.Interfaces.Ports.PortCore.dll" size="6656">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.Interfaces.Ports.PortCore" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>0vMn0/TCScHEqZM8lY+DSsxuEqg=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.Interfaces.Ports.SerialPorts.dll" size="19968">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.Interfaces.Ports.SerialPorts" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>aaxMXuZs9fz30p0RiNOyYuLEagA=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.Interfaces.Protocols.TransmitProtocol.dll" size="10240">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.Interfaces.Protocols.TransmitProtocol" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>SWowgbCX8vW6X057zEs20atg4xw=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.WaterMeter.Genesis.Applications.dll" size="5632">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.WaterMeter.Genesis.Applications" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>2HtU1eox8khcnhIQusYmxBXyNOE=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.dll" size="9728">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>9ZljLZbyLbel8XIAyvgLen2UTOU=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig.dll" size="9728">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>F4pak4O3XwHQ2RW2djwSmjVCPYU=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.dll" size="67072">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>wnDW4K7JTBS3VNqyFG9iHd67piI=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.ProtocolCore.dll" size="7680">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.ProtocolCore" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>sqcvWSbSx6I0seSC0nQCAgSl6HU=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol.dll" size="17920">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>DeXXw/ofDbnISfkKWoQ/q2yDGao=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol.dll" size="12288">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>rgL3IzRCZTPb/4f6DqQ+ZR8n5nE=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.WaterMeter.Genesis.Registers.dll" size="22528">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.WaterMeter.Genesis.Registers" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>GkyS8FN7feriDU+SS33GE06H4ho=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.WaterMeter.WaterMeterCore.dll" size="16384">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.WaterMeter.WaterMeterCore" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>XKMTiPpduOMwP9Dbx21zQDvdK7k=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Hardware.WaterMeter.WaterMeterRegisters.dll" size="5120">
|
||||
<assemblyIdentity name="Xylem.Common.Hardware.WaterMeter.WaterMeterRegisters" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>YYo65mL75UkmBWMDqFYL4w6CLJw=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Logic.ProductionOrderCore.dll" size="65536">
|
||||
<assemblyIdentity name="Xylem.Common.Logic.ProductionOrderCore" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>8LFrTId046WER9vjtRKlxpr3gyM=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Logic.RelatePcb.dll" size="6144">
|
||||
<assemblyIdentity name="Xylem.Common.Logic.RelatePcb" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>SeuG9X6ZxVhzec2YywzJlnaj6pc=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Logic.ServiceCore.dll" size="9216">
|
||||
<assemblyIdentity name="Xylem.Common.Logic.ServiceCore" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>lhQKWnPKCMuT+69s+ptcctoQkO8=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Logic.SoftwareAccessHelper.dll" size="9728">
|
||||
<assemblyIdentity name="Xylem.Common.Logic.SoftwareAccessHelper" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>sDhlVHZ6C+aQEE3GuiOnmK0axy0=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Metrology.Measurements.dll" size="14848">
|
||||
<assemblyIdentity name="Xylem.Common.Metrology.Measurements" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>6He1XeEdMXxuIFliFoeUS8H7r1c=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Ui.CordonelPreadjustmentUi.exe" size="4628392">
|
||||
<assemblyIdentity name="Xylem.Common.Ui.CordonelPreadjustmentUi" version="1.0.7564.14404" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>xTh/9mQv9BY0a5OesbDKmJUfduc=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Utils.ByteArrayStyle.dll" size="4608">
|
||||
<assemblyIdentity name="Xylem.Common.Utils.ByteArrayStyle" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>+4t54tlI1WxL5IJRTCNEDNOVDGg=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Utils.Crc16Ccitt.dll" size="5632">
|
||||
<assemblyIdentity name="Xylem.Common.Utils.Crc16Ccitt" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>ASQ7Bnsjo/VAynUcDKZM5b1hARk=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Xylem.Common.Utils.Logging.dll" size="11264">
|
||||
<assemblyIdentity name="Xylem.Common.Utils.Logging" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>08yYqg30SYjBkgrOeJxFh41JmeA=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<file name="Xylem.Common.Ui.CordonelPreadjustmentUi.exe.config" size="432">
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>RreiQPF/4zEAPXMkrh1ak/yYFXY=</dsig:DigestValue>
|
||||
</hash>
|
||||
</file>
|
||||
<publisherIdentity name="CN=SPXMLU\DRABESCH_RO" issuerKeyHash="bd82ddf899bf55d825be194180e60f08684831e3" /><Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>WGJA/Ug9V3wKi7+wSBL6rF6ZhfU=</DigestValue></Reference></SignedInfo><SignatureValue>IHHy4DQxSE3/xcd41m/blyxqTjRvy/df8a/tyOxXtK0zVbgJm7/NlgaJkc6T0O5e6oUY2TeQrzEBWW+RlGw6H1bcEqb+OZrXQtBG6K6VYPQS22pnrstcJM9immbO/ISf8tHFMb19WIt7Qv3C//nfAt29sr9dNlPIhTIdpJzJgfM=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>vFEhJ9u6UX2fzGXb+ouEhrySdp9QZPmMIW4vxQV2W9oH7IbXF85QBYIL60xEmm91SUxMhJdihF3lnQvllfPLAqeurqXSpNgFIPcBIbr/ruRvr7ef2gLL/6AOr3A1aicXcZ9cHDRaavw1Z41LKSbkD7ik1uxoQKLN1XHhMi7wosk=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="f585995eacfa1248b0bf8b0a7c573d48fd406258" Description="" Url=""><as:assemblyIdentity name="Xylem.Common.Ui.CordonelPreadjustmentUi.exe" version="1.0.0.0" publicKeyToken="45b773ab065a3524" language="neutral" processorArchitecture="msil" type="win32" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=SPXMLU\DRABESCH_RO</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>PCN+r7CEX/MLT2ei08StF32jbVw=</DigestValue></Reference></SignedInfo><SignatureValue>Q6ygg/LLsbDFe8Pg4PufhA8gQg5b/vT1+RH1XqB0q+tBj47VGB0fV+ZsOBSGLFUyklx3aURPwtU/gh0B9Tg5z9csypc2pXJT1jJhDQRcRSMgLDnKKJt6CHI3jdjkwlUMjEou1LSjcaXi/43p9bTqLOQ8W1Q/hWoBN4zKtTocLS4=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>vFEhJ9u6UX2fzGXb+ouEhrySdp9QZPmMIW4vxQV2W9oH7IbXF85QBYIL60xEmm91SUxMhJdihF3lnQvllfPLAqeurqXSpNgFIPcBIbr/ruRvr7ef2gLL/6AOr3A1aicXcZ9cHDRaavw1Z41LKSbkD7ik1uxoQKLN1XHhMi7wosk=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIB4TCCAUqgAwIBAgIQK6+bO+IxUJ5K0u3ej/IiLjANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDHiQAUwBQAFgATQBMAFUAXABEAFIAQQBCAEUAUwBDAEgAXwBSAE8wHhcNMjAwOTE2MDYwMDAzWhcNMjEwOTE2MTIwMDAzWjAvMS0wKwYDVQQDHiQAUwBQAFgATQBMAFUAXABEAFIAQQBCAEUAUwBDAEgAXwBSAE8wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALxRISfbulF9n8xl2/qLhIa8knafUGT5jCFuL8UFdlvaB+yG1xfOUAWCC+tMRJpvdUlMTISXYoRd5Z0L5ZXzywKnrq6l0qTYBSD3ASG6/67kb6+3n9oCy/+gDq9wNWonF3GfXBw0Wmr8NWeNSykm5A+4pNbsaECizdVx4TIu8KLJAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAeNUFq2GIZ4mpG8O/prqu35nqLwfjwlvlbtXdwyFGU9F7v+aDxoc+cPhSvL8phsG2XthyhSO2C1/okYdiTjguwD7xNcMS8/5Kh+OIv2Js9GKufV/nrtroxc7NCmfaG8ecNY1E/U6aJnm6H/+qdpvGq0H0U35+3CVRHVelVp6pe1o=</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+28
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<assemblyIdentity name="Xylem.Common.Ui.CordonelPreadjustmentUi.application" version="1.0.0.0" publicKeyToken="45b773ab065a3524" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<description asmv2:publisher="Xylem.Common.Ui.CordonelPreadjustmentUi" asmv2:product="Xylem.Common.Ui.CordonelPreadjustmentUi" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<deployment install="true" mapFileExtensions="true">
|
||||
<subscription>
|
||||
<update>
|
||||
<beforeApplicationStartup />
|
||||
</update>
|
||||
</subscription>
|
||||
<deploymentProvider codebase="file://sla12file/auftrag/Aktuelle%20Anwendungen/CordonelPreadjustmentUiBETAV2/Xylem.Common.Ui.CordonelPreadjustmentUi.application" />
|
||||
</deployment>
|
||||
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<framework targetVersion="4.0" profile="Full" supportedRuntime="4.0.30319" />
|
||||
</compatibleFrameworks>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" codebase="Application Files\Xylem.Common.Ui.CordonelPreadjustmentUi_1_0_0_0\Xylem.Common.Ui.CordonelPreadjustmentUi.exe.manifest" size="28666">
|
||||
<assemblyIdentity name="Xylem.Common.Ui.CordonelPreadjustmentUi.exe" version="1.0.0.0" publicKeyToken="45b773ab065a3524" language="neutral" processorArchitecture="msil" type="win32" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>CjIFOA1c7cggjt5HysjCqyqQ8xg=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<publisherIdentity name="CN=SPXMLU\DRABESCH_RO" issuerKeyHash="bd82ddf899bf55d825be194180e60f08684831e3" /><Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>pm3UNc4f9ixczL3xH6WDMJZzKSo=</DigestValue></Reference></SignedInfo><SignatureValue>Ev67jJAhUQSJa4pWmTXbQV4nPyKll5SdhWHa2Wtvzw1EOzusIlH99bxOe3/r8qsA8bSMTerLzrQv7264xx5tAgeHOEUcYtgHqB9yaqk2rV7qOBPiv6Jw1axqOmtGlOShpU+0LC9wyh48ifxCef7cjkbdGYBlGFJBHjiqPA+M0w8=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>vFEhJ9u6UX2fzGXb+ouEhrySdp9QZPmMIW4vxQV2W9oH7IbXF85QBYIL60xEmm91SUxMhJdihF3lnQvllfPLAqeurqXSpNgFIPcBIbr/ruRvr7ef2gLL/6AOr3A1aicXcZ9cHDRaavw1Z41LKSbkD7ik1uxoQKLN1XHhMi7wosk=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="2a2973963083a51ff1bdcc5c2cf61fce35d46da6" Description="" Url=""><as:assemblyIdentity name="Xylem.Common.Ui.CordonelPreadjustmentUi.application" version="1.0.0.0" publicKeyToken="45b773ab065a3524" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=SPXMLU\DRABESCH_RO</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>SlYRXfDu1R2mOEREbZIa2iXSLb8=</DigestValue></Reference></SignedInfo><SignatureValue>GOSAM2ep08S1YpQLWLNaS4Rj56D5SomgPr1AZRxdTGVwYEPSP1cxXpD1q9dDYBARghYHfftLC+8jK0h7ylmlK5GovOeGJnCRL/ghswX8xIpDbc6xGzZHjhX8TUyNkWgq1a8fiaqbDJ4ixNwWRbACNtDJv1QAiCCfD2/dB+b+HYk=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>vFEhJ9u6UX2fzGXb+ouEhrySdp9QZPmMIW4vxQV2W9oH7IbXF85QBYIL60xEmm91SUxMhJdihF3lnQvllfPLAqeurqXSpNgFIPcBIbr/ruRvr7ef2gLL/6AOr3A1aicXcZ9cHDRaavw1Z41LKSbkD7ik1uxoQKLN1XHhMi7wosk=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIB4TCCAUqgAwIBAgIQK6+bO+IxUJ5K0u3ej/IiLjANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDHiQAUwBQAFgATQBMAFUAXABEAFIAQQBCAEUAUwBDAEgAXwBSAE8wHhcNMjAwOTE2MDYwMDAzWhcNMjEwOTE2MTIwMDAzWjAvMS0wKwYDVQQDHiQAUwBQAFgATQBMAFUAXABEAFIAQQBCAEUAUwBDAEgAXwBSAE8wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALxRISfbulF9n8xl2/qLhIa8knafUGT5jCFuL8UFdlvaB+yG1xfOUAWCC+tMRJpvdUlMTISXYoRd5Z0L5ZXzywKnrq6l0qTYBSD3ASG6/67kb6+3n9oCy/+gDq9wNWonF3GfXBw0Wmr8NWeNSykm5A+4pNbsaECizdVx4TIu8KLJAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAeNUFq2GIZ4mpG8O/prqu35nqLwfjwlvlbtXdwyFGU9F7v+aDxoc+cPhSvL8phsG2XthyhSO2C1/okYdiTjguwD7xNcMS8/5Kh+OIv2Js9GKufV/nrtroxc7NCmfaG8ecNY1E/U6aJnm6H/+qdpvGq0H0U35+3CVRHVelVp6pe1o=</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
|
||||
Reference in New Issue
Block a user