void _backWorker_DoWork(object sender, DoWorkEventArgs e) { _aglobal = prepareDataForAutomatedTT(); if (_aglobal._totalNodesForAllocation > 0) { try { _aglobal.findBestSolution(_backWorker, e); } catch (Exception ex) { MessageBox.Show(ex.StackTrace); } } else { e.Cancel = true; MessageBox.Show("Number of lessons for allocation must be greather than 0!"); } }
void _backWorker_DoWork(object sender, DoWorkEventArgs e) { _aglobal = prepareDataForAutomatedTT(); if (_aglobal._totalNodesForAllocation > 0) { try { _aglobal.findBestSolution(_backWorker, e); } catch (Exception ex) { MessageBox.Show(ex.StackTrace); } } else { e.Cancel = true; MessageBox.Show("Количество уроков для распределения должно быть больше 0!"); } }