private void radioButton3_CheckedChanged(object sender, EventArgs e) { CleanMatrix(); Graphics g = Graphics.FromHwnd(panel1.Handle); Graphics g1 = Graphics.FromHwnd(panel2.Handle); d = new Sheme3(g, 10, 10); d1 = new Sheme3(g1, 10, 10); m1.setDrawer(d); m2.setDrawer(d1); m1.draw(); m2.draw(); }