Merge branch 'main' of https://slm.sms-esaap.com/la_operations/laa_production
This commit is contained in:
commit
f3c137015f
@ -13,4 +13,4 @@ using System.Reflection;
|
||||
//
|
||||
//[assembly: AssemblyVersion("1.2.*.0")]
|
||||
|
||||
[assembly: AssemblyVersion("2.8.9.*")]
|
||||
[assembly: AssemblyVersion("2.8.10.*")]
|
||||
|
||||
@ -171,7 +171,7 @@
|
||||
</site>
|
||||
<site name="MeterProcessState(2)" id="4">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="E:\REPO\lab\la_operations\laa_production\Common\Service\MeterProcessState" />
|
||||
<virtualDirectory path="/" physicalPath="D:\Projekte\SENSUS_GitLab\LAA_PRODUCTION\Common\Service\MeterProcessState" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:50075:localhost" />
|
||||
|
||||
@ -63,6 +63,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=PCBID/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=perc/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=PERIODICLOG/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=POWEMON/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=POWERMON/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Preadjustment/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=prot/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
@ -10,9 +10,9 @@ namespace Xylem.Common.CommonCore.Configuration
|
||||
public static class ServiceUrls
|
||||
{
|
||||
//#if URI_OLD_DNS // this is defined in build configuration 'VPN_Debug' as the new DNS cannot be reached via VPN
|
||||
private const String ServerDns = "http://sla12iis01.emea.sensus.net";
|
||||
// private const String ServerDns = "http://sla12iis01.emea.sensus.net";
|
||||
//#else
|
||||
// private const String ServerDns = "http://delaz1web01.world.fluidtechnology.net";
|
||||
private const String ServerDns = "http://delaz1web01.world.fluidtechnology.net";
|
||||
//#endif
|
||||
|
||||
private static readonly String DefaultInspectCordonelRequirementInfoUrl =
|
||||
|
||||
@ -145,6 +145,11 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
/// </summary>
|
||||
public Boolean UseOfflinePasswords { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Remind the offline password for comparison if this is actively used
|
||||
/// </summary>
|
||||
public String OfflinePassword { protected set; get; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Process configuration
|
||||
/// </summary>
|
||||
@ -1219,6 +1224,9 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
/// <remarks date="2025-Oct-10" author="T.Wiedebusch">
|
||||
/// - Optional the offline passwords will be used.
|
||||
/// </remarks>
|
||||
/// <remarks date="2025-Oct-21" author="T.Wiedebusch">
|
||||
/// - BUGFIX: Avoid request of password from DB if offline password usage fored.
|
||||
/// </remarks>
|
||||
private String GetPassword()
|
||||
{
|
||||
// without PCB ID it is not possible to login,
|
||||
@ -1236,11 +1244,13 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
}
|
||||
}
|
||||
|
||||
// on unknown password try to get it from DB
|
||||
if (MeterPwdHandlerDb.GetPasswordFromDb(PcbId, out var password) && !UseOfflinePasswords)
|
||||
var password = "";
|
||||
// if NOT offline password usage required try to get it from DB
|
||||
if (!UseOfflinePasswords && MeterPwdHandlerDb.GetPasswordFromDb(PcbId, out password) )
|
||||
{
|
||||
Logger.Info($"Slot:{Slot} - Got password from GenesisPasswordService, " +
|
||||
$"URL({ServiceUrls.GenesisGetPasswordServiceUrl() + PcbId})");
|
||||
OfflinePassword = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1260,7 +1270,12 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
|
||||
if (!string.IsNullOrEmpty(password))
|
||||
{
|
||||
Logger.Info($"Slot:{Slot} - Got password for PcbId:{PcbId} from password file!");
|
||||
Logger.Info($"Slot:{Slot} - Got password for PcbId:{PcbId} from 'offline password' file!");
|
||||
OfflinePassword = password;
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Info($"Slot:{Slot} - 'offline password' file does not contain a password for PcbId:{PcbId} !");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -70,6 +70,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
/// <summary>
|
||||
/// List for un-reversed parameters which can be written, all others need to be swapped byte-wise
|
||||
/// </summary>
|
||||
//TODO THW take configuration.json and use for String and Array type, see RegisterConverter
|
||||
private static readonly List<String> _unReversedParameters = new List<String>
|
||||
{
|
||||
"SENSUSRADIO_Authentification", //UInt96
|
||||
@ -572,6 +573,23 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
|
||||
}
|
||||
|
||||
// Take this parameter as is
|
||||
//TODO THW take configuration.json and use for String and Array type, see RegisterConverter
|
||||
//take the register properties from configuration.json
|
||||
//get the pre-defined dictionary
|
||||
//var meterRegisters = MockGenesis based on FW version .GetConfigRegistersDefinitions();
|
||||
//var regDef = meterRegisters.GetRegisterDefinitionByName(proPar.RegisterName);
|
||||
//if (regDef.DataType.Name.Equals("Int32"))
|
||||
//{
|
||||
// Add parameter if it is not in the list
|
||||
//if (sortableProgrammingParameters.All(a => !proPar.RegisterName.Equals(a.RegisterName)))
|
||||
//{
|
||||
// sortableProgrammingParameters.Add(proPar);
|
||||
// continue;
|
||||
//}
|
||||
//}
|
||||
|
||||
|
||||
|
||||
if (_unReversedParameters.Contains(proPar.RegisterName))
|
||||
{
|
||||
// Add parameter if it is not in the list
|
||||
|
||||
@ -152,7 +152,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("not connected");
|
||||
MessageBox.Show(@"not connected");
|
||||
}
|
||||
}
|
||||
private void clbAlarms_SelectedIndexChanged(Object sender, EventArgs e)
|
||||
@ -163,7 +163,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
{
|
||||
if (e.NewValue == CheckState.Checked)
|
||||
{
|
||||
MessageBox.Show("Alarms cannot write, they have to set by meter");
|
||||
MessageBox.Show(@"Alarms cannot write, they have to set by meter");
|
||||
e.NewValue = CheckState.Unchecked;
|
||||
}
|
||||
else if (e.NewValue == CheckState.Unchecked)
|
||||
@ -456,11 +456,11 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
_currentGenesis.WriteRegister(Register.Metrologyasst.PulseMode, 0);
|
||||
button6.Enabled = true;
|
||||
button7.Enabled = false;
|
||||
MessageBox.Show("Weiter");
|
||||
MessageBox.Show(@"Weiter");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Noch mal 1. Connect");
|
||||
MessageBox.Show(@"Noch mal 1. Connect");
|
||||
}
|
||||
|
||||
|
||||
@ -498,11 +498,11 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
{
|
||||
if (cAlarm == Alarm.EMPTY_PIPE)
|
||||
{
|
||||
MessageBox.Show("weiter");
|
||||
MessageBox.Show(@"weiter");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Emptypipe fehlt bitte vor dem verpacken überprüfen");
|
||||
MessageBox.Show(@"Emptypipe fehlt bitte vor dem verpacken überprüfen");
|
||||
}
|
||||
|
||||
button7.Enabled = true;
|
||||
@ -511,7 +511,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("fehler");
|
||||
MessageBox.Show(@"fehler");
|
||||
}
|
||||
}
|
||||
|
||||
@ -521,7 +521,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
{
|
||||
finishMeter(_currentGenesis);
|
||||
File.AppendAllText("WriteLines.txt", _currentGenesis.PcbId + "mit Update;");
|
||||
MessageBox.Show("fertig");
|
||||
MessageBox.Show(@"fertig");
|
||||
|
||||
button6.Enabled = false;
|
||||
button7.Enabled = false;
|
||||
@ -533,9 +533,9 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
if (ex.Message.Contains("Check the configuration.json for latest version!"))
|
||||
{
|
||||
_currentGenesis.Login();
|
||||
MessageBox.Show("Wiederholen 3.");
|
||||
MessageBox.Show(@"Wiederholen 3.");
|
||||
}
|
||||
MessageBox.Show("fehler");
|
||||
MessageBox.Show(@"fehler");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("not connected");
|
||||
MessageBox.Show(@"not connected");
|
||||
}
|
||||
}
|
||||
private void btnWriteText_Click(Object sender, EventArgs e)
|
||||
@ -73,18 +73,18 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
|
||||
if (r)
|
||||
{
|
||||
MessageBox.Show($"Write was successful");
|
||||
MessageBox.Show($@"Write was successful");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"Write was unsuccessful!");
|
||||
MessageBox.Show($@"Write was unsuccessful!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("not connected");
|
||||
MessageBox.Show(@"not connected");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -457,7 +457,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Error On{item.Name}");
|
||||
MessageBox.Show($@"Error On{item.Name}");
|
||||
}
|
||||
|
||||
|
||||
@ -520,7 +520,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Error On{item.Name}");
|
||||
MessageBox.Show($@"Error On{item.Name}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -533,7 +533,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Error On{item.Name}");
|
||||
MessageBox.Show($@"Error On{item.Name}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -548,11 +548,11 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
|
||||
if (result.StatusCode == System.Net.HttpStatusCode.OK)
|
||||
{
|
||||
MessageBox.Show("done");
|
||||
MessageBox.Show(@"done");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"error{result.StatusCode} : {result.Content}");
|
||||
MessageBox.Show($@"error{result.StatusCode} : {result.Content}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -335,7 +335,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
if (int.MaxValue <= estTimeInMs)
|
||||
{
|
||||
lblEstDate.Text = "-";
|
||||
MessageBox.Show("you really think a software from roland can run that long without a fatal crash? No way!");
|
||||
MessageBox.Show(@"you really think a software from roland can run that long without a fatal crash? No way!");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -201,7 +201,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
|
||||
|
||||
}
|
||||
MessageBox.Show("done");
|
||||
MessageBox.Show(@"done");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@ -106,9 +106,15 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
lblConnectPcb.Text = StrNotConnected;
|
||||
lblConnectPcb.ForeColor = Color.Red;
|
||||
lblWaitingForMeterResponse.Visible = false;
|
||||
|
||||
tbxDateTime.Text = "";
|
||||
tbxMeterFw.Text = "";
|
||||
tbxMeterLutCrc.Text = "";
|
||||
tbxMeterMeterSize.Text = "";
|
||||
tbxRadio.Text = "";
|
||||
tbxRegion.Text = "";
|
||||
SetCordonelAccessLocked();
|
||||
tbxPcbId.Visible = false;
|
||||
btnConnect.Focus();
|
||||
}
|
||||
|
||||
private void FrmLowLevelTools_Load(Object sender, EventArgs e)
|
||||
@ -267,12 +273,15 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
/// <remarks date="2025-Oct-17" author="Thomas Wiedebusch">
|
||||
/// - Actions on pwdContainer error.
|
||||
/// </remarks>
|
||||
/// <remarks date="2025-Oct-20..21" author="Thomas Wiedebusch">
|
||||
/// - Password checks extended.
|
||||
/// </remarks>
|
||||
private void Connect()
|
||||
{
|
||||
try
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
Init();
|
||||
@ -304,96 +313,164 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
|
||||
Task.Factory.StartNew(() =>
|
||||
{
|
||||
// The password needs to be cleared for recurrent connections as otherwise the last password will be used.
|
||||
_currentGenesis.ClearPassword();
|
||||
_currentGenesis.Login();
|
||||
|
||||
if (!_currentGenesis.IsLoggedOn && String.IsNullOrEmpty(_currentGenesis.PcbId))
|
||||
{
|
||||
LowLevelActionControl(false);
|
||||
LogErrorText("ERROR: Cannot read out PcbId! Access to Cordonel denied!");
|
||||
LogText(StrSeparator);
|
||||
return;
|
||||
}
|
||||
|
||||
var retValPwdBuild = MeterPwdHandlerDb.RequestPwdFileFromDb(_currentGenesis.PcbId, out var pwdContainer);
|
||||
|
||||
// Login failed and password cannot be acquired
|
||||
// Login failed and password cannot be acquired, there isn't any chance to login without additional info
|
||||
if (!_currentGenesis.IsLoggedOn &&
|
||||
(pwdContainer?.ListOfPasswords == null ||
|
||||
pwdContainer.ListOfPasswords.Count < 8 ||
|
||||
string.IsNullOrEmpty(pwdContainer.Skeleton)))
|
||||
{
|
||||
LowLevelActionControl(false);
|
||||
LogErrorText("ERROR: Login failed and password file cannot be acquired from database!");
|
||||
if (!_currentGenesis.UseOfflinePasswords)
|
||||
LogErrorText($"ERROR: Login to PcbId:{_currentGenesis.PcbId} failed and passwords cannot be acquired " +
|
||||
"from the database!");
|
||||
else
|
||||
LogErrorText($"ERROR: Login with 'offline password' to PcbId:{_currentGenesis.PcbId} failed!");
|
||||
|
||||
LogText(StrSeparator);
|
||||
return;
|
||||
}
|
||||
|
||||
//TODO THW check all cases
|
||||
if (_currentGenesis.IsLoggedOn)
|
||||
{
|
||||
// The login succeeded with the 'SkeletonKey' or the password 'Lvl8' or the 'OfflinePassword'
|
||||
if (retValPwdBuild)
|
||||
// The login succeeded with the 'SkeletonKey', the 'Lvl8 password' or the 'offline password'
|
||||
if (retValPwdBuild) // Passwords exist in database
|
||||
{
|
||||
if (pwdContainer.Password.Equals(Encoding.UTF8.GetString(pwdContainer.ListOfPasswords.Last())))
|
||||
// Remind the 'Lvl8 password' from passwords
|
||||
var pwdLvl8FromPasswords = Encoding.UTF8.GetString(pwdContainer.ListOfPasswords.Last());
|
||||
|
||||
// Check if the 'offline password' is in use
|
||||
if (!string.IsNullOrWhiteSpace(_currentGenesis.OfflinePassword))
|
||||
{
|
||||
// CASE 1: - The 'production password' is the 'Lvl8 password' as the login succeeded.
|
||||
LogText(@"Successfully logged in with password Lvl8 and password file okay!");
|
||||
}
|
||||
else if (pwdContainer.Skeleton.Equals(pwdContainer.Password))
|
||||
LogText("Successfully logged in with the 'offline password'");
|
||||
|
||||
if (_currentGenesis.OfflinePassword.Equals(pwdLvl8FromPasswords))
|
||||
{
|
||||
LogText("The 'offline password' is the 'Lvl8 password'");
|
||||
if (pwdLvl8FromPasswords.Equals(pwdContainer.Password))
|
||||
{
|
||||
// CASE 1: - The 'offline password' is valid and equals the 'Lvl8 password' and the
|
||||
// 'production password'
|
||||
LogText("The 'production password' is the 'Lvl8 password'\n" +
|
||||
"Installed password file is valid and compared with the database");
|
||||
}
|
||||
else
|
||||
{
|
||||
// CASE 2: - The 'offline password' is valid and equals the 'Lvl8 password' but the
|
||||
// 'production password' is not correctly updated
|
||||
ShowPasswordRepairMessage(
|
||||
"The 'production password' is not correctly set to the 'Lvl8 password'\n" +
|
||||
"Installed password file is valid and compared with the database\n" +
|
||||
"[Repair Password] enabled");
|
||||
}
|
||||
}
|
||||
// CASE 3: - The 'offline password' is valid and equals the 'SkeletonKey'
|
||||
else if (_currentGenesis.OfflinePassword.Equals(pwdContainer.Skeleton))
|
||||
ShowPasswordRepairMessage(
|
||||
"The 'offline password' is the 'SkeletonKey'\n" +
|
||||
"Password exists on the database but password file not installed'\n" +
|
||||
"[Repair Password] enabled");
|
||||
}// The 'offline password' is in use
|
||||
else // The 'production password' is in use
|
||||
{
|
||||
// CASE 2: - Passwords are generated in database but password file is not installed or doesn't work.
|
||||
// - The 'production password' is the 'SkeletonKey' as the login succeeded.
|
||||
//
|
||||
// If password file is initially not installed and the database password returned the SkeletonKey
|
||||
// the login has been successfully executed with this SkeletonKey, so a repair of the password
|
||||
// file needs to be enabled!
|
||||
ShowPasswordRepairMessage(@"Password exists on database but the SkeletonKey is valid" +
|
||||
" - [Repair Password] enabled");
|
||||
if (pwdContainer.Password.Equals(pwdLvl8FromPasswords))
|
||||
{
|
||||
// CASE 4: - The 'production password' is the 'Lvl8 password' as the login succeeded.
|
||||
LogText(
|
||||
"Successfully logged in with the 'production password' which equals the 'Lvl8 password'\n" +
|
||||
"Installed password file is valid and compared with the database");
|
||||
}
|
||||
else if (pwdContainer.Password.Equals(pwdContainer.Skeleton))
|
||||
{
|
||||
// If the 'password file' is initially not installed and the 'production password' returned the
|
||||
// 'SkeletonKey', then the login has been successfully executed with this 'SkeletonKey',
|
||||
// a repair of the 'password file' needs to be enabled!
|
||||
|
||||
// CASE 5: - The 'production password' is the 'SkeletonKey' as the login succeeded.
|
||||
ShowPasswordRepairMessage(
|
||||
"Successfully logged in with the 'production password' which equals the 'SkeletonKey'\n" +
|
||||
"Password exists on the database but password file not installed'\n" +
|
||||
"[Repair Password] enabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
}// Database returned valid passwords
|
||||
else
|
||||
{
|
||||
// CASE 3: - The login succeeded but the password file request from database failed
|
||||
LogText(@"Successfully logged in. Password file not generated!");
|
||||
}
|
||||
}
|
||||
|
||||
if (!_currentGenesis.IsLoggedOn)
|
||||
if (string.IsNullOrEmpty(_currentGenesis.OfflinePassword))
|
||||
{
|
||||
// CASE 6: - The login succeeded but the password file request from database failed and no offline pwd
|
||||
LogText("Successfully logged in with the 'production password'\n" +
|
||||
"Passwords cannot be acquired from the database and therefore not compared");
|
||||
}
|
||||
else
|
||||
{
|
||||
// CASE 7: - The login succeeded but the password file request from database failed and offline pwd
|
||||
LogText("Successfully logged in with the 'offline password'\n" +
|
||||
"Passwords cannot be acquired from the database and therefore not compared");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}// Initial login succeeded
|
||||
|
||||
// Login can only be tried on valid database collection of passwords
|
||||
if (!retValPwdBuild)
|
||||
{
|
||||
sb.AppendLine(@"Passwords cannot be acquired from the database [E0]!");
|
||||
}
|
||||
// As the initial login wasn't successfully, try the acquired combinations from the database passwords
|
||||
else if (!_currentGenesis.IsLoggedOn && !_currentGenesis.UseOfflinePasswords)
|
||||
{
|
||||
// This is needed from meter as an unsuccessful login requires a delay for the next trial
|
||||
Thread.Sleep(2000);
|
||||
// Try to log in with password level 8 which may not be published to the database
|
||||
var retVal = _currentGenesis.Login(Encoding.UTF8.GetString(pwdContainer.ListOfPasswords.Last()));
|
||||
// CASE 4: - Passwords are generated in database and correctly installed. The login check will be done
|
||||
// CASE 8: - Passwords are generated in database and correctly installed. The login check will be done
|
||||
// with the generated password, but the 'production password' is still the 'SkeletonKey'.
|
||||
// - The database update of the production password went wrong!
|
||||
if (_currentGenesis.IsLoggedOn && retVal)
|
||||
{
|
||||
ShowPasswordRepairMessage(@"Password file is installed as login Lvl8 works, password in database" +
|
||||
" not updated - [Repair Password] enabled");
|
||||
ShowPasswordRepairMessage("Successfully logged in with 'Lvl8 password'\n" +
|
||||
"Installed password file is valid and compared with the database!\n" +
|
||||
"'production password' in the database not actual, update required\n" +
|
||||
"[Repair Password] enabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine("Login with LVL8 failed [M1]!");
|
||||
sb.AppendLine("Login with 'LVL8 password' failed [M1]!");
|
||||
}
|
||||
|
||||
if (!_currentGenesis.IsLoggedOn)
|
||||
{
|
||||
// This is needed from meter as an unsuccessful login requires a delay for the next trial
|
||||
Thread.Sleep(4000);
|
||||
// CASE 5: - The production password didn't work, so the SkeletonKey will be tried.
|
||||
// CASE 9: - The production password didn't work, so the SkeletonKey will be tried.
|
||||
if (_currentGenesis.Login(pwdContainer.Skeleton))
|
||||
{
|
||||
ShowPasswordRepairMessage(@"Successfully logged in with SkeletonKey - [Repair Password] enabled");
|
||||
ShowPasswordRepairMessage("Successfully logged in with 'SkeletonKey'\n" +
|
||||
"'production password' in the database not actual, update required\n" +
|
||||
"[Repair Password] enabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine(@"Login with Skeleton failed [M2]!");
|
||||
sb.AppendLine(@"Login with 'SkeletonKey' failed [M2]!");
|
||||
}
|
||||
|
||||
if (!retValPwdBuild)
|
||||
{
|
||||
sb.AppendLine(@"Unable to build password file [E0]!");
|
||||
}
|
||||
else if (_currentGenesis.Region.Equals("NA"))
|
||||
if (_currentGenesis.Region.Equals("NA"))
|
||||
{
|
||||
var url = ServiceUrls.GetExportDataServiceUrl();
|
||||
var retStr = LocalWebRequest.GetRequestWithError(url + _currentGenesis.PcbId,
|
||||
@ -422,15 +499,16 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
{
|
||||
if (item.PWD == pwdContainer.Password)
|
||||
{
|
||||
sb.AppendLine($"{item.ID} is Password LVL 8");
|
||||
sb.AppendLine($"{item.ID} is the 'Lvl8 password'");
|
||||
}
|
||||
else if (item.PWD == pwdContainer.Skeleton)
|
||||
{
|
||||
sb.AppendLine($"{item.ID} is Skeleton [E3]");
|
||||
sb.AppendLine($"{item.ID} is the 'SkeletonKey' [E3]");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine($"{item.ID} is not LVL 8 or Skeleton [E3]");
|
||||
sb.AppendLine(
|
||||
$"{item.ID} is neither the 'Lvl8 password' nor the 'SkeletonKey' [E3]");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -443,10 +521,17 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
|
||||
if (!_currentGenesis.IsLoggedOn)
|
||||
{
|
||||
if (!_currentGenesis.UseOfflinePasswords)
|
||||
LogErrorText($"ERROR: Login to PcbId:{_currentGenesis.PcbId} failed with 'production password', " +
|
||||
"'Lvl8 password' and 'SkeletonKey'!");
|
||||
else
|
||||
LogErrorText($"ERROR: Login to PcbId:{_currentGenesis.PcbId} with 'offline password' failed!");
|
||||
LogText(StrSeparator);
|
||||
return;
|
||||
}
|
||||
|
||||
_meterFile = new MeterFile(_currentGenesis);
|
||||
LogText(StrSeparator);
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@ -2120,73 +2205,74 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
Task.Factory.StartNew(() =>
|
||||
{
|
||||
// Request password file and force generation
|
||||
SetActualProcessAndLog("Request password files from database");
|
||||
SetActualProcessAndLog("Request passwords from the database");
|
||||
var ret = MeterPwdHandlerDb.RequestPwdFileFromDb(_currentGenesis.GetPcbId(), out var pwdContainer);
|
||||
if (pwdContainer?.ListOfHashes == null || pwdContainer.ListOfPasswords == null || !ret)
|
||||
{
|
||||
LogText(@"Password file from server corrupted [M3]!");
|
||||
LogText(@"Passwords from server corrupted [M3]!");
|
||||
LowLevelActionControl(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// Build password file
|
||||
SetActualProcessAndLog("Build password file");
|
||||
SetActualProcessAndLog("Build 'password file'");
|
||||
var _meterPwdFile = new MeterPwdFile(_currentGenesis);
|
||||
var retValBol = _meterPwdFile.BuildPwdFile(pwdContainer.ListOfPasswords, 1, pwdContainer.Skeleton);
|
||||
if (!retValBol)
|
||||
{
|
||||
LogText(@"Unable to build password file [M3]!");
|
||||
LogText(@"Unable to build 'password file' [M3]!");
|
||||
LowLevelActionControl(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// Install password file and verify byte wise
|
||||
SetActualProcessAndLog("Install and verify password file into meter");
|
||||
SetActualProcessAndLog("Install 'password file' into meter, read it out and verify it");
|
||||
_currentGenesis.ReLogin();
|
||||
retValBol = _meterPwdFile.UnlockEraseWriteMeterPwdFile();
|
||||
retValBol &= _meterPwdFile.WriteMeterPwdFile() && _meterPwdFile.VerifyMeterPwdFile();
|
||||
|
||||
if (!retValBol)
|
||||
{
|
||||
LogText(@"Installed password file check failed [M4]!");
|
||||
LogErrorText(@"ERROR: Installed 'password file' check failed [M4]!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if new password is in the meter with login level 8 even if the file write wasn't successful
|
||||
SetActualProcessAndLog("Validate Lvl8 password from password file");
|
||||
SetActualProcessAndLog("Validate 'Lvl8 password' from 'password file'");
|
||||
_currentGenesis.Logout();
|
||||
retValBol = _currentGenesis.Login(Encoding.UTF8.GetString(pwdContainer.ListOfPasswords.Last()));
|
||||
if (!retValBol)
|
||||
{
|
||||
LogText(@"Login with new password failed [M4]!");
|
||||
LogErrorText(@"ERROR: Login with 'Lvl8 password' failed [M4]!");
|
||||
return;
|
||||
}
|
||||
LogText(@"Password was successfully installed.");
|
||||
LogText(@"Successfully installed the 'password file'");
|
||||
|
||||
// Set new password in production database
|
||||
SetActualProcessAndLog("Replace SkeletonKey with Lvl8 password as production password in database");
|
||||
SetActualProcessAndLog(
|
||||
"Replace 'SkeletonKey' with 'Lvl8 password' as 'production password' in the database");
|
||||
retValBol = MeterPwdHandlerDb.SetPwdFromSkeletonToLvl8inDd(_currentGenesis.PcbId, pwdContainer);
|
||||
if (!retValBol)
|
||||
{
|
||||
LogText(@"Update of production password in database failed [E3]!");
|
||||
LogErrorText(@"ERROR: Update of 'production password' in the database failed [E3]!");
|
||||
return;
|
||||
}
|
||||
LogText(@"Production password successfully updated in database");
|
||||
LogText(@"Successfully updated 'production password' in the database");
|
||||
|
||||
// Check password level 3 as all applications need to use this
|
||||
SetActualProcessAndLog("Validate Lv3 as SkeletonKey in meter");
|
||||
SetActualProcessAndLog("Validate 'Lv3 password' as 'SkeletonKey' in meter (used by meter-apps)");
|
||||
retValBol = _currentGenesis.WriteRegister("SYSTEM_ExitReason", new Byte[] { 21 });
|
||||
var exitResult = RegisterConverter.ByteArrayToValue<Int16>(_currentGenesis.ReadRegister("SYSTEM_ExitReason"));
|
||||
if (exitResult != 0 || !retValBol)
|
||||
{
|
||||
LogText(@"Meter reports wrong SkeletonKey at Lvl3 [M4]!");
|
||||
LogErrorText(@"ERROR: Meter reports wrong 'SkeletonKey' at 'Lvl3 password' [M4]!");
|
||||
return;
|
||||
}
|
||||
LogText(@"Meter reports correct SkeletonKey at Lvl3.");
|
||||
LogText(@"Meter reports correct 'SkeletonKey' as 'Lvl3 password'");
|
||||
|
||||
// Clear intermediate stored password to force password collection from DB on simple login without
|
||||
// given new password. Then the password will be taken from the DB or offline file.
|
||||
SetActualProcessAndLog("Crosscheck production password with meter password Lvl8");
|
||||
SetActualProcessAndLog("Crosscheck 'production password' with meter 'Lvl8 password");
|
||||
_currentGenesis.Logout();
|
||||
_currentGenesis.ClearPassword();
|
||||
|
||||
@ -2198,10 +2284,10 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
|
||||
if (!retValBol)
|
||||
{
|
||||
LogText(@"Invalid password in production database [E3]!");
|
||||
LogErrorText(@"ERROR: Invalid 'production password' in the production database [E3]!");
|
||||
return;
|
||||
}
|
||||
LogText(@"Password Lvl8 successfully validated with production database.");
|
||||
LogText(@"Successfully validated 'Lvl8 password' of the production database");
|
||||
_repairPasswordEnabled = false;
|
||||
}).ContinueWith(delegate
|
||||
{
|
||||
|
||||
@ -700,14 +700,14 @@
|
||||
{
|
||||
if (!gen.WriteRegister(row.Cells[0].Value.ToString(), val))
|
||||
{
|
||||
MessageBox.Show("Error");
|
||||
MessageBox.Show(@"Error");
|
||||
}
|
||||
}
|
||||
else if (Int64.TryParse(row.Cells[1].Value.ToString(), out valBig))
|
||||
{
|
||||
if (!gen.WriteRegister(row.Cells[0].Value.ToString(), valBig))
|
||||
{
|
||||
MessageBox.Show("Error");
|
||||
MessageBox.Show(@"Error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("error");
|
||||
MessageBox.Show(@"error");
|
||||
|
||||
}
|
||||
}
|
||||
@ -73,7 +73,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
var retSeri = LocalWebRequest.GetRequest(url, 18000);
|
||||
if (retSeri.Contains("store"))
|
||||
{
|
||||
MessageBox.Show("hat geklappt");
|
||||
MessageBox.Show(@"hat geklappt");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -141,7 +141,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Slot #{slotNR} failed: {ex.Message}");
|
||||
MessageBox.Show($@"Slot #{slotNR} failed: {ex.Message}");
|
||||
}
|
||||
|
||||
return _currentGenesis.GetPcbId();
|
||||
@ -171,12 +171,12 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
var ret = LocalWebRequest.PostRequestAsync($"http://10.49.40.25/MeterProcessState/api/Order/DeleteCordonelMapping?PcbId={ipcb}", 80000);
|
||||
if (ret)
|
||||
{
|
||||
MessageBox.Show("succeed. mapping is deleted ");
|
||||
MessageBox.Show(@"succeed. mapping is deleted ");
|
||||
btnRemoveSure.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("something went wrong");
|
||||
MessageBox.Show(@"something went wrong");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -196,11 +196,11 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
var ret = LocalWebRequest.PostRequestAsync("http://10.49.40.25/MeterProcessState/api/ProccesState/SetPressureStateHydralic?PcbId=" + txtHyMapPcb.Text + "&FertigungsauftragsNr=" + txtHyMapOrder.Text, 80000);
|
||||
if (ret)
|
||||
{
|
||||
MessageBox.Show("Erfogreich");
|
||||
MessageBox.Show(@"Erfogreich");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Fehler");
|
||||
MessageBox.Show(@"Fehler");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,11 +65,11 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
|
||||
if (res)
|
||||
{
|
||||
MessageBox.Show("success");
|
||||
MessageBox.Show(@"success");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("error");
|
||||
MessageBox.Show(@"error");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -193,11 +193,11 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
_currentGenesis.StoreAllConfigurations();
|
||||
if (success)
|
||||
{
|
||||
MessageBox.Show("success");
|
||||
MessageBox.Show(@"success");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("wrong");
|
||||
MessageBox.Show(@"wrong");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -273,11 +273,11 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
|
||||
if (success)
|
||||
{
|
||||
MessageBox.Show("success");
|
||||
MessageBox.Show(@"success");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("wrong");
|
||||
MessageBox.Show(@"wrong");
|
||||
}
|
||||
|
||||
dgvRegisterWrite.DataSource = RegistersGernerated;
|
||||
|
||||
33
Common/Ui/GenesisToolBox/FrmQsTool.Designer.cs
generated
33
Common/Ui/GenesisToolBox/FrmQsTool.Designer.cs
generated
@ -50,7 +50,7 @@
|
||||
this.tbxRegion = new System.Windows.Forms.TextBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.tbxMeterFw = new System.Windows.Forms.TextBox();
|
||||
this.tbxMeterMeterSize = new System.Windows.Forms.TextBox();
|
||||
this.tbxMeterSize = new System.Windows.Forms.TextBox();
|
||||
this.tbxMeterLutCrc = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
@ -68,7 +68,7 @@
|
||||
this.tbxStorageMonths = new System.Windows.Forms.TextBox();
|
||||
this.lblStorageMonths = new System.Windows.Forms.Label();
|
||||
this.tbxDrainedBatteryLoad_percent = new System.Windows.Forms.TextBox();
|
||||
this.tBxRemainingLifeTimeSw = new System.Windows.Forms.TextBox();
|
||||
this.tbxRemainingLifeTimeSw = new System.Windows.Forms.TextBox();
|
||||
this.tbxRemainingLifeTimeFw = new System.Windows.Forms.TextBox();
|
||||
this.lblRemainingLifeTimeSw = new System.Windows.Forms.Label();
|
||||
this.lblRemainingLifetimeFw = new System.Windows.Forms.Label();
|
||||
@ -166,6 +166,7 @@
|
||||
this.cbxUseOfflinePwds.TabIndex = 42;
|
||||
this.cbxUseOfflinePwds.Text = "Use Offline Passwords";
|
||||
this.cbxUseOfflinePwds.UseVisualStyleBackColor = true;
|
||||
this.cbxUseOfflinePwds.CheckedChanged += new System.EventHandler(this.cbxUseOfflinePwds_CheckedChanged);
|
||||
//
|
||||
// tbxPcbId
|
||||
//
|
||||
@ -295,11 +296,11 @@
|
||||
//
|
||||
// tbxMeterMeterSize
|
||||
//
|
||||
this.tbxMeterMeterSize.Location = new System.Drawing.Point(141, 66);
|
||||
this.tbxMeterMeterSize.Name = "tbxMeterMeterSize";
|
||||
this.tbxMeterMeterSize.ReadOnly = true;
|
||||
this.tbxMeterMeterSize.Size = new System.Drawing.Size(146, 20);
|
||||
this.tbxMeterMeterSize.TabIndex = 30;
|
||||
this.tbxMeterSize.Location = new System.Drawing.Point(141, 66);
|
||||
this.tbxMeterSize.Name = "tbxMeterSize";
|
||||
this.tbxMeterSize.ReadOnly = true;
|
||||
this.tbxMeterSize.Size = new System.Drawing.Size(146, 20);
|
||||
this.tbxMeterSize.TabIndex = 30;
|
||||
//
|
||||
// tbxMeterLutCrc
|
||||
//
|
||||
@ -445,11 +446,11 @@
|
||||
//
|
||||
// tBxRemainingLifeTimeSw
|
||||
//
|
||||
this.tBxRemainingLifeTimeSw.Location = new System.Drawing.Point(170, 75);
|
||||
this.tBxRemainingLifeTimeSw.Name = "tBxRemainingLifeTimeSw";
|
||||
this.tBxRemainingLifeTimeSw.ReadOnly = true;
|
||||
this.tBxRemainingLifeTimeSw.Size = new System.Drawing.Size(116, 20);
|
||||
this.tBxRemainingLifeTimeSw.TabIndex = 66;
|
||||
this.tbxRemainingLifeTimeSw.Location = new System.Drawing.Point(170, 75);
|
||||
this.tbxRemainingLifeTimeSw.Name = "tbxRemainingLifeTimeSw";
|
||||
this.tbxRemainingLifeTimeSw.ReadOnly = true;
|
||||
this.tbxRemainingLifeTimeSw.Size = new System.Drawing.Size(116, 20);
|
||||
this.tbxRemainingLifeTimeSw.TabIndex = 66;
|
||||
//
|
||||
// tbxRemainingLifeTimeFw
|
||||
//
|
||||
@ -495,7 +496,7 @@
|
||||
this.grpBoxStatistic.Controls.Add(this.lblRemainingLifeTimeSw);
|
||||
this.grpBoxStatistic.Controls.Add(this.tbxDrainedBatteryLoad_percent);
|
||||
this.grpBoxStatistic.Controls.Add(this.tbxRemainingLifeTimeFw);
|
||||
this.grpBoxStatistic.Controls.Add(this.tBxRemainingLifeTimeSw);
|
||||
this.grpBoxStatistic.Controls.Add(this.tbxRemainingLifeTimeSw);
|
||||
this.grpBoxStatistic.Location = new System.Drawing.Point(324, 53);
|
||||
this.grpBoxStatistic.Name = "grpBoxStatistic";
|
||||
this.grpBoxStatistic.Size = new System.Drawing.Size(307, 136);
|
||||
@ -510,7 +511,7 @@
|
||||
this.grpBoxCordonelReadout.Controls.Add(this.label5);
|
||||
this.grpBoxCordonelReadout.Controls.Add(this.tbxMeterLutCrc);
|
||||
this.grpBoxCordonelReadout.Controls.Add(this.tbxInitialBatteryLoad);
|
||||
this.grpBoxCordonelReadout.Controls.Add(this.tbxMeterMeterSize);
|
||||
this.grpBoxCordonelReadout.Controls.Add(this.tbxMeterSize);
|
||||
this.grpBoxCordonelReadout.Controls.Add(this.tbxMeterFw);
|
||||
this.grpBoxCordonelReadout.Controls.Add(this.lblBatteryMilliAHrRating);
|
||||
this.grpBoxCordonelReadout.Controls.Add(this.label8);
|
||||
@ -598,7 +599,7 @@
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.TextBox tbxPcbId;
|
||||
private System.Windows.Forms.TextBox tbxMeterFw;
|
||||
private System.Windows.Forms.TextBox tbxMeterMeterSize;
|
||||
private System.Windows.Forms.TextBox tbxMeterSize;
|
||||
private System.Windows.Forms.TextBox tbxMeterLutCrc;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label6;
|
||||
@ -620,7 +621,7 @@
|
||||
private System.Windows.Forms.TextBox tbxStorageMonths;
|
||||
private System.Windows.Forms.Label lblStorageMonths;
|
||||
private System.Windows.Forms.TextBox tbxDrainedBatteryLoad_percent;
|
||||
private System.Windows.Forms.TextBox tBxRemainingLifeTimeSw;
|
||||
private System.Windows.Forms.TextBox tbxRemainingLifeTimeSw;
|
||||
private System.Windows.Forms.TextBox tbxRemainingLifeTimeFw;
|
||||
private System.Windows.Forms.Label lblRemainingLifeTimeSw;
|
||||
private System.Windows.Forms.Label lblRemainingLifetimeFw;
|
||||
|
||||
@ -85,8 +85,24 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
lblConnectPcb.ForeColor = Color.Red;
|
||||
lblWaitingForMeterResponse.Visible = false;
|
||||
|
||||
tbxMeterFw.Text = "";
|
||||
tbxMeterLutCrc.Text = "";
|
||||
tbxMeterSize.Text = "";
|
||||
tbxRegion.Text = "";
|
||||
tbxDateTime.Text = "";
|
||||
tbxRadio.Text = "";
|
||||
tbxExpiredLifeTime.Text = "";
|
||||
tbxDrainedLoad_uAs.Text = "";
|
||||
tbxBatteries.Text = "";
|
||||
tbxInitialBatteryLoad.Text = "";
|
||||
tbxDrainedBatteryLoad_percent.Text = "";
|
||||
tbxRemainingLifeTimeFw.Text = "";
|
||||
tbxRemainingLifeTimeSw.Text = "";
|
||||
tbxStorageMonths.Text = "";
|
||||
|
||||
SetCordonelAccessLocked();
|
||||
tbxPcbId.Visible = false;
|
||||
btnConnect.Focus();
|
||||
}
|
||||
|
||||
private void FrmQsTool_Load(Object sender, EventArgs e)
|
||||
@ -265,54 +281,66 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
return;
|
||||
}
|
||||
|
||||
Invoke(new Action(() =>
|
||||
if (_currentGenesis.IsLoggedOn)
|
||||
{
|
||||
lblConnectPcb.Text = StrPartPcbConnected;
|
||||
tbxPcbId.Text = _currentGenesis.PcbId;
|
||||
tbxPcbId.Visible = true;
|
||||
tbxMeterFw.Text = _currentGenesis.FwVersion;
|
||||
tbxMeterMeterSize.Text = _currentGenesis.MeterSize;
|
||||
tbxMeterLutCrc.Text = _currentGenesis.LutCrc;
|
||||
tbxRegion.Text = _currentGenesis.Region;
|
||||
LogText("Meter FW Version:\t" + _currentGenesis.FwVersion);
|
||||
LogText("Meter LUT CRC:\t" + _currentGenesis.LutCrc);
|
||||
LogText("Meter Size:\t" + _currentGenesis.MeterSize);
|
||||
LogText("Meter Region:\t" + _currentGenesis.Region);
|
||||
if (_currentGenesis.RadioFrequencyMhz != null)
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
tbxRadio.Text = $@"{_currentGenesis.RadioFrequencyMhz}";
|
||||
LogText("Radio frequency:\t" + $"{_currentGenesis.RadioFrequencyMhz} MHz");
|
||||
}
|
||||
lblConnectPcb.Text = StrPartPcbConnected;
|
||||
tbxPcbId.Text = _currentGenesis.PcbId;
|
||||
tbxPcbId.Visible = true;
|
||||
tbxMeterFw.Text = _currentGenesis.FwVersion;
|
||||
tbxMeterSize.Text = _currentGenesis.MeterSize;
|
||||
tbxMeterLutCrc.Text = _currentGenesis.LutCrc;
|
||||
tbxRegion.Text = _currentGenesis.Region;
|
||||
LogText("Meter FW Version:\t" + _currentGenesis.FwVersion);
|
||||
LogText("Meter LUT CRC:\t" + _currentGenesis.LutCrc);
|
||||
LogText("Meter Size:\t" + _currentGenesis.MeterSize);
|
||||
LogText("Meter Region:\t" + _currentGenesis.Region);
|
||||
if (_currentGenesis.RadioFrequencyMhz != null)
|
||||
{
|
||||
tbxRadio.Text = $@"{_currentGenesis.RadioFrequencyMhz}";
|
||||
LogText("Radio frequency:\t" + $"{_currentGenesis.RadioFrequencyMhz} MHz");
|
||||
}
|
||||
|
||||
LogText("");
|
||||
LogText("'Configuration.json' version: " + _currentGenesis.InterfaceInfo.InterfaceVersion);
|
||||
lblConfigVersion.Text = @"Interface Version: " + _currentGenesis.InterfaceInfo.InterfaceVersion;
|
||||
lblConfigVersion.ForeColor = _currentGenesis.InterfaceSupportsFwVersion ? Color.Green : Color.Red;
|
||||
if (!_currentGenesis.InterfaceSupportsFwVersion)
|
||||
{
|
||||
var text = "INTERFACE VERSION OUTDATED!\n" +
|
||||
"The loaded \'configuration.json\' " +
|
||||
$"version: {_currentGenesis.InterfaceInfo.InterfaceVersion}\n" +
|
||||
$"does NOT support the Cordonel FW version: {_currentGenesis.FwVersion}!";
|
||||
MessageBox.Show(text, @"FAILED", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
LogText(text);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogText($"\'Configuration.json\' supports installed FW version: {_currentGenesis.FwVersion}");
|
||||
}
|
||||
LogText("");
|
||||
LogText("'Configuration.json' version: " + _currentGenesis.InterfaceInfo.InterfaceVersion);
|
||||
lblConfigVersion.Text = @"Interface Version: " + _currentGenesis.InterfaceInfo.InterfaceVersion;
|
||||
lblConfigVersion.ForeColor = _currentGenesis.InterfaceSupportsFwVersion ? Color.Green : Color.Red;
|
||||
if (!_currentGenesis.InterfaceSupportsFwVersion)
|
||||
{
|
||||
var text = "INTERFACE VERSION OUTDATED!\n" +
|
||||
"The loaded \'configuration.json\' " +
|
||||
$"version: {_currentGenesis.InterfaceInfo.InterfaceVersion}\n" +
|
||||
$"does NOT support the Cordonel FW version: {_currentGenesis.FwVersion}!";
|
||||
MessageBox.Show(text, @"FAILED", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
LogText(text);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogText($"\'Configuration.json\' supports installed FW version: {_currentGenesis.FwVersion}");
|
||||
}
|
||||
|
||||
LogText("");
|
||||
lblConnectPcb.ForeColor = Color.Green;
|
||||
CheckUpdateEnabled();
|
||||
LogText("");
|
||||
lblConnectPcb.ForeColor = Color.Green;
|
||||
CheckUpdateEnabled();
|
||||
|
||||
LogPcAndCordonelTime();
|
||||
LogInstalledMeterFw();
|
||||
}));
|
||||
LogPcAndCordonelTime();
|
||||
LogInstalledMeterFw();
|
||||
}));
|
||||
}
|
||||
}).ContinueWith(delegate
|
||||
{
|
||||
LowLevelActionControl(false);
|
||||
btnReadLifetime_Click(this, null);
|
||||
_currentGenesis.ReLogin();
|
||||
if (_currentGenesis.IsLoggedOn)
|
||||
btnReadLifetime_Click(this, null);
|
||||
else
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
Init();
|
||||
}));
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -688,17 +716,17 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
tbxDrainedLoad_uAs.Text = $@"{genesisStatus.DrainedBatteryLoad_uAs:N0}";
|
||||
tbxExpiredLifeTime.Text = $@"{genesisStatus.ExceededLifeTime_s:N0}";
|
||||
tbxInitialBatteryLoad.Text = $@"{genesisStatus.InitialBatteryLoad_mAh:N0}";
|
||||
|
||||
|
||||
tbxDrainedBatteryLoad_percent.Text = $@"{genesisStatus.DrainedBatteryLoadPercent:F2}";
|
||||
tBxRemainingLifeTimeSw.Text = $@"{genesisStatus.RemainingLifeTimeYears:F2}";
|
||||
tbxRemainingLifeTimeSw.Text = $@"{genesisStatus.RemainingLifeTimeYears:F2}";
|
||||
tbxRemainingLifeTimeFw.Text = genesisStatus.FwCalculatedRemainingLifeTimeYears != null ?
|
||||
$@"{genesisStatus.DrainedBatteryLoadPercent:F2}" : "not supported";
|
||||
$@"{genesisStatus.FwCalculatedRemainingLifeTimeYears:F2}" : "not supported";
|
||||
tbxStorageMonths.Text = $@"{genesisStatus.StorageMonths:F1}";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tbxDrainedBatteryLoad_percent.Text = "";
|
||||
tBxRemainingLifeTimeSw.Text = "";
|
||||
tbxRemainingLifeTimeSw.Text = "";
|
||||
tbxRemainingLifeTimeFw.Text = "";
|
||||
tbxStorageMonths.Text = "";
|
||||
tbxBatteries.Text = "";
|
||||
|
||||
@ -241,11 +241,11 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
File.WriteAllLines(newfilenanme + "H1.csv", listH1.ToArray());
|
||||
File.WriteAllLines(newfilenanme + "H2.csv", listH2.ToArray());
|
||||
File.WriteAllLines(newfilenanme + "H3.csv", listH3.ToArray());
|
||||
MessageBox.Show("done");
|
||||
MessageBox.Show(@"done");
|
||||
}
|
||||
catch (Exception ex )
|
||||
{
|
||||
MessageBox.Show("abspeichern nicht geklappt . ggf. ist die datei noch geöffnet oder wir haben nicht genug rechte");
|
||||
MessageBox.Show(@"abspeichern nicht geklappt . ggf. ist die datei noch geöffnet oder wir haben nicht genug rechte");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
|
||||
if (!string.IsNullOrEmpty(resp))
|
||||
{
|
||||
MessageBox.Show("Hat geklappt");
|
||||
MessageBox.Show(@"Hat geklappt");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -40,7 +40,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
if (!result)
|
||||
{
|
||||
MessageBox.Show("Hat nicht geklappt");
|
||||
MessageBox.Show(@"Hat nicht geklappt");
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Slot #{slot} failed: {ex.Message}");
|
||||
MessageBox.Show($@"Slot #{slot} failed: {ex.Message}");
|
||||
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"failed: {ex.Message}");
|
||||
MessageBox.Show($@"failed: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -548,6 +548,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmFrozenMeter.resx">
|
||||
<DependentUpon>FrmFrozenMeter.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmHistory.resx">
|
||||
<DependentUpon>FrmHistory.cs</DependentUpon>
|
||||
@ -637,6 +638,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmManCalibration.resx">
|
||||
<DependentUpon>FrmManCalibration.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmTempMeter.resx">
|
||||
<DependentUpon>FrmTempMeter.cs</DependentUpon>
|
||||
|
||||
@ -273,7 +273,7 @@ namespace GenesisToolBox
|
||||
if (endTime.HasValue && startTime.HasValue)
|
||||
{
|
||||
var timeMeasurement = (endTime.Value - startTime.Value);
|
||||
MessageBox.Show($"MeasurementBuffered rund for {timeMeasurement}S");
|
||||
MessageBox.Show($@"MeasurementBuffered rund for {timeMeasurement}S");
|
||||
|
||||
foreach (var item in cblSlots.CheckedItems)
|
||||
{
|
||||
@ -283,7 +283,7 @@ namespace GenesisToolBox
|
||||
{
|
||||
var result = ctlBatch.GetResults(slotNr, 0, flowrateRef, timeMeasurement.TotalSeconds);
|
||||
|
||||
MessageBox.Show($"result.DutTimeS = {result.DutTimeS} & result.DutVolumeCm = {result.DutVolumeCm}");
|
||||
MessageBox.Show($@"result.DutTimeS = {result.DutTimeS} & result.DutVolumeCm = {result.DutVolumeCm}");
|
||||
}
|
||||
|
||||
}
|
||||
@ -655,15 +655,15 @@ namespace GenesisToolBox
|
||||
{
|
||||
case XylemCommonUiLegacyGenCtl.DataPackage.PollingAction.IsDone:
|
||||
continueRequesting = false;
|
||||
MessageBox.Show("isDone");
|
||||
MessageBox.Show(@"isDone");
|
||||
break;
|
||||
case XylemCommonUiLegacyGenCtl.DataPackage.PollingAction.IsOnError:
|
||||
continueRequesting = false;
|
||||
MessageBox.Show("IsOnError");
|
||||
MessageBox.Show(@"IsOnError");
|
||||
break;
|
||||
|
||||
case XylemCommonUiLegacyGenCtl.DataPackage.PollingAction.DoFlush:
|
||||
MessageBox.Show("Request flush");
|
||||
MessageBox.Show(@"Request flush");
|
||||
controlPreAdjWr.SetFlushIsDone();
|
||||
break;
|
||||
default:
|
||||
|
||||
126
Common/Ui/GenesisToolBox/frmRegisterStore.Designer.cs
generated
126
Common/Ui/GenesisToolBox/frmRegisterStore.Designer.cs
generated
@ -32,7 +32,7 @@
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.cbComSlot = new System.Windows.Forms.ComboBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnRead = new System.Windows.Forms.Button();
|
||||
this.btnReadRegister = new System.Windows.Forms.Button();
|
||||
this.registerGridView = new System.Windows.Forms.DataGridView();
|
||||
this.btnConnect = new System.Windows.Forms.Button();
|
||||
this.lblState = new System.Windows.Forms.Label();
|
||||
@ -41,19 +41,18 @@
|
||||
this.pnlBussy = new System.Windows.Forms.Panel();
|
||||
this.lblProgress = new System.Windows.Forms.Label();
|
||||
this.lblAction = new System.Windows.Forms.Label();
|
||||
this.probarBussy = new System.Windows.Forms.ProgressBar();
|
||||
this.probarBusy = new System.Windows.Forms.ProgressBar();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.btnReadFwVersions = new System.Windows.Forms.Button();
|
||||
this.btn_CalibrationRestore = new System.Windows.Forms.Button();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.btnCalibrationRestore = new System.Windows.Forms.Button();
|
||||
this.btnBatteryIdle = new System.Windows.Forms.Button();
|
||||
this.btnSetDefaultPulse = new System.Windows.Forms.Button();
|
||||
this.btnStoreAll = new System.Windows.Forms.Button();
|
||||
this.btnRegisterToFile = new System.Windows.Forms.Button();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.btnBatLife = new System.Windows.Forms.Button();
|
||||
this.btnRadioPressure = new System.Windows.Forms.Button();
|
||||
this.nundCalResultID = new System.Windows.Forms.NumericUpDown();
|
||||
this.btnFingerWeg = new System.Windows.Forms.Button();
|
||||
this.lblGtbVersion = new System.Windows.Forms.Label();
|
||||
this.lblConfigVersion = new System.Windows.Forms.Label();
|
||||
this.btnFileToRegister = new System.Windows.Forms.Button();
|
||||
@ -84,13 +83,13 @@
|
||||
//
|
||||
// btnRead
|
||||
//
|
||||
this.btnRead.Location = new System.Drawing.Point(251, 123);
|
||||
this.btnRead.Name = "btnRead";
|
||||
this.btnRead.Size = new System.Drawing.Size(110, 30);
|
||||
this.btnRead.TabIndex = 2;
|
||||
this.btnRead.Text = "Read Meter";
|
||||
this.btnRead.UseVisualStyleBackColor = true;
|
||||
this.btnRead.Click += new System.EventHandler(this.btnRead_Click);
|
||||
this.btnReadRegister.Location = new System.Drawing.Point(251, 123);
|
||||
this.btnReadRegister.Name = "btnReadRegister";
|
||||
this.btnReadRegister.Size = new System.Drawing.Size(110, 30);
|
||||
this.btnReadRegister.TabIndex = 2;
|
||||
this.btnReadRegister.Text = "Read Meter";
|
||||
this.btnReadRegister.UseVisualStyleBackColor = true;
|
||||
this.btnReadRegister.Click += new System.EventHandler(this.btnRead_Click);
|
||||
//
|
||||
// registerGridView
|
||||
//
|
||||
@ -149,7 +148,7 @@
|
||||
this.pnlBussy.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pnlBussy.Controls.Add(this.lblProgress);
|
||||
this.pnlBussy.Controls.Add(this.lblAction);
|
||||
this.pnlBussy.Controls.Add(this.probarBussy);
|
||||
this.pnlBussy.Controls.Add(this.probarBusy);
|
||||
this.pnlBussy.Controls.Add(this.label3);
|
||||
this.pnlBussy.Location = new System.Drawing.Point(8, 171);
|
||||
this.pnlBussy.Name = "pnlBussy";
|
||||
@ -179,14 +178,14 @@
|
||||
this.lblAction.Size = new System.Drawing.Size(0, 13);
|
||||
this.lblAction.TabIndex = 2;
|
||||
//
|
||||
// probarBussy
|
||||
// probarBusy
|
||||
//
|
||||
this.probarBussy.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.probarBusy.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.probarBussy.Location = new System.Drawing.Point(12, 286);
|
||||
this.probarBussy.Name = "probarBussy";
|
||||
this.probarBussy.Size = new System.Drawing.Size(779, 23);
|
||||
this.probarBussy.TabIndex = 1;
|
||||
this.probarBusy.Location = new System.Drawing.Point(12, 286);
|
||||
this.probarBusy.Name = "probarBusy";
|
||||
this.probarBusy.Size = new System.Drawing.Size(779, 23);
|
||||
this.probarBusy.TabIndex = 1;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
@ -196,9 +195,9 @@
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(240, 270);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(60, 13);
|
||||
this.label3.Size = new System.Drawing.Size(64, 13);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "please wait";
|
||||
this.label3.Text = "Please wait!";
|
||||
//
|
||||
// btnReadFwVersions
|
||||
//
|
||||
@ -210,37 +209,37 @@
|
||||
this.btnReadFwVersions.UseVisualStyleBackColor = true;
|
||||
this.btnReadFwVersions.Click += new System.EventHandler(this.btnReadFwVersions_Click);
|
||||
//
|
||||
// btn_CalibrationRestore
|
||||
// btnCalibrationRestore
|
||||
//
|
||||
this.btn_CalibrationRestore.Location = new System.Drawing.Point(560, 14);
|
||||
this.btn_CalibrationRestore.Name = "btn_CalibrationRestore";
|
||||
this.btn_CalibrationRestore.Size = new System.Drawing.Size(110, 30);
|
||||
this.btn_CalibrationRestore.TabIndex = 58;
|
||||
this.btn_CalibrationRestore.Text = "CalibrationRestore";
|
||||
this.btn_CalibrationRestore.UseVisualStyleBackColor = true;
|
||||
this.btn_CalibrationRestore.Visible = false;
|
||||
this.btn_CalibrationRestore.Click += new System.EventHandler(this.btn_CalibrationRestore_Click);
|
||||
this.btnCalibrationRestore.Location = new System.Drawing.Point(560, 14);
|
||||
this.btnCalibrationRestore.Name = "btnCalibrationRestore";
|
||||
this.btnCalibrationRestore.Size = new System.Drawing.Size(110, 30);
|
||||
this.btnCalibrationRestore.TabIndex = 58;
|
||||
this.btnCalibrationRestore.Text = "CalibrationRestore";
|
||||
this.btnCalibrationRestore.UseVisualStyleBackColor = true;
|
||||
this.btnCalibrationRestore.Visible = false;
|
||||
this.btnCalibrationRestore.Click += new System.EventHandler(this.btnCalibrationRestore_Click);
|
||||
//
|
||||
// button1
|
||||
// btnBatteryIdle
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(399, 87);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(110, 30);
|
||||
this.button1.TabIndex = 60;
|
||||
this.button1.Text = "Battery Idle";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Visible = false;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click_4);
|
||||
this.btnBatteryIdle.Location = new System.Drawing.Point(399, 87);
|
||||
this.btnBatteryIdle.Name = "btnBatteryIdle";
|
||||
this.btnBatteryIdle.Size = new System.Drawing.Size(110, 30);
|
||||
this.btnBatteryIdle.TabIndex = 60;
|
||||
this.btnBatteryIdle.Text = "Battery Idle";
|
||||
this.btnBatteryIdle.UseVisualStyleBackColor = true;
|
||||
this.btnBatteryIdle.Visible = false;
|
||||
this.btnBatteryIdle.Click += new System.EventHandler(this.btnBatteryIdle_Click);
|
||||
//
|
||||
// button2
|
||||
// btnSetDefaultPulse
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(560, 85);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(110, 30);
|
||||
this.button2.TabIndex = 61;
|
||||
this.button2.Text = "Set default Pulse";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click_2);
|
||||
this.btnSetDefaultPulse.Location = new System.Drawing.Point(560, 85);
|
||||
this.btnSetDefaultPulse.Name = "btnSetDefaultPulse";
|
||||
this.btnSetDefaultPulse.Size = new System.Drawing.Size(110, 30);
|
||||
this.btnSetDefaultPulse.TabIndex = 61;
|
||||
this.btnSetDefaultPulse.Text = "Set default Pulse";
|
||||
this.btnSetDefaultPulse.UseVisualStyleBackColor = true;
|
||||
this.btnSetDefaultPulse.Click += new System.EventHandler(this.btnSetDefaultPulse_Click);
|
||||
//
|
||||
// btnStoreAll
|
||||
//
|
||||
@ -300,17 +299,6 @@
|
||||
this.nundCalResultID.TabIndex = 73;
|
||||
this.nundCalResultID.Visible = false;
|
||||
//
|
||||
// btnFingerWeg
|
||||
//
|
||||
this.btnFingerWeg.Location = new System.Drawing.Point(729, 49);
|
||||
this.btnFingerWeg.Name = "btnFingerWeg";
|
||||
this.btnFingerWeg.Size = new System.Drawing.Size(62, 63);
|
||||
this.btnFingerWeg.TabIndex = 74;
|
||||
this.btnFingerWeg.Text = "Do NOT touch! Recalib!";
|
||||
this.btnFingerWeg.UseVisualStyleBackColor = true;
|
||||
this.btnFingerWeg.Visible = false;
|
||||
this.btnFingerWeg.Click += new System.EventHandler(this.FingerWeg_Clicked);
|
||||
//
|
||||
// lblGtbVersion
|
||||
//
|
||||
this.lblGtbVersion.AutoSize = true;
|
||||
@ -359,22 +347,21 @@
|
||||
this.Controls.Add(this.btnFileToRegister);
|
||||
this.Controls.Add(this.lblConfigVersion);
|
||||
this.Controls.Add(this.lblGtbVersion);
|
||||
this.Controls.Add(this.btnFingerWeg);
|
||||
this.Controls.Add(this.nundCalResultID);
|
||||
this.Controls.Add(this.btnRadioPressure);
|
||||
this.Controls.Add(this.btnBatLife);
|
||||
this.Controls.Add(this.btnRegisterToFile);
|
||||
this.Controls.Add(this.btnStoreAll);
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.btn_CalibrationRestore);
|
||||
this.Controls.Add(this.btnSetDefaultPulse);
|
||||
this.Controls.Add(this.btnBatteryIdle);
|
||||
this.Controls.Add(this.btnCalibrationRestore);
|
||||
this.Controls.Add(this.btnReadFwVersions);
|
||||
this.Controls.Add(this.pnlBussy);
|
||||
this.Controls.Add(this.btnGetPCbID);
|
||||
this.Controls.Add(this.lblState);
|
||||
this.Controls.Add(this.btnConnect);
|
||||
this.Controls.Add(this.registerGridView);
|
||||
this.Controls.Add(this.btnRead);
|
||||
this.Controls.Add(this.btnReadRegister);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.cbComSlot);
|
||||
this.Name = "FrmRegisterStore";
|
||||
@ -394,7 +381,7 @@
|
||||
|
||||
private System.Windows.Forms.ComboBox cbComSlot;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button btnRead;
|
||||
private System.Windows.Forms.Button btnReadRegister;
|
||||
private System.Windows.Forms.DataGridView registerGridView;
|
||||
private System.Windows.Forms.Button btnConnect;
|
||||
private System.Windows.Forms.Label lblState;
|
||||
@ -403,19 +390,18 @@
|
||||
private System.Windows.Forms.Panel pnlBussy;
|
||||
private System.Windows.Forms.Label lblProgress;
|
||||
private System.Windows.Forms.Label lblAction;
|
||||
private System.Windows.Forms.ProgressBar probarBussy;
|
||||
private System.Windows.Forms.ProgressBar probarBusy;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button btnReadFwVersions;
|
||||
private System.Windows.Forms.Button btn_CalibrationRestore;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.Button btnCalibrationRestore;
|
||||
private System.Windows.Forms.Button btnBatteryIdle;
|
||||
private System.Windows.Forms.Button btnSetDefaultPulse;
|
||||
private System.Windows.Forms.Button btnStoreAll;
|
||||
private System.Windows.Forms.Button btnRegisterToFile;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
private System.Windows.Forms.Button btnBatLife;
|
||||
private System.Windows.Forms.Button btnRadioPressure;
|
||||
private System.Windows.Forms.NumericUpDown nundCalResultID;
|
||||
private System.Windows.Forms.Button btnFingerWeg;
|
||||
private System.Windows.Forms.Label lblGtbVersion;
|
||||
private System.Windows.Forms.Label lblConfigVersion;
|
||||
private System.Windows.Forms.Button btnFileToRegister;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -66,7 +66,7 @@ namespace XylemCommonUiLegacyGenCtl
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"FATAL Ctor {ex.Message}");
|
||||
MessageBox.Show($@"FATAL Ctor {ex.Message}");
|
||||
}
|
||||
|
||||
|
||||
@ -235,7 +235,7 @@ namespace XylemCommonUiLegacyGenCtl
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Fatal(ex);
|
||||
MessageBox.Show($"FATAL internalPrep {ex.Message}");
|
||||
MessageBox.Show($@"FATAL internalPrep {ex.Message}");
|
||||
}
|
||||
}
|
||||
public void PrepareAction(Int32 slotCount, String cultureStr)
|
||||
@ -253,7 +253,7 @@ namespace XylemCommonUiLegacyGenCtl
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Fatal(ex);
|
||||
MessageBox.Show($"FATAL EnableMeter {ex.Message}");
|
||||
MessageBox.Show($@"FATAL EnableMeter {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -416,7 +416,7 @@ namespace XylemCommonUiLegacyGenCtl
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Fatal(ex);
|
||||
MessageBox.Show($"FATAL Start Action {ex.Message}");
|
||||
MessageBox.Show($@"FATAL Start Action {ex.Message}");
|
||||
pollingAction = PollingAction.IsOnError;
|
||||
}
|
||||
finally
|
||||
|
||||
@ -2435,12 +2435,28 @@ namespace Xylem.ServiceFwUpdate.Ui.FwUpdateBuilder
|
||||
/// <remarks date="2021-Mar-24" author="Thomas Wiedebusch">
|
||||
/// - Avoid repeated execution on invisible progress bar.
|
||||
/// </remarks>
|
||||
/// <remarks date="2021-Mar-24" author="Thomas Wiedebusch">
|
||||
/// - Thread safe implementation to avoid crash.
|
||||
/// </remarks>
|
||||
private void SetStatusProgressBar(Int32 value = 0, Boolean visible = true)
|
||||
{
|
||||
if (ProgressBarStatus == null || (ProgressBarStatus.Visible == false && visible == false))
|
||||
if (ProgressBarStatus == null || (!ProgressBarStatus.Visible && !visible))
|
||||
return;
|
||||
ProgressBarStatus.Value = value;
|
||||
ProgressBarStatus.Visible = visible;
|
||||
try
|
||||
{
|
||||
if (ProgressBarStatus == null)
|
||||
return;
|
||||
if (value > 100)
|
||||
value = 100;
|
||||
if (value < 0)
|
||||
value = 0;
|
||||
ProgressBarStatus.Visible = visible;
|
||||
ProgressBarStatus.Value = value;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user