// AGRファイル処理 private void processAgrFile(string filepath) { AgrFile agr = new AgrFile(); try { if (agr.loadFromFile(filepath) == false) { MessageBox.Show("フォーマットエラー"); return; } } catch (Exception ex) { MessageBox.Show(ex.Message, Properties.Resources.Error); return; } generateOfx(agr.accounts); }