Rename helper method to be more accurate

This commit is contained in:
Matt Nadareski
2021-06-29 15:51:24 -07:00
parent 5f0e2f03dd
commit c1827ff6a3

View File

@@ -82,10 +82,43 @@ namespace RedBookPlayer.GUI
}
}
/// <summary>
/// Initialize the UI based on the currently selected theme
/// </summary>
/// <param name="xaml">XAML data representing the theme, null for default</param>
private void InitializeComponent(string xaml)
{
DataContext = new PlayerViewModel();
if (xaml != null)
new AvaloniaXamlLoader().Load(xaml, null, this);
else
AvaloniaXamlLoader.Load(this);
InitializeDigits();
_updateTimer = new Timer(1000 / 60);
_updateTimer.Elapsed += (sender, e) =>
{
try
{
UpdateView(sender, e);
}
catch(Exception ex)
{
Console.WriteLine(ex);
}
};
_updateTimer.AutoReset = true;
_updateTimer.Start();
}
/// <summary>
/// Initialize the displayed digits array
/// </summary>
private void Initialize()
private void InitializeDigits()
{
_digits = new Image[]
{
@@ -117,39 +150,6 @@ namespace RedBookPlayer.GUI
};
}
/// <summary>
/// Initialize the UI based on the currently selected theme
/// </summary>
/// <param name="xaml">XAML data representing the theme, null for default</param>
private void InitializeComponent(string xaml)
{
DataContext = new PlayerViewModel();
if (xaml != null)
new AvaloniaXamlLoader().Load(xaml, null, this);
else
AvaloniaXamlLoader.Load(this);
Initialize();
_updateTimer = new Timer(1000 / 60);
_updateTimer.Elapsed += (sender, e) =>
{
try
{
UpdateView(sender, e);
}
catch(Exception ex)
{
Console.WriteLine(ex);
}
};
_updateTimer.AutoReset = true;
_updateTimer.Start();
}
/// <summary>
/// Load an image from the path
/// </summary>