ParamValues() retval IList->ICollection, GetControl() arg. is a list of components, ver. 3.1.1598

This commit is contained in:
Milan Hanajik
2021-03-02 01:10:04 +01:00
parent 8dc45484b0
commit c950cc231c
182 changed files with 606 additions and 628 deletions
@@ -417,7 +417,7 @@ namespace TBF.UI.Bench.Components
///
/// Create a single component of the selected type
///
IComponentCfgCtrl cfgControl = cfg.GetControl();
IComponentCfgCtrl cfgControl = cfg.GetControl(cmpntEntities);
cfgControl.Config = cfg;
cfgControl.Config.ItemNr = (cmpntEntities.Count > 0) ? (cmpntEntities[cmpntEntities.Count - 1].ItemNr + 1) : 1;
@@ -504,7 +504,7 @@ namespace TBF.UI.Bench.Components
{
ComponentParametersDlg cfgForm = new ComponentParametersDlg(component.Id);
cfgForm.CmpntEntities = cmpntEntities;
cfgForm.ComponentCfgCtrl = cfg.GetControl();
cfgForm.ComponentCfgCtrl = cfg.GetControl(cmpntEntities);
cfgForm.ComponentCfgCtrl.Config = cfg;
DialogResult dr = cfgForm.ShowDialog();
if (dr != DialogResult.OK) return;
@@ -540,7 +540,7 @@ namespace TBF.UI.Bench.Components
cfg.Name += Strings.New_name_copy;
if (selectComponentTypeDlg.SelectedScriptName == null)
{
IComponentCfgCtrl cfgControl = cfg.GetControl();
IComponentCfgCtrl cfgControl = cfg.GetControl(cmpntEntities);
cfgControl.Config = cfg;
cfgControl.Config.ItemNr = (cmpntEntities.Count > 0) ? (cmpntEntities[cmpntEntities.Count - 1].ItemNr + 1) : 1;
@@ -584,7 +584,7 @@ namespace TBF.UI.Bench.Components
IComponentCfg cfg = TbfComponents.CmpntCfgFromCmpntEntity(newComponent);
if (cfg != null)
{
IComponentCfgCtrl cfgControl = cfg.GetControl();
IComponentCfgCtrl cfgControl = cfg.GetControl(cmpntEntities);
cfgControl.Config = cfg;
cfgControl.Config.Name = cfgControl.Config.Name + " imported";
cfgControl.Config.ItemNr = (cmpntEntities.Count > 0) ? (cmpntEntities[cmpntEntities.Count - 1].ItemNr + 1) : 1;