wpf - Error on calling method in dowork event (background worker) -


i have in code 2 same , big pieces of code, create method , put there. call method 2 times in code, first time , second time want call dowork event (background worker). problem when executes (in dowork) program stops responding... question is.how can call method dowork event?

edit: code

private void parsehtmlfile(string file) { // here parse html file , fill arraylists. }  // event call method on click private void menuitem_newpr(object sender, routedeventargs e) { parsehtmlfile(file);// in case program works well. }  // work  worker.dowork += (s, e) => { var file = e.argument string; parsehtmlfile(file);// in case program stop responding. } 

edit 2: changed thing in method , doesn't crash, have problem now. dowork method doesn't executes code exists below method call statement. put breakpoint there , never goes there...


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -