private void InitTestStationList()
{
testEquipmentListControl.DataObjectName = "ItemDescriptionReference";
testEquipmentListControl.DataObjectFormType = typeof (ItemDescriptionReferenceForm);
testEquipmentListControl.AddColumnData( "Equipment", "ToString()", 1.00 );
testEquipmentListControl.InitColumns();
testEquipmentListControl.CompletedAdd += testStationListControl_CompletedAdd;
testEquipmentListControl.CompletedEdit += testStationListControl_CompletedEdit;
testEquipmentListControl.CompletedDelete += testStationListControl_CompletedDelete;
testEquipmentListControl.SelectedIndexChanged += testStationListControl_SelectedIndexChanged;
testEquipmentListControl.OnFind += testStationListControl_OnFind;
testEquipmentListControl.ShowFind = true;
testEquipmentListControl.InitializeForm += delegate(Form form)
{
var itemReferenceForm =
form as ItemDescriptionReferenceForm;
if (itemReferenceForm != null)
{
ItemDescriptionReference itemRef = itemReferenceForm.ItemDescriptionReference;
if (!( itemRef is TestConfigurationTestEquipmentItem ))
{
itemReferenceForm.ItemDescriptionReference = new TestConfigurationTestEquipmentItem();
itemReferenceForm.ItemDescriptionReference.Item = itemRef.Item;
}
itemReferenceForm.DocumentType = dbDocument.DocumentType.TEST_STATION_DESCRIPTION;
}
};
}