G
Guest
I need some assistance doing some "right way to do it" coding. The following
are EventHandlers associated with Delegates in a child form that call a
procedure in the MDI form that resets a timer. There must be a better way to
code this than calling OnResetTimer in all these procedures separately. Is
there not a way to use one handler for all of them?
private void pnlCPI_MouseMove(object sender,
System.Windows.Forms.MouseEventArgs e)
{
OnResetTimer(this);
}
private void txtCPI_KeyPress(object sender,
System.Windows.Forms.KeyPressEventArgs e)
{
OnResetTimer(this);
}
private void dgLevelOfCare_MouseMove(object sender,
System.Windows.Forms.MouseEventArgs e)
{
OnResetTimer(this);
}
private void dgLevelOfCare_KeyPress(object sender,
System.Windows.Forms.KeyPressEventArgs e)
{
OnResetTimer(this);
}
are EventHandlers associated with Delegates in a child form that call a
procedure in the MDI form that resets a timer. There must be a better way to
code this than calling OnResetTimer in all these procedures separately. Is
there not a way to use one handler for all of them?
private void pnlCPI_MouseMove(object sender,
System.Windows.Forms.MouseEventArgs e)
{
OnResetTimer(this);
}
private void txtCPI_KeyPress(object sender,
System.Windows.Forms.KeyPressEventArgs e)
{
OnResetTimer(this);
}
private void dgLevelOfCare_MouseMove(object sender,
System.Windows.Forms.MouseEventArgs e)
{
OnResetTimer(this);
}
private void dgLevelOfCare_KeyPress(object sender,
System.Windows.Forms.KeyPressEventArgs e)
{
OnResetTimer(this);
}