You can do that, but your reasoning is slightly flawed.
"I decided to do it this way in order to have only one 'onclick' event handler that serves all of the PaintedPanel instances, rather than creating a grid of Panels within my main form logic and having to code multiple event handlers for each and every PaintedPanels."
The same event handler can handle as many instances as you need: the
sender
parameter tells you which one it relates to:
void myEventHandler(object sender, EventArgs e)
{
MyCustomControl mcc = sender as MyCustomeControl;
if (mcc != null)
{
Console.WriteLine(mcc.APropertyOfTheControl);
}
}
Normally, you would keep it so that the Room class does not know or need to know about even the existence of other rooms: instead, You would have a Floor class which knew about all the rooms on a floor, and a Hotel class which knew about all the floors.