public ATMLSelectionCheckListForm(ATMLSelectionCheckListContext context)
{
InitializeComponent();
this.context = context;
lblSelectionLabel.Text = context.SelectionLabelText;
cmbSelect.DataSource = context.SelectionData;
cmbSelect.SelectedIndexChanged += cmbSelect_SelectedIndexChanged;
lvCheckList.CheckBoxes = true;
Type type = Type.GetType(context.ListItemClassName);
foreach (PropertyInfo pi in type.GetProperties())
{
if (pi.PropertyType.Name.Equals("String"))
{
lvCheckList.Columns.Add(pi.Name);
columnNames.Add(pi.Name);
}
}
if (columnNames.Count > 0)
{
int width = lvCheckList.Width/columnNames.Count;
for (int i = 0; i < columnNames.Count; i++)
lvCheckList.Columns[i].Width = width;
}
}