mirror of
https://github.com/muskit/MercuryConverter.git
synced 2026-06-02 20:24:26 -07:00
flesh out data scanning dialog a bit
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
<Panel Margin="12">
|
<Panel Margin="12">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Name="ScanStatus" FontSize="24" FontWeight="Light" Text="select your data folder..."/>
|
<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">
|
<StackPanel Margin="0 6 0 0" Name="ScanError" IsVisible="False">
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
@@ -19,8 +19,11 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Name="ScanInfo">
|
<StackPanel Name="ScanInfo" Margin="0 12 0 12">
|
||||||
|
<TextBlock>
|
||||||
|
<Run FontWeight="Bold" Name="ScanInfoCountText"/>
|
||||||
|
<Run Text="songs added."/>
|
||||||
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<Grid ColumnDefinitions="Auto, *" HorizontalAlignment="Stretch">
|
<Grid ColumnDefinitions="Auto, *" HorizontalAlignment="Stretch">
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ public partial class DataScanning : UserControl
|
|||||||
Instance = this;
|
Instance = this;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
ScanPath.Text = "";
|
|
||||||
|
|
||||||
if (!Design.IsDesignMode)
|
if (!Design.IsDesignMode)
|
||||||
RunFlow();
|
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"))))
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,6 +70,7 @@ public partial class DataScanning : UserControl
|
|||||||
{
|
{
|
||||||
ScanStatus.Text = "select your data folder...";
|
ScanStatus.Text = "select your data folder...";
|
||||||
ScanPath.IsVisible = false;
|
ScanPath.IsVisible = false;
|
||||||
|
ScanInfo.IsVisible = false;
|
||||||
ButtonGroup.IsVisible = false;
|
ButtonGroup.IsVisible = false;
|
||||||
ProgressAnimation.IsVisible = true;
|
ProgressAnimation.IsVisible = true;
|
||||||
});
|
});
|
||||||
@@ -85,7 +84,7 @@ public partial class DataScanning : UserControl
|
|||||||
ScanStatus.Text = "scanning...";
|
ScanStatus.Text = "scanning...";
|
||||||
ScanPath.IsVisible = true;
|
ScanPath.IsVisible = true;
|
||||||
ScanPath.Text = path;
|
ScanPath.Text = path;
|
||||||
ScanInfo.IsVisible = true;
|
ScanInfo.IsVisible = false;
|
||||||
ButtonGroup.IsVisible = false;
|
ButtonGroup.IsVisible = false;
|
||||||
ProgressAnimation.IsVisible = true;
|
ProgressAnimation.IsVisible = true;
|
||||||
});
|
});
|
||||||
@@ -98,13 +97,14 @@ public partial class DataScanning : UserControl
|
|||||||
ScanStatus.Text = "scan complete";
|
ScanStatus.Text = "scan complete";
|
||||||
ScanPath.IsVisible = true;
|
ScanPath.IsVisible = true;
|
||||||
ScanInfo.IsVisible = true;
|
ScanInfo.IsVisible = true;
|
||||||
|
ScanInfoCountText.Text = Database.Songs.Count.ToString();
|
||||||
ButtonGroup.IsVisible = true;
|
ButtonGroup.IsVisible = true;
|
||||||
ProgressAnimation.IsVisible = false;
|
ProgressAnimation.IsVisible = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Use only when no other processes are running.
|
/// Use only when a scan is no longer running.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="error"></param>
|
/// <param name="error"></param>
|
||||||
private void UISetError(string? error = null)
|
private void UISetError(string? error = null)
|
||||||
|
|||||||
Reference in New Issue
Block a user