/// <summary> /// Saves the settings and closes the view. /// </summary> /// <param name="vm">View to close.</param> public void SaveAndClose(ConfigureCSVParserView vm) { if (CheckSettings()) { Settings.Default.ArtistFieldIndex = ArtistFieldIndex; Settings.Default.AlbumFieldIndex = AlbumFieldIndex; Settings.Default.TrackFieldIndex = TrackFieldIndex; Settings.Default.TimestampFieldIndex = TimestampFieldIndex; Settings.Default.AlbumArtistFieldIndex = AlbumArtistFieldIndex; Settings.Default.DurationFieldIndex = DurationFieldIndex; Settings.Default.CSVDelimiters = Delimiters; vm.Close(); } }
/// <summary> /// Reloads the original settings and closes the view. /// </summary> /// <param name="vm">View to close.</param> public void Cancel(ConfigureCSVParserView vm) { vm.Close(); }