i have a form with 3 textboxes and i have a class named user which has 3 members such as name, surname and age. I use the form to get user values design time and i want to serialize these values into the form designer. I can show the form at design time by using a ComponentDesigner. Here is a part of my code.
Expand|Select|Wrap|Line Numbers
- public class MyDesigner : ComponentDesigner
- {
- MyComponent CurrentController
- {
- get { return (MyComponent)this.Component; }
- }
- private DesignerVerbCollection actions;
- public override DesignerVerbCollection Verbs
- {
- get
- {
- if(actions == null)
- {
- actions = new DesignerVerbCollection();
- actions.Add(new DesignerVerb("EditorForm", new EventHandler(ChangeDisplay)));
- }
- return actions;
- }
- }
- }
- void ChangeDisplay(object sender, EventArgs e)
- {
- EditorForm editor = new EditorForm(this);
- editor.ShowDialog();
- }
- }
Any help would be greatly appreciated.