private void Process() { if (!_fdb.RepairSpatialIndex(_fc.Name, new EventHandler(ProcessEventHandler))) { MessageBox.Show(_fdb.lastErrorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } _finished = true; ProcessEventHandler(this, new EventArgs()); }
// Thread async private Task Process() { if (!await _fdb.RepairSpatialIndex(_fc.Name, new EventHandler(ProcessEventHandler))) { MessageBox.Show(_fdb.LastErrorMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } _finished = true; ProcessEventHandler(this, new EventArgs()); }