C2025-023 - Electronic Procedures - Modifications to PROMS

Working on Adding functionality for EP input for tables #2
This commit is contained in:
2025-04-25 15:07:29 -04:00
parent 6db9567eb9
commit 62ae81c7b3
3 changed files with 91 additions and 41 deletions

View File

@@ -25,6 +25,7 @@ namespace Volian.Controls.Library
private Dictionary<string, ComboBox> _DicComboBox;
private Dictionary<string, ComboBox> _DicSingleRO;
private Dictionary<string, ListBoxMulti> _DicMultiRO;
private TablePropertiesControl _TablePropControl;
private string multiseparator = ",";
@@ -150,10 +151,13 @@ namespace Volian.Controls.Library
panelEP.Controls.Add(lb, 1, panelEP.RowCount - 1);
}
if (EP.type.ToLower() == "tableinput")
//note will allow only 1 tableproperties control since it is a 1:1 match with the table that is in the step
if (EP.type.ToLower() == "tableinput" && _TablePropControl == null)
{
TablePropertiesControl tp = new TablePropertiesControl(EP.text, null);
panelEP.Controls.Add(tp, 1, panelEP.RowCount - 1);
string val = MyConfig.GetValue("EP", EP.name);
_TablePropControl = new TablePropertiesControl(EP.name, EP.text, val);
_TablePropControl.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
panelEP.Controls.Add(_TablePropControl, 1, panelEP.RowCount - 1);
}
@@ -265,6 +269,16 @@ namespace Volian.Controls.Library
MyConfig.SetValue("EP", EP.name, newvalues);
}
}
else if (EP.type.ToLower() == "tableinput" && EP.name == _TablePropControl.epname)
{
string newvalues = _TablePropControl.GetStorageValue();
string oldvalues = MyConfig.GetValue("EP", EP.name);
if (newvalues != oldvalues)
{
isDirty = true;
MyConfig.SetValue("EP", EP.name, newvalues);
}
}
}
if (isDirty)
{