Hello!
I'm trying to add some undo/redo functionality for my app. It deals with many controls, (mostly textboxes, checkboxes and radiobuttons), and I want to write one void for each type. When someone enters to one of them, the Enter event fires, and gets the text, value of the current object.
My problem is that when I can't determine, which object sent the event. E.g.: all textboxes would use the undotextbox event on entering them:
private void undotextbox(object sender, EventArgs e)
{
}
How can I get the one which fired the event? I can get the type via the sender, but I know that fairly well, I'd need the Name property of the objects.
Thanks in advance!