flesh out data scanning dialog a bit

This commit is contained in:
Alex
2025-08-19 01:03:06 -07:00
parent 09de9cc0a7
commit acc686dd26
2 changed files with 11 additions and 8 deletions
+6 -3
View File
@@ -9,7 +9,7 @@
<Panel Margin="12">
<StackPanel>
<TextBlock Name="ScanStatus" FontSize="24" FontWeight="Light" Text="select your data folder..."/>
<TextBlock Name="ScanPath" Text="/there/is/a/path/here" IsVisible="false"/>
<TextBlock Name="ScanPath" IsVisible="false"/>
<StackPanel Margin="0 6 0 0" Name="ScanError" IsVisible="False">
<TextBlock>
@@ -19,8 +19,11 @@
</TextBlock>
</StackPanel>
<StackPanel Name="ScanInfo">
<StackPanel Name="ScanInfo" Margin="0 12 0 12">
<TextBlock>
<Run FontWeight="Bold" Name="ScanInfoCountText"/>
<Run Text="songs added."/>
</TextBlock>
</StackPanel>
<Grid ColumnDefinitions="Auto, *" HorizontalAlignment="Stretch">
+5 -5
View File
@@ -21,8 +21,6 @@ public partial class DataScanning : UserControl
Instance = this;
InitializeComponent();
ScanPath.Text = "";
if (!Design.IsDesignMode)
RunFlow();
}
@@ -53,7 +51,7 @@ public partial class DataScanning : UserControl
}
if (!(File.Exists(Path.Combine(selectedPath, "MusicParameterTable.uasset")) && File.Exists(Path.Combine(selectedPath, "MusicParameterTable.uexp"))))
{
UISetError("Missing MusicParameterTable asset files. Without them, we have nothing to work with.");
UISetError("Missing MusicParameterTable asset files.\nPlease ensure you've set up your data folder properly!");
return;
}
@@ -72,6 +70,7 @@ public partial class DataScanning : UserControl
{
ScanStatus.Text = "select your data folder...";
ScanPath.IsVisible = false;
ScanInfo.IsVisible = false;
ButtonGroup.IsVisible = false;
ProgressAnimation.IsVisible = true;
});
@@ -85,7 +84,7 @@ public partial class DataScanning : UserControl
ScanStatus.Text = "scanning...";
ScanPath.IsVisible = true;
ScanPath.Text = path;
ScanInfo.IsVisible = true;
ScanInfo.IsVisible = false;
ButtonGroup.IsVisible = false;
ProgressAnimation.IsVisible = true;
});
@@ -98,13 +97,14 @@ public partial class DataScanning : UserControl
ScanStatus.Text = "scan complete";
ScanPath.IsVisible = true;
ScanInfo.IsVisible = true;
ScanInfoCountText.Text = Database.Songs.Count.ToString();
ButtonGroup.IsVisible = true;
ProgressAnimation.IsVisible = false;
});
}
/// <summary>
/// Use only when no other processes are running.
/// Use only when a scan is no longer running.
/// </summary>
/// <param name="error"></param>
private void UISetError(string? error = null)