Is it possible to develop a method so that it knows that it should automatically call the next method after exiting it?
In the following example, I have to call Refresh()for my form to be redrawn after this event. The problem is that it is ugly to trigger Refresh()after, for example, 20 different events that should update the form. eg
private void PriorityLine_Click(object sender, EventArgs e)
{
_showPriorityLine = (_showPriorityLine) ? false : true;
Refresh();
}
I assume that what I am looking for is some kind of signature that I can apply to the method to make it automatically connect to the next method, regardless of where it was called. eg,
(I know this is not syntactically correct.)
private void PriorityLine_Click(object sender, EventArgs e).Refresh()
{
_showPriorityLine = (_showPriorityLine) ? false : true;
}
, . , , . , Refresh, . , Refresh , - , .