diff --git a/AudioCuesheetEditor/AudioCuesheetEditor.csproj b/AudioCuesheetEditor/AudioCuesheetEditor.csproj
index 46b61905..9fe666d8 100644
--- a/AudioCuesheetEditor/AudioCuesheetEditor.csproj
+++ b/AudioCuesheetEditor/AudioCuesheetEditor.csproj
@@ -22,8 +22,8 @@
-
-
+
+
@@ -61,8 +61,8 @@
-
-
+
+
diff --git a/AudioCuesheetEditor/Model/IO/Export/CuesheetSection.cs b/AudioCuesheetEditor/Model/IO/Export/CuesheetSection.cs
index b38598c4..084e1307 100644
--- a/AudioCuesheetEditor/Model/IO/Export/CuesheetSection.cs
+++ b/AudioCuesheetEditor/Model/IO/Export/CuesheetSection.cs
@@ -128,6 +128,8 @@ protected override ValidationResult Validate(string property)
{
ValidationStatus validationStatus = ValidationStatus.NoValidation;
List? validationMessages = null;
+ //TODO: Validate end also
+ //TODO: Change validation of begin to this entitys
switch (property)
{
case nameof(Begin):
diff --git a/AudioCuesheetEditor/Pages/EditSplitpoints.razor b/AudioCuesheetEditor/Pages/EditSections.razor
similarity index 77%
rename from AudioCuesheetEditor/Pages/EditSplitpoints.razor
rename to AudioCuesheetEditor/Pages/EditSections.razor
index 5f43ef00..4f9c19ea 100644
--- a/AudioCuesheetEditor/Pages/EditSplitpoints.razor
+++ b/AudioCuesheetEditor/Pages/EditSections.razor
@@ -17,7 +17,7 @@ along with Foobar. If not, see
-->
@implements IDisposable
-@inject ITextLocalizer _localizer
+@inject ITextLocalizer _localizer
@inject SessionStateContainer _sessionStateContainer
@inject ITextLocalizer _validationMessageLocalizer
@inject DateTimeUtility _dateTimeUtility
@@ -25,20 +25,20 @@ along with Foobar. If not, see
@inject TraceChangeManager _traceChangeManager
@inject IJSRuntime _jsRuntime
-@*
+
@if (Cuesheet != null)
{
@if (_sessionStateContainer.CurrentViewMode == ViewMode.ViewModeFull)
{
-
@@ -49,22 +49,23 @@ along with Foobar. If not, see
@_localizer["Controls"]
- @_localizer["Moment"]
+ @_localizer["Begin"]
+ @_localizer["End"]
@_localizer["CD artist"]
@_localizer["CD title"]
@_localizer["Audiofile name"]
- @foreach (var splitPoint in Cuesheet.Sections)
+ @foreach (var cuesheetSection in Cuesheet.Sections)
{
-
-
+
+
@@ -75,8 +76,8 @@ along with Foobar. If not, see
-
-
+
+
@@ -84,8 +85,8 @@ along with Foobar. If not, see
-
-
+
+
@@ -93,8 +94,8 @@ along with Foobar. If not, see
-
-
+
+
@@ -102,10 +103,19 @@ along with Foobar. If not, see
-
- @if (String.IsNullOrEmpty(splitPoint.AudiofileName))
+
+
+
+
+
+
+
+
+
+
+ @if (String.IsNullOrEmpty(cuesheetSection.AudiofileName))
{
- x.MimeType))" Changed="(args) => OnSplitpointAudiofileChanged(args, splitPoint)" AutoReset="false">
+ x.MimeType))" Changed="(args) => OnSectionAudiofileChanged(args, cuesheetSection)" AutoReset="false">
@@ -115,14 +125,14 @@ along with Foobar. If not, see
{
-
+
- @_localizer["Change"]
+ @_localizer["Change"]
}
@@ -133,12 +143,11 @@ along with Foobar. If not, see
}
- *@
+
@code {
- //TODO: Rename component!
Validations? validations;
ModalDialog? modalDialog;
Validation? audiofileValidation;
@@ -201,22 +210,22 @@ along with Foobar. If not, see
validations?.ValidateAll();
}
- Task AddSplitPointClicked()
+ Task AddSectionClicked()
{
if (Cuesheet != null)
{
- var splitPoint = Cuesheet.AddSection();
- _traceChangeManager.TraceChanges(splitPoint);
- fileEditAudiofileIds.Add(splitPoint, Guid.NewGuid());
+ var section = Cuesheet.AddSection();
+ _traceChangeManager.TraceChanges(section);
+ fileEditAudiofileIds.Add(section, Guid.NewGuid());
}
return Task.CompletedTask;
}
- Task DeleteSplitPointClicked(CuesheetSection splitPoint)
+ Task DeleteSectionClicked(CuesheetSection section)
{
if (Cuesheet != null)
{
- Cuesheet.RemoveSection(splitPoint);
+ Cuesheet.RemoveSection(section);
}
return Task.CompletedTask;
}
@@ -266,15 +275,15 @@ along with Foobar. If not, see
StateHasChanged();
}
- async Task OnSplitpointAudiofileChangedCliccked(CuesheetSection splitPoint)
+ async Task OnSectionAudiofileChangedClicked(CuesheetSection section)
{
- splitPoint.AudiofileName = null;
+ section.AudiofileName = null;
StateHasChanged();
await Task.Delay(1);
- await _jsRuntime.InvokeVoidAsync("triggerClick", fileEditAudiofileIds[splitPoint]);
+ await _jsRuntime.InvokeVoidAsync("triggerClick", fileEditAudiofileIds[section]);
}
- async Task OnSplitpointAudiofileChanged(FileChangedEventArgs e, CuesheetSection splitPoint)
+ async Task OnSectionAudiofileChanged(FileChangedEventArgs e, CuesheetSection section)
{
if (e.Files.FirstOrDefault() != null)
{
@@ -283,7 +292,7 @@ along with Foobar. If not, see
var file = e.Files.First();
if (IOUtility.CheckFileMimeTypeForAudioCodec(file) == true)
{
- splitPoint.AudiofileName = file.Name;
+ section.AudiofileName = file.Name;
}
else
{
diff --git a/AudioCuesheetEditor/Pages/Index.razor b/AudioCuesheetEditor/Pages/Index.razor
index 887d2a1e..7eb0dbd9 100644
--- a/AudioCuesheetEditor/Pages/Index.razor
+++ b/AudioCuesheetEditor/Pages/Index.razor
@@ -41,10 +41,10 @@ along with Foobar. If not, see
- @_localizer["Cuesheet split points"]
+ @_localizer["Cuesheet sections"]
-
+
diff --git a/AudioCuesheetEditor/Pages/ViewModeImport.razor b/AudioCuesheetEditor/Pages/ViewModeImport.razor
index dcf33b2d..b1de7655 100644
--- a/AudioCuesheetEditor/Pages/ViewModeImport.razor
+++ b/AudioCuesheetEditor/Pages/ViewModeImport.razor
@@ -274,10 +274,10 @@ along with Foobar. If not, see
{
- @_localizer["Cuesheet split points"]
+ @_localizer["Cuesheet sections"]
-
+
}
diff --git a/AudioCuesheetEditor/Resources/Localization/EditSplitpoints/de.json b/AudioCuesheetEditor/Resources/Localization/EditSections/de.json
similarity index 75%
rename from AudioCuesheetEditor/Resources/Localization/EditSplitpoints/de.json
rename to AudioCuesheetEditor/Resources/Localization/EditSections/de.json
index 1ade6c3a..2c343c56 100644
--- a/AudioCuesheetEditor/Resources/Localization/EditSplitpoints/de.json
+++ b/AudioCuesheetEditor/Resources/Localization/EditSections/de.json
@@ -1,10 +1,11 @@
{
"culture": "de",
"translations": {
- "Add new split point": "Neuen Aufteilungspunkt hinzufügen",
+ "Add new section": "Neuen Abschnitt hinzufügen",
"Controls": "Steuerung",
- "Moment": "Zeitpunkt",
- "Delete split tooltip": "Löscht diesen Aufteilungspunkt",
+ "Begin": "Anfang",
+ "End": "Ende",
+ "Delete section tooltip": "Löscht diesen Abschnitt",
"CD artist": "CD Künstler",
"CD title": "CD Titel",
"Audiofile name": "Audiodatei",
diff --git a/AudioCuesheetEditor/Resources/Localization/EditSplitpoints/en.json b/AudioCuesheetEditor/Resources/Localization/EditSections/en.json
similarity index 76%
rename from AudioCuesheetEditor/Resources/Localization/EditSplitpoints/en.json
rename to AudioCuesheetEditor/Resources/Localization/EditSections/en.json
index 7256528d..f6bb71d4 100644
--- a/AudioCuesheetEditor/Resources/Localization/EditSplitpoints/en.json
+++ b/AudioCuesheetEditor/Resources/Localization/EditSections/en.json
@@ -1,10 +1,11 @@
{
"culture": "en",
"translations": {
- "Add new split point": "Add new split point",
+ "Add new section": "Add new section",
"Controls": "Controls",
- "Moment": "Moment",
- "Delete split tooltip": "Deletes this split point",
+ "Begin": "Begin",
+ "End": "End",
+ "Delete section tooltip": "Deletes this section",
"CD artist": "CD artist",
"CD title": "CD title",
"Audiofile name": "Audiofile",
diff --git a/AudioCuesheetEditor/Resources/Localization/Index/de.json b/AudioCuesheetEditor/Resources/Localization/Index/de.json
index 32530bad..65c4083c 100644
--- a/AudioCuesheetEditor/Resources/Localization/Index/de.json
+++ b/AudioCuesheetEditor/Resources/Localization/Index/de.json
@@ -44,6 +44,6 @@
"DateTime": "Datum und Uhrzeit",
"Time": "Uhrzeit",
"Save changes": "Änderungen speichern",
- "Cuesheet split points": "Cuesheet Aufteilungspunkte"
+ "Cuesheet sections": "Cuesheet Abschnitte"
}
}
\ No newline at end of file
diff --git a/AudioCuesheetEditor/Resources/Localization/Index/en.json b/AudioCuesheetEditor/Resources/Localization/Index/en.json
index 494ed278..2e8bd0f6 100644
--- a/AudioCuesheetEditor/Resources/Localization/Index/en.json
+++ b/AudioCuesheetEditor/Resources/Localization/Index/en.json
@@ -44,6 +44,6 @@
"DateTime": "Date and Time",
"Time": "Time",
"Save changes": "Save changes",
- "Cuesheet split points": "Cuesheet split points"
+ "Cuesheet sections": "Cuesheet sections"
}
}
\ No newline at end of file
diff --git a/AudioCuesheetEditor/Resources/Localization/ViewModeImport/de.json b/AudioCuesheetEditor/Resources/Localization/ViewModeImport/de.json
index 2e2bd675..4d8539a4 100644
--- a/AudioCuesheetEditor/Resources/Localization/ViewModeImport/de.json
+++ b/AudioCuesheetEditor/Resources/Localization/ViewModeImport/de.json
@@ -61,6 +61,6 @@
"Please confirm": "Bestätigung erforderlich",
"Do you really want to reset the import options to default? This can not be undone!": "Möchten Sie wirklich die Import Optionen zurücksetzen? Dies kann nicht rückgängig gemacht werden!",
"Abort import of displayed data": "Import der angezeigten Daten abbrechen",
- "Cuesheet split points": "Cuesheet Aufteilungspunkte"
+ "Cuesheet sections": "Cuesheet Abschnitte"
}
}
\ No newline at end of file
diff --git a/AudioCuesheetEditor/Resources/Localization/ViewModeImport/en.json b/AudioCuesheetEditor/Resources/Localization/ViewModeImport/en.json
index 39c0634f..960cb5a1 100644
--- a/AudioCuesheetEditor/Resources/Localization/ViewModeImport/en.json
+++ b/AudioCuesheetEditor/Resources/Localization/ViewModeImport/en.json
@@ -60,6 +60,6 @@
"Please confirm": "Please confirm",
"Do you really want to reset the import options to default? This can not be undone!": "Do you really want to reset the import options to default? This can not be undone!",
"Abort import of displayed data": "Abort import of displayed data",
- "Cuesheet split points": "Cuesheet split points"
+ "Cuesheet sections": "Cuesheet sections"
}
}
\ No newline at end of file