mirror of
https://github.com/muskit/MercuryConverter.git
synced 2026-06-02 12:14:26 -07:00
flesh out data scanning dialog a bit
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user