* 0.5 - Drained battery usage for assembly line, publish in auftrag folder

This commit is contained in:
Stoyan Zlatev 2026-02-05 11:49:23 +01:00
parent 2abd383fcd
commit a1fed4856b
9 changed files with 77 additions and 51 deletions

View File

@ -1,13 +1,7 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace CordonelAssemblyLine
namespace CordonelAssemblyLine
{
using System.Windows;
/// <summary>
/// Interaction logic for App.xaml
/// </summary>

View File

@ -14,10 +14,11 @@
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<IsWebBootstrapper>true</IsWebBootstrapper>
<PublishUrl>\\SLA12IIS01\LaaProductionWeb\Apps\CordonelAssembly\</PublishUrl>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkProfile />
<PublishUrl>Z:\Aktuelle Anwendungen\Publish\Cordonel Assembly Line\</PublishUrl>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
<InstallFrom>Unc</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
@ -25,19 +26,17 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<InstallUrl>http://sla12iis01.emea.sensus.net/LaaProductionWeb/Apps/CordonelAssembly/</InstallUrl>
<InstallUrl>\\sla12file\auftrag\Aktuelle Anwendungen\Publish\Cordonel Assembly Line\</InstallUrl>
<ProductName>Cordonel Assembly Line</ProductName>
<PublisherName>Xylem Sensus Laatzen</PublisherName>
<SuiteName>Cordonel Assembly Line</SuiteName>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<ApplicationRevision>8</ApplicationRevision>
<ApplicationRevision>13</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -81,7 +80,7 @@
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>305BF210A6BBE3C987AD135C96F7B55EC538E555</ManifestCertificateThumbprint>
<ManifestCertificateThumbprint>254AA244F3F29F0692A7B2FAA31F24C884355262</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>CordonelAssemblyLine_TemporaryKey.pfx</ManifestKeyFile>
@ -118,6 +117,11 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>sensus.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup />
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
@ -128,6 +132,7 @@
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml" />
@ -204,7 +209,7 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="CordonelAssemblyLine_TemporaryKey.pfx" />
@ -295,6 +300,12 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="Resources\sensus.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="sensus.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>del /Q /S *.xml *.pdb</PostBuildEvent>

View File

@ -5,13 +5,17 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ProductionControls1="clr-namespace:Ui.ProductionControls;assembly=ProductionControls"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" Closing="Window_Closing">
Title="Cordonel Assembly Line"
Height="450"
Width="800"
Closing="Window_Closing">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="100"/>
<RowDefinition Height="100"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="264*"/>
@ -114,5 +118,15 @@
<Button Name="btn2" Content="2" Grid.Column="3" HorizontalAlignment="Left" Height="28" Margin="52,36,0,0" Grid.Row="2" VerticalAlignment="Top" Width="17" Click="Btn2_Click"/>
<Button Name="btn3" Content="3" Grid.Column="3" HorizontalAlignment="Left" Height="28" Margin="89,36,0,0" Grid.Row="2" VerticalAlignment="Top" Width="17" Click="Btn3_Click"/>
<TextBlock Text="GoTo Current Directory ->"
Grid.Row="4"
FontFamily="Consolas"
FontStyle="Italic"
FontSize="10" Padding="0"
Margin="13 8"
Foreground="LightGray"
TextDecorations="Underline"
MouseDown="TextBlock_MouseDown"
Cursor="Hand"/>
</Grid>
</Window>

View File

@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Windows;
@ -167,5 +168,11 @@ namespace CordonelAssemblyLine
{
}
private void TextBlock_MouseDown(Object sender, System.Windows.Input.MouseButtonEventArgs e)
{
Process.Start(Environment.CurrentDirectory);
e.Handled = true;
}
}
}

View File

@ -625,14 +625,14 @@ namespace CordonelAssemblyLine.Model
//if (genesisStatus.AlternativeRequiredBatteryLoadPercent != null &&
// genesisStatus.AlternativeRequiredBatteryLoadPercent > requirements.MaxDrainedBatteryLoadPercentAssembly)
//{
// sbMSG.AppendLine($"{nameof(genesisStatus.AlternativeRequiredBatteryLoadPercent)}: " +
// $"{genesisStatus.AlternativeRequiredBatteryLoadPercent} > " + $"{requirements.MaxDrainedBatteryLoadPercentAssembly}");
// ret = false;
//}
//else sbMSG.AppendLine($"Alternative Batterieverbrauch Montage i.O.");
if (genesisStatus.AlternativeRequiredBatteryLoadPercent != null &&
genesisStatus.AlternativeRequiredBatteryLoadPercent > (requirements.MaxDrainedBatteryLoadPercentAssembly * 0.5))
{
sbMSG.AppendLine($"{nameof(genesisStatus.AlternativeRequiredBatteryLoadPercent)}: " +
$"{genesisStatus.AlternativeRequiredBatteryLoadPercent} > " + $"{requirements.MaxDrainedBatteryLoadPercentAssembly}");
ret = false;
}
else sbMSG.AppendLine($"Alternative Batterieverbrauch Montage i.O.");
// max bat verbrauch - MaxDrainedBatteryLoadPercentAssembly
if (genesisStatus.DrainedBatteryLoadPercent > requirements.MaxDrainedBatteryLoadPercentAssembly)
@ -1157,19 +1157,29 @@ namespace CordonelAssemblyLine.Model
if (rebootsCount > 0)
{
Log($"{_pcbId} hat {rebootsCount} mal neuegestarted!");
var messageBoxResult = MessageBox.Show(
$"{_pcbId} hat {rebootsCount}-mal neu gestartet!"
+ $"{Environment.NewLine}"
+ $"{Environment.NewLine}Möchten Sie fortfahren?"
, $"PcbId: {_pcbId}"
, $"Rechenwerk: {_pcbId}"
, MessageBoxButton.YesNo
, MessageBoxImage.Error
, MessageBoxImage.Warning
, MessageBoxResult.Yes
, MessageBoxOptions.ServiceNotification);
if (messageBoxResult == MessageBoxResult.No)
{
Log($"{_pcbId} hat {rebootsCount} mal neuegestarted!");
lblS02Color = _progressError;
lblS03Color = _progressError;
_state = PickingStateMachine.MeterError;
}
else
{
lblS02Color = _progressDone;
lblS03Color = _progressWaiting;
_state = PickingStateMachine.GetOrderDetails;
}
}
}
@ -1179,19 +1189,6 @@ namespace CordonelAssemblyLine.Model
}
lblS02Text = _pcbId;
if (_state != PickingStateMachine.MeterError)
{
lblS02Color = _progressDone;
lblS03Color = _progressWaiting;
_state = PickingStateMachine.GetOrderDetails;
}
else
{
lblS02Color = _progressError;
lblS03Color = _progressError;
_state = PickingStateMachine.MeterError;
}
}
catch (Exception e)
{

View File

@ -22,7 +22,7 @@ namespace CordonelAssemblyLine.Properties {
[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 {
public class Resources {
private static global::System.Resources.ResourceManager resourceMan;
@ -36,7 +36,7 @@ namespace CordonelAssemblyLine.Properties {
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CordonelAssemblyLine.Properties.Resources", typeof(Resources).Assembly);
@ -51,7 +51,7 @@ namespace CordonelAssemblyLine.Properties {
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}

View File

@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@ -60,6 +60,7 @@
: 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">
@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<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">
@ -85,9 +87,10 @@
<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" msdata:Ordinal="1" />
<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">
@ -109,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB