I am working with a WinForm application that was designed by the previous, now unreachable, develeper. In this app farms are embedded in TabControls through some custom code. My question is, Can anyone help to try and explain why there is a custom _Paint() function in each form that is called from the Load event for that form.
This Paint() method is not actually tied to the form outside of the previously stated daisy chaining. What purpose could this serve? In the code below you will notice That I created a Paint() event and moved part of the code there and everything still seems "Peachy."
Can anyone help me to understand this? Is it simply because of the Public declaration on the custom one?
private void frmWWCModuleHost_Load(object sender, EventArgs e)
{
FormPaint();
}
public void FormPaint()
{
WinFormCustomHandling.ShowFormInContainerControl(tpgCaseNotes, new FrmCaseNotes());
WinFormCustomHandling.ShowFormInContainerControl(tpgMCP, _frmWWCMCPHost);
WinFormCustomHandling.ShowFormInContainerControl(tpgMember, _frmWWCMemberHost);
WinFormCustomHandling.ShowFormInContainerControl(tpgEnrollment, _frmWWCEnrollmentHost);
WinFormCustomHandling.ShowFormInContainerControl(tpgWWCSearch,_frmWWCSearch);
WinFormCustomHandling.ShowFormInContainerControl(tpgAudit, FrmAudit);
// Call each top-Level (visible) tabpage's form FormPaint()
_frmWWCMCPHost.FormPaint();
}
private void FrmModuleHost_Paint(object sender, PaintEventArgs e)
{
new psTabRenderer(tclWWCModuleHost, Color.LightSteelBlue, Color.Tomato, Color.Black, Color.Black);
}