/// <summary> /// Реализация опрераций чтения/записи данных /// </summary> private void ImportExport(ImportExportHandler handler, string path) { if (!string.IsNullOrEmpty(path)) { try { handler.Invoke(path); _view.ShowMessage(Resources.MainFormPresenterSuccessMessage, Resources.MainFormPresenterSuccessTitle, icon: MessageBoxIcon.Information); } catch (SecurityException sex) { _view.ShowMessage(sex.Message, Resources.MainFormPresenterSecurityErrorTitle); } }
/// <summary> /// Реализация опрераций чтения/записи данных /// </summary> private void ImportExport(ImportExportHandler handler, string path) { if (!string.IsNullOrEmpty(path)) try { handler.Invoke(path); _view.ShowMessage(Resources.MainFormPresenterSuccessMessage, Resources.MainFormPresenterSuccessTitle, icon: MessageBoxIcon.Information); } catch (SecurityException sex) { _view.ShowMessage(sex.Message, Resources.MainFormPresenterSecurityErrorTitle); } catch (IOException iex) { _view.ShowMessage(iex.Message, Resources.MainFormPresenterIOErrorTitle); } catch (Exception ex) { _view.ShowMessage(ex.Message); } }