void LoadNtx(string ntxFile) { Debug.Assert(CadastralMapModel.Current.WorkingSession != null); // If the model is currently empty, we'll want to draw an overview upon // completion of the import (otherwise we'll refresh using the currently // displayed extent). bool wasEmpty = CadastralMapModel.Current.IsEmpty; ImportOperation i = null; EditingController c = EditingController.Current; try { i = new ImportOperation(); NtxImport ni = new NtxImport(ntxFile, this); i.Execute(ni); Trace.Write("Map model updates completed"); } catch (Exception ex) { MessageBox.Show(ex.StackTrace, ex.Message); } if (wasEmpty) { c.ActiveDisplay.DrawOverview(); } else { c.RefreshAllDisplays(); } SaveTranslations(); }
void LoadNtx(string ntxFile) { Debug.Assert(CadastralMapModel.Current.WorkingSession != null); // If the model is currently empty, we'll want to draw an overview upon // completion of the import (otherwise we'll refresh using the currently // displayed extent). bool wasEmpty = CadastralMapModel.Current.IsEmpty; ImportOperation i = null; EditingController c = EditingController.Current; try { i = new ImportOperation(); NtxImport ni = new NtxImport(ntxFile, this); i.Execute(ni); Trace.Write("Map model updates completed"); } catch (Exception ex) { MessageBox.Show(ex.StackTrace, ex.Message); } if (wasEmpty) c.ActiveDisplay.DrawOverview(); else c.RefreshAllDisplays(); SaveTranslations(); }