diff --git a/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/EventArgs/FM2014AnswerEventArgs.cs b/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/EventArgs/FM2014AnswerEventArgs.cs new file mode 100644 index 00000000..616053f4 --- /dev/null +++ b/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/EventArgs/FM2014AnswerEventArgs.cs @@ -0,0 +1,101 @@ +/****************************************************************************************/ +/*!@file FM2014AnswerEventArgs.cs + * @brief The answer from the FM2014. + * + *=======================================================================================\n + * @copyright + * + *_______________________________________________________________________________________\n + * Copyright (c) 2026 SENSUS GmbH.\n + * All Rights Reserved.\n + * \n + * Confidential property of\n + * SENSUS GmbH,\n + * Meineckestr. 10, 30880 LAATZEN, GERMANY\n + * \n + *=======================================================================================\n + * @authors + * + *_______________________________________________________________________________________\n + * Thomas Wiedebusch\n + * + * + *=======================================================================================\n + * @version + * + *_______________________________________________________________________________________\n + * V1.00 08-Jan-2026 by Thomas Wiedebusch\n + * - Initial. + * + * + *=======================================================================================\n + */ +using System; + +namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.EventArgs +{ + /// + /// Process progress to feed the progress bar. + /// + public class FM2014AnswerEventArgs : System.EventArgs + { + /// + /// The process progress shall feed the GUI progress bars with values + /// + public enum ProcessProgressType + { + /// + /// Overall progress max limit for a bunch of processes + /// + MaxOverallProcessSteps, + /// + /// Progress of a bunch of processes meaning single process finished + /// + OverallProcessesSteps, + /// + /// Actual progress max limit for subordinated process + /// + MaxActualProcessSteps, + /// + /// Actual progress step of subordinated process + /// + ActualProcessSteps, + /// + /// Just passing a value and answer without progress information + /// + WithoutProcess + } + /// + /// FM2014 command code + /// + public String CmdCharCode { get; private set; } + /// + /// Optional raw answer from FM2014 + /// + public String AnswerStr { get; private set; } + /// + /// Optional integer value + /// + public Int32? IntValue { get; private set; } + /// + /// Setup of progress type for progress bar + /// + public ProcessProgressType ProgressType { get; private set; } + + /// + /// Event arguments delivering answer code and message and optional a value and progress type + /// + /// FM2014 command code + /// Optional raw answer from FM2014 + /// Optional integer value + /// Setup of progress type for progress bar + public FM2014AnswerEventArgs(String cmdCharCode, String answerStr = null, Int32? intValue = null, + ProcessProgressType progressType = ProcessProgressType.WithoutProcess) + { + CmdCharCode = cmdCharCode; + AnswerStr = answerStr; + IntValue = intValue; + ProgressType = progressType; + } + } +} diff --git a/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014Core.csproj b/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014Core.csproj index 5f117f4f..3fff0274 100644 --- a/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014Core.csproj +++ b/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014Core.csproj @@ -283,6 +283,7 @@ + diff --git a/MiniPrf/Ui/FrmMainMiniPrf.cs b/MiniPrf/Ui/FrmMainMiniPrf.cs index d4036737..c12af601 100644 --- a/MiniPrf/Ui/FrmMainMiniPrf.cs +++ b/MiniPrf/Ui/FrmMainMiniPrf.cs @@ -8,7 +8,7 @@ * @copyright * *_______________________________________________________________________________________\n -* Copyright (c) 2025 SENSUS GmbH.\n +* Copyright (c) 2025..2026 SENSUS GmbH.\n * All Rights Reserved.\n * \n * Confidential property of\n