private void ObjectListView_DeviceList_ItemCheck(object sender, ItemCheckEventArgs e)
{
// first of all, if user tries to check mark item which files were NOT loaded yet,
// show warning and don't allow user to check mark
ObjectListView olv = sender as ObjectListView;
DeviceListViewItemModel item = olv.GetModelObject(e.Index) as DeviceListViewItemModel;
if (item != null)
{
if (string.IsNullOrEmpty(item.DeviceName))
{
if (!_suppressErrorMessage)
{
MessageBoxUtil.ShowError(this, ErrorMessages.MISSING_FILES);
}
e.NewValue = CheckState.Unchecked;
}
}
}