SensusOracle : UID and Pwd invisible, CreateWztypIfMissing, VtAuftragPd, VtPruefpunktSollSd.Qbezeichnung max 8 char, more logging

This commit is contained in:
Milan Hanajik
2021-12-09 17:12:51 +01:00
parent cd84c82475
commit 2c00ed6dc4
10 changed files with 419 additions and 85 deletions
@@ -16,6 +16,14 @@ namespace TBF.Rig.Configs.ParamsProvider
{
static readonly ILog log = LogManager.GetLogger(typeof(ComponentCfgCtrl));
static readonly string AkaPwd = "········";
static readonly string AkaPwd1 = "·"; /// One character only
bool IsPassword(int i)
{
string lowerCaseName = paramsProvider.ParamName(i).ToLower();
return (lowerCaseName.Contains("password") || lowerCaseName.Contains("user id"));
}
public bool ShowMore { get { return false; } }
@@ -69,6 +77,11 @@ namespace TBF.Rig.Configs.ParamsProvider
if (values == null)
{
editors[i] = new TextBox();
if (IsPassword(i))
{
(editors[i] as TextBox).UseSystemPasswordChar = true;
}
}
else
{
@@ -180,7 +193,15 @@ namespace TBF.Rig.Configs.ParamsProvider
string message;
if (paramsProvider.ValidateParam(itemNr, e.DisplayText, out message))
{
flags |= paramsProvider.UpdateParam(itemNr, e.DisplayText);
if (!IsPassword(itemNr))
{
flags |= paramsProvider.UpdateParam(itemNr, e.DisplayText);
}
else
{
if (!e.DisplayText.Contains(AkaPwd1)) flags |= paramsProvider.UpdateParam(itemNr, e.DisplayText);
e.DisplayText = AkaPwd;
}
}
else
{