private void ChooseMappingFile() { var dialog = new OpenFileDialog(); dialog.Title = "Mappingファイルを開く"; dialog.Filter = "CSVファイル(*.csv)|*.csv"; if (dialog.ShowDialog() == true) { MappingFilePath.Value = dialog.FileName; using (var reader = new StreamReader(MappingFilePath.Value)) using (var csv = new CsvReader(reader)) { MappingTable.Clear(); var records = csv.GetRecords <dynamic>(); foreach (var r in records) { MappingTable[r.Old] = r.New; } } } else { MappingFilePath.Value = string.Empty; } }