this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.ResumeLayout (false);
-#if NET_2_0
if (editor.CollectionType.IsGenericType)
this.Text = editor.CollectionItemType.Name + " Collection Editor";
else
this.Text = editor.CollectionType.Name + " Collection Editor";
-#else
- this.Text = editor.CollectionType.Name + " Collection Editor";
-#endif
foreach (Type type in editor.NewItemTypes)
addType.Items.Add (type.Name);
if (addType.Items.Count > 0)
for (int i = selected.Length - 1; i >= 0; i--)
itemsList.Items.RemoveAt (selected[i]);
- int prevIndex = --selected[0];
- if (prevIndex == -1 && itemsList.Items.Count > 0)
- prevIndex = 0;
- itemsList.SelectedIndex = prevIndex;
+ itemsList.SelectedIndex = Math.Min (selected[0], itemsList.Items.Count-1);
}
- if (itemsList.SelectedItems.Count == 0)
- itemDisplay.SelectedObject = null;
}
// OnEditValueChanged is called only if the EditValue has changed,
}
if (instance == null) {
-#if NET_2_0
instance = TypeDescriptor.CreateInstance (provider, itemType, null, null);
-#else
- instance = Activator.CreateInstance (itemType);
-#endif
}
return instance;
}