Files
mono/mcs/class/System.Windows.Forms/System.Windows.Forms.Design/WindowsFormsComponentEditor.cs
T
Andreas N 5d903c17e5 2004-04-14 Andreas Nahr <[email protected]>
* AssemblyInfo.cs: Removed
	* TODOAttribute.cs: Removed (duplicate)

	* System.Windows.Forms.Design.csproj.user
	* System.Windows.Forms.Design.csproj: Removed (outdated)

	* WindowsFormsComponentEditor.cs
	* ComponentEditorPage.cs: Added, mostly implemented

	* ComponentEditor.cs: Removed (does not belong here)

svn path=/trunk/mcs/; revision=25509
2004-04-14 21:58:19 +00:00

47 lines
1.1 KiB
C#

//
// 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;
}
}
}