private void OpenFile() { List <ComponentTypeInfo> typeInfosFromSource = BeingUpdatedComponentBuilder .GetTypesInfosFrom(txtSourceFileName.Text, optDefaultNamespace.Checked); IEnumerable <ComponentTypeInfo> originalTypeInfosFromSource = typeInfosFromSource .Where <ComponentTypeInfo>(i => !optShowOnlyNewTypes.Checked || !BeingUpdatedComponentBuilder.HasTypeInfo(i)); lstTypeInfosFromSource.Items.Clear(); foreach (var componentTypeInfo in originalTypeInfosFromSource) { var item = new ListViewItem(componentTypeInfo.TypeName); item.SubItems.Add(componentTypeInfo.DefaultName); item.SubItems.Add(componentTypeInfo.Version); item.SubItems.Add(componentTypeInfo.Author); item.SubItems.Add(componentTypeInfo.TypeFullName); if (!optShowOnlyNewTypes.Checked && BeingUpdatedComponentBuilder.HasTypeInfo(componentTypeInfo)) { item.ForeColor = System.Drawing.Color.LightSlateGray; } lstTypeInfosFromSource.Items.Add(item); } FileOpened = true; cmdSelectAll.Enabled = true; cmdDeselectAll.Enabled = false; }