private void OpenLib_Click(object sender, RoutedEventArgs e) { var openDialog = new OpenFileDialog(); openDialog.Filter = "Gran Turismo 4 BGM Library (*.inf)|*.inf"; openDialog.CheckFileExists = true; openDialog.CheckPathExists = true; if (openDialog.ShowDialog() == true) { MusicInf bgml; try { bgml = MusicInf.ReadFromFile(openDialog.FileName); } catch (Exception ex) { MessageBox.Show($"Error occured while loading file: {ex.Message}", "A not so friendly prompt", MessageBoxButton.OK, MessageBoxImage.Error); return; } Library = bgml; UpdatePlaylistsList(); menuItem_Save.IsEnabled = true; } }
public MusicDTOFormatter(MusicListItemJson item, MusicInf inf, MusicDTO.EditData data) { this.item = item; this.inf = inf; dto_data = data; }
public MusicDTOFormatter(MusicListItemJson item, MusicInf inf, MusicOldDTO data) { this.item = item; this.inf = inf; old_data = data; }