| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- //
- // System.Windows.Forms.Design.WindowsFormsComponentEditor.cs
- //
- // Author:
- // Andreas Nahr ([email protected])
- //
- using System.ComponentModel;
- namespace System.Windows.Forms.Design
- {
- public abstract class WindowsFormsComponentEditor : ComponentEditor
- {
- protected WindowsFormsComponentEditor ()
- {
- }
- public override bool EditComponent (ITypeDescriptorContext context, object component)
- {
- return EditComponent (context, component, null);
- }
- public virtual bool EditComponent (ITypeDescriptorContext context, object component, IWin32Window owner)
- {
- ComponentEditorForm f = new ComponentEditorForm (component, GetComponentEditorPages ());
- if (f.ShowForm (owner, GetInitialComponentEditorPageIndex ()) == DialogResult.OK)
- return true;
- return false;
- }
- public bool EditComponent (object component, IWin32Window owner)
- {
- return EditComponent (null, component, owner);
- }
- protected virtual Type[] GetComponentEditorPages ()
- {
- return null;
- }
- protected virtual int GetInitialComponentEditorPageIndex ()
- {
- return 0;
- }
- }
- }
|