Hi all,
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 ComponentDesign er. Here is a part of my code.
I also have a collection class which i hold user class members. What i need is to serialize the collection into designer at design time. I can serialize the values by using the collectionedito r but can't do that via my editor form.
Any help would be greatly appreciated.
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 ComponentDesign er. Here is a part of my code.
Code:
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.
Comment