c# - How can I invoke PaintEventArgs for results returned by EventArgs from Web Service -
i have code: public partial class form1 : form { private int size; public form1() { initializecomponent(); size = 10; } private void runautomat_click(object sender, eventargs e) { var mymatrix = new int[size][]; (int = 0; < size; i++) { mymatrix[i] = new int[size]; (int j = 0; j < size; j++) mymatrix[i][j] = 0; } var cw = new mywebservice(); var result = cw.fillmatrix(mymatrix, size); } } next want draw grid result, don't have idea how send method painteventargs. example this: private void pb_paint(object sender, painteventargs e) { int cellsize = 2; (int x = 0; x < size; ++x) (int y = 0; y < size; ++y) { if (result [y, x].state == 1) e.graphics.fillrectangle(new system.drawing.solidbrush(color.cyan), new rectangle(y * cellsize, x * cellsize, cellsize...