ProductionUiCordonel: - new assembly line processes
This commit is contained in:
parent
646ba4f30e
commit
fdffdf8a08
@ -99,6 +99,14 @@
|
||||
/// </summary>
|
||||
ReadyForShipping,
|
||||
/// <summary>
|
||||
/// Prepare for assembly line release
|
||||
/// </summary>
|
||||
PrepareAssemblyLineRelease,
|
||||
/// <summary>
|
||||
/// Completed to release the assembly line
|
||||
/// </summary>
|
||||
AssemblyLineRelease,
|
||||
/// <summary>
|
||||
/// Print return report
|
||||
/// </summary>
|
||||
PrintReturnReport,
|
||||
|
||||
@ -40,7 +40,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
{
|
||||
UserControl = new UcDialog
|
||||
{
|
||||
lblHeadLine = { Content = Resources.StrStateCheckAttachments },
|
||||
lblHeadLine = { Content = ProcessName },
|
||||
tbxMessage = { Text = "" }
|
||||
};
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
{
|
||||
UserControl = new UcDialog
|
||||
{
|
||||
lblHeadLine = { Content = Resources.StrStatePrepareShipping },
|
||||
lblHeadLine = { Content = ProcessName },
|
||||
tbxMessage = { Text = "" }
|
||||
};
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
{
|
||||
UserControl = new UcDialog
|
||||
{
|
||||
lblHeadLine = { Content = Resources.StrStateVisualInspection },
|
||||
lblHeadLine = { Content = ProcessName },
|
||||
tbxMessage = { Text = "" }
|
||||
};
|
||||
}
|
||||
|
||||
@ -155,10 +155,25 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
||||
processState: ProcessState.CheckProductionState,
|
||||
processInfo: Resources.StrStateCheckProductionState,
|
||||
productionProcessNo: 4,
|
||||
nextStateOnSuccess: ProcessState.Idle,
|
||||
nextStateOnSuccess: ProcessState.PrepareAssemblyLineRelease,
|
||||
// Wait before starting this process until this process has been successfully completed
|
||||
waitForSingleProcess: ProcessState.GetProgrammingParameters),
|
||||
|
||||
// Precondition: - All checks have to be executed with positive result
|
||||
new ProcessStateStruct(
|
||||
productionProcess: new PrepareAssemblyRelease(Resources.StrStatePrepareAssemblyRelease),
|
||||
processState: ProcessState.PrepareAssemblyLineRelease,
|
||||
processInfo: Resources.StrStatePrepareAssemblyRelease,
|
||||
productionProcessNo: 5,
|
||||
nextStateOnSuccess: ProcessState.AssemblyLineRelease),
|
||||
|
||||
new ProcessStateStruct(
|
||||
productionProcess: null,
|
||||
processState: ProcessState.AssemblyLineRelease,
|
||||
processInfo: Resources.StrStateAssemblyLineRelease,
|
||||
productionProcessNo: null,
|
||||
nextStateOnSuccess: ProcessState.Idle),
|
||||
|
||||
//TODO Roland: implement your states here
|
||||
#endregion -------------------------------- PICKING-STATES --------------------------------------------
|
||||
|
||||
|
||||
@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Xylem.Common.CommonCore.Consts;
|
||||
using Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Enum;
|
||||
using Xylem.Common.Production.ProductionUiCordonel.Properties;
|
||||
using Xylem.Common.Production.ProductionUiCordonel.UserControls;
|
||||
|
||||
namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.PickingProcesses
|
||||
{
|
||||
public class PrepareAssemblyRelease : BaseProductionProcess
|
||||
{
|
||||
/// <summary>
|
||||
/// Maximum of expected processing steps for this process to feed the GUI progress bar.
|
||||
/// Use the sleep 250 to create x seconds timeout;
|
||||
/// </summary>
|
||||
private const Int32 TimeoutLoop_ms = 250;
|
||||
private const Int32 Timeout_s = 30;
|
||||
private const Int32 MaxActualProgressSteps = 1000 / TimeoutLoop_ms * Timeout_s + 5;
|
||||
|
||||
/// <summary>
|
||||
/// Test finished can be good or abort by done button to exit this production process
|
||||
/// </summary>
|
||||
private Boolean _waitOnUserFeedback;
|
||||
|
||||
/// <summary>
|
||||
/// Ctor
|
||||
/// </summary>
|
||||
public PrepareAssemblyRelease(String name) : base(name)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void InitUserControl()
|
||||
{
|
||||
UserControl = new UcDialog
|
||||
{
|
||||
lblHeadLine = { Content = ProcessName },
|
||||
tbxMessage = { Text = "" }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Store all information to DB.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <remarks date="2025-Jul-08" author="Thomas Wiedebusch">
|
||||
/// - Initial.
|
||||
/// </remarks>
|
||||
public override StatusReturn ExecuteProcess()
|
||||
{
|
||||
try
|
||||
{
|
||||
_waitOnUserFeedback = true;
|
||||
SignalRunningState(MaxActualProgressSteps);
|
||||
|
||||
var ucDialog = (UcDialog)UserControl;
|
||||
|
||||
// Push progress will publish all application versions and the core version
|
||||
var retVal = Meter.PushProgress("Assembly", Version.ToString());
|
||||
if (retVal == StatusReturn.Failed)
|
||||
{
|
||||
return retVal;
|
||||
}
|
||||
ActualProcessProgress++;
|
||||
|
||||
|
||||
// Initialize the ucDialog
|
||||
ucDialog.SetHeadline(Resources.StrStateAssemblyLineRelease);
|
||||
ucDialog.SetMessage(Resources.StrInfoMeterBoxing);
|
||||
var OptionList = new List<UcDialog.DialogOption>();
|
||||
var okay = new UcDialog.DialogOption("Ok", Resources.StrInstructionMeterReady, () =>
|
||||
{
|
||||
ForcedSuccessExitState = ProcessState.AssemblyLineRelease;
|
||||
_waitOnUserFeedback = false;
|
||||
});
|
||||
OptionList.Add(okay);
|
||||
var print = new UcDialog.DialogOption(Resources.StrBtnPrintSuccessReport, Resources.StrInstructionSuccessPapers,
|
||||
() =>
|
||||
{
|
||||
ForcedSuccessExitState = ProcessState.PrintSuccessReport;
|
||||
_waitOnUserFeedback = false;
|
||||
});
|
||||
OptionList.Add(print);
|
||||
|
||||
ucDialog.SetDialogOptions(OptionList);
|
||||
|
||||
ActualProcessProgress = MaxActualProgressSteps;
|
||||
SetProcessProgressTo100Percent();
|
||||
|
||||
while (_waitOnUserFeedback && SingleProcessState != SingleProcessState.Idle)
|
||||
{
|
||||
}
|
||||
|
||||
// Always use okay to kick off ForcedSuccessExitState
|
||||
return StatusReturn.Okay;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ErrorMsgDispatcher(e.Message);
|
||||
return StatusReturn.Failed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -303,6 +303,7 @@
|
||||
<Compile Include="ProductionProcesses\PickingProcesses\CheckOrderNumber.cs" />
|
||||
<Compile Include="ProductionProcesses\PickingProcesses\CheckProductionState.cs" />
|
||||
<Compile Include="ProductionProcesses\PickingProcesses\PickingProcessStatesDef.cs" />
|
||||
<Compile Include="ProductionProcesses\PickingProcesses\PrepareAssemblyRelease.cs" />
|
||||
<Compile Include="ProductionProcesses\ProcessStateStruct.cs" />
|
||||
<Compile Include="Data\PickingResultData.cs" />
|
||||
<Compile Include="Data\PressureResultDataNotifyable.cs" />
|
||||
|
||||
@ -478,11 +478,25 @@ namespace Xylem.Common.Production.ProductionUiCordonel
|
||||
UiElmEnable(btnStart, false, !_autoStartFirstProductionProcess);
|
||||
UiElmEnable(btnStop, false);
|
||||
}
|
||||
// Prepare assembly line release
|
||||
if (e.State == ProcessState.PrepareAssemblyLineRelease)
|
||||
{
|
||||
_timer?.Stop();
|
||||
UiElmEnable(btnStart, false, !_autoStartFirstProductionProcess);
|
||||
UiElmEnable(btnStop, false);
|
||||
}
|
||||
// Ready for shipping
|
||||
if (e.State == ProcessState.ReadyForShipping)
|
||||
{
|
||||
// Create extended report including all steps and each register write, read and comparison
|
||||
CreateFile(Properties.Resources.StrInfoSuccessPapers);
|
||||
CreateFile(Properties.Resources.StrInfoSuccessShipping);
|
||||
BtnStop_Click(this, null);
|
||||
}
|
||||
// Ready after assembly
|
||||
if (e.State == ProcessState.AssemblyLineRelease)
|
||||
{
|
||||
// Create extended report including all steps and each register write, read and comparison
|
||||
CreateFile(Properties.Resources.StrInfoSuccessAssembly);
|
||||
BtnStop_Click(this, null);
|
||||
}
|
||||
// Print return report
|
||||
@ -901,7 +915,13 @@ namespace Xylem.Common.Production.ProductionUiCordonel
|
||||
private void PrintSuccessNote()
|
||||
{
|
||||
// Safe report to file
|
||||
CreateFile(Properties.Resources.StrInfoSuccessPapers, true, true);
|
||||
var msg = "";
|
||||
if (_strSoftwareNameVersion.Contains(Properties.Resources.StrEolSoftwareNameVersion))
|
||||
msg = Properties.Resources.StrInfoSuccessShipping;
|
||||
else if (_strSoftwareNameVersion.Contains(Properties.Resources.StrPickingSoftwareNameVersion))
|
||||
msg = Properties.Resources.StrInfoSuccessAssembly;
|
||||
|
||||
CreateFile(msg, true, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -978,12 +978,21 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cordonel assembly successfully finished! This report is for informational use..
|
||||
/// </summary>
|
||||
internal static string StrInfoSuccessAssembly {
|
||||
get {
|
||||
return ResourceManager.GetString("StrInfoSuccessAssembly", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cordonel is ready for shipment! This report is for informational use..
|
||||
/// </summary>
|
||||
internal static string StrInfoSuccessPapers {
|
||||
internal static string StrInfoSuccessShipping {
|
||||
get {
|
||||
return ResourceManager.GetString("StrInfoSuccessPapers", resourceCulture);
|
||||
return ResourceManager.GetString("StrInfoSuccessShipping", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -996,6 +1005,15 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cordonel completed!.
|
||||
/// </summary>
|
||||
internal static string StrInstructionMeterReady {
|
||||
get {
|
||||
return ResourceManager.GetString("StrInstructionMeterReady", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Attach return report to Cordonel and wait for clarification by QS!.
|
||||
/// </summary>
|
||||
@ -1599,6 +1617,15 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cordonel assembly completed.
|
||||
/// </summary>
|
||||
internal static string StrStateAssemblyLineRelease {
|
||||
get {
|
||||
return ResourceManager.GetString("StrStateAssemblyLineRelease", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Check attachments and assemblies.
|
||||
/// </summary>
|
||||
@ -1734,6 +1761,15 @@ namespace Xylem.Common.Production.ProductionUiCordonel.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Prepare for assembly line release.
|
||||
/// </summary>
|
||||
internal static string StrStatePrepareAssemblyRelease {
|
||||
get {
|
||||
return ResourceManager.GetString("StrStatePrepareAssemblyRelease", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Prepare for shipping.
|
||||
/// </summary>
|
||||
|
||||
@ -250,12 +250,18 @@
|
||||
<data name="StrStatePrepareShipping" xml:space="preserve">
|
||||
<value>Versandbereitschaft herstellen</value>
|
||||
</data>
|
||||
<data name="StrStatePrepareAssemblyRelease" xml:space="preserve">
|
||||
<value>Montageabschlußbestätigung</value>
|
||||
</data>
|
||||
<data name="StrStateRadioCheck" xml:space="preserve">
|
||||
<value>Funktest</value>
|
||||
</data>
|
||||
<data name="StrStateReadyForShipping" xml:space="preserve">
|
||||
<value>Cordonel ist versandfertig</value>
|
||||
</data>
|
||||
<data name="StrStateAssemblyLineRelease" xml:space="preserve">
|
||||
<value>Cordonel Montage erfolgreich</value>
|
||||
</data>
|
||||
<data name="StrStateRebootCordonel" xml:space="preserve">
|
||||
<value>Cordonel Neustart</value>
|
||||
</data>
|
||||
@ -769,7 +775,10 @@
|
||||
<data name="StrInstructionReturnPapers" xml:space="preserve">
|
||||
<value>Rückläuferschein beim Cordonel lassen und auf Klärung durch QS warten!</value>
|
||||
</data>
|
||||
<data name="StrInfoSuccessPapers" xml:space="preserve">
|
||||
<data name="StrInfoSuccessAssembly" xml:space="preserve">
|
||||
<value>Cordonel Montage erfolgreich beendet! Dieser Bericht dient der Information.</value>
|
||||
</data>
|
||||
<data name="StrInfoSuccessShipping" xml:space="preserve">
|
||||
<value>Cordonel ist fertig zum Versenden! Dieser Bericht dient der Information.</value>
|
||||
</data>
|
||||
<data name="StrInstructionSuccessPapers" xml:space="preserve">
|
||||
@ -781,9 +790,12 @@
|
||||
<data name="StrInstructionStop" xml:space="preserve">
|
||||
<value>Abbruch ohne Bericht!</value>
|
||||
</data>
|
||||
<data name="StrInstructionMeterBoxing" xml:space="preserve">
|
||||
<data name="StrInstructionMeterBoxing" xml:space="preserve">
|
||||
<value>Cordonel verpacken!</value>
|
||||
</data>
|
||||
<data name="StrInstructionMeterReady" xml:space="preserve">
|
||||
<value>Cordonel ist fertig!</value>
|
||||
</data>
|
||||
<data name="StrInfoMeterBoxing" xml:space="preserve">
|
||||
<value>Cordonel hat alle Tests bestanden!</value>
|
||||
</data>
|
||||
|
||||
@ -247,15 +247,21 @@
|
||||
<data name="StrStateLogOffCordonel" xml:space="preserve">
|
||||
<value>Log off from Cordonel</value>
|
||||
</data>
|
||||
<data name="StrStatePrepareShipping" xml:space="preserve">
|
||||
<data name="StrStatePrepareShipping" xml:space="preserve">
|
||||
<value>Prepare for shipping</value>
|
||||
</data>
|
||||
<data name="StrStatePrepareAssemblyRelease" xml:space="preserve">
|
||||
<value>Prepare for assembly line release</value>
|
||||
</data>
|
||||
<data name="StrStateRadioCheck" xml:space="preserve">
|
||||
<value>Check radio</value>
|
||||
</data>
|
||||
<data name="StrStateReadyForShipping" xml:space="preserve">
|
||||
<data name="StrStateReadyForShipping" xml:space="preserve">
|
||||
<value>Cordonel is ready for shipping</value>
|
||||
</data>
|
||||
<data name="StrStateAssemblyLineRelease" xml:space="preserve">
|
||||
<value>Cordonel assembly completed</value>
|
||||
</data>
|
||||
<data name="StrStateRebootCordonel" xml:space="preserve">
|
||||
<value>Reboot Cordonel</value>
|
||||
</data>
|
||||
@ -769,7 +775,10 @@
|
||||
<data name="StrInstructionReturnPapers" xml:space="preserve">
|
||||
<value>Attach return report to Cordonel and wait for clarification by QS!</value>
|
||||
</data>
|
||||
<data name="StrInfoSuccessPapers" xml:space="preserve">
|
||||
<data name="StrInfoSuccessAssembly" xml:space="preserve">
|
||||
<value>Cordonel assembly successfully finished! This report is for informational use.</value>
|
||||
</data>
|
||||
<data name="StrInfoSuccessShipping" xml:space="preserve">
|
||||
<value>Cordonel is ready for shipment! This report is for informational use.</value>
|
||||
</data>
|
||||
<data name="StrInstructionSuccessPapers" xml:space="preserve">
|
||||
@ -784,6 +793,9 @@
|
||||
<data name="StrInstructionMeterBoxing" xml:space="preserve">
|
||||
<value>Pack Cordonel!</value>
|
||||
</data>
|
||||
<data name="StrInstructionMeterReady" xml:space="preserve">
|
||||
<value>Cordonel completed!</value>
|
||||
</data>
|
||||
<data name="StrInfoMeterBoxing" xml:space="preserve">
|
||||
<value>Cordonel successfully passed all tests!</value>
|
||||
</data>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user