public void setParameterActions(dsModuleStructure2 dsModuleStructure, dsModuleStructure2.dtModuleRow module) { actionTypeDict = new Dictionary<dsModuleStructure2.dtModuleTypeActionTypeRow, ctrlCommand>(); _dsModuleStructure = dsModuleStructure; dsModuleStructure2.dtModuleTypeActionTypeRow[] moduleTypeActionTypeRows = module.dtModuleTypeRow.GetdtModuleTypeActionTypeRows(); foreach (dsModuleStructure2.dtModuleTypeActionTypeRow moduleTypeActionTypeRow in moduleTypeActionTypeRows) { ctrlCommand command = new ctrlCommand(); foreach (KeyValuePair<dsModuleStructure2.dtModuleTypeActionTypeRow, ctrlCommand> kvp in actionTypeDict) { if (moduleTypeActionTypeRow.fk_action_value_type_id == kvp.Key.fk_action_value_type_id) { command = kvp.Value; } } if (!command.isInitialized()) { command.init(moduleTypeActionTypeRow.dtActionValueTypeRow.description); actionTypeDict.Add(moduleTypeActionTypeRow, command); } command.addCommand(moduleTypeActionTypeRow.dtActionTypeRow); } foreach (ctrlCommand commands in actionTypeDict.Values) { commands.Dock = DockStyle.Top; layoutMainPanel.Controls.Add(commands); } }
public ctrlModuleParameters(dsModuleStructure2.dtModuleRow moduleRow, dsModuleStructure2 dsModuleStructure) : this() { _moduleRow = moduleRow; _dsModuleStructure = dsModuleStructure; setParameterActions(_dsModuleStructure, _moduleRow); }