"thread being aborted" difference while displaying dialog
in app i've got thread displays "please wait" dialog window, infrequently unequivocally little amout there glitch while sketch ui (i guess).
i difference "thread being aborted" completly have thought absolved it. i meant locate difference way, proceed bury user. difference got zero rest app blunder any proceed doesn't impact it. appears incidentally tough reconstruct call.
i attempted several ways locate difference side formula starts stops thread dialog window nonetheless seems blunder apparently side thread dispalys window newly combined thread.
here formula sample, biased stationary category useful stuff, impetus i don't contend good proceed solve kind "busy" conditions nonetheless i wish solve problem. thread.sleep(500); try/catch improvments doesn't assistance me prevaricate thread exception.
open stationary bool alreadybusy = false;
open stationary busyindicator bi = new busyindicator("");
open stationary thread backgroundopertionthread;
open stationary vacant showbusy(bool isbusy, system.windows.forms.form hostform, twine message)
{
common.busymessage = message;
(isbusy)
{
common.alreadybusy = true;
backgroundopertionthread = new thread(new threadstart(showbusy));
thread.sleep(500);
(hostform != null)
{
hostform.enabled = false;
hostform.suspendlayout();
}
backgroundopertionthread.start();
}
else
{
backgroundopertionthread.abort();
thread.sleep(500);
common.alreadybusy = false;
(hostform != null)
{
hostform.enabled = true;
hostform.resumelayout();
}
}
}
open stationary vacant showbusy()
{
busyindicator bir = new busyindicator(common.busymessage);
bir.showdialog();
}
any ideas?
Comments
Post a Comment