public ToolPanel()
{
InitializeComponent();
myToolBtns = new RadioButton[]
{
selectBtn, areaBtn, wandBtn,
pencilBtn, boxBtn, fillBtn
};
for ( int i = 0; i < myToolBtns.Length; ++i )
{
Tool tool = (Tool) i;
myToolBtns[ i ].Click += ( sender, e ) =>
{
CurrentTool = tool;
};
}
CurrentTool = Tool.Pencil;
}