Move image loading to view model

This commit is contained in:
Matt Nadareski
2021-07-12 12:38:33 -07:00
parent bc810034d0
commit 1e9b41f997
4 changed files with 59 additions and 53 deletions

View File

@@ -111,7 +111,7 @@ namespace RedBookPlayer.GUI
IEnumerable<string> fileNames = e.Data.GetFileNames();
foreach(string filename in fileNames)
{
bool loaded = await playerView.LoadImage(filename);
bool loaded = await playerView?.PlayerViewModel?.LoadImage(filename);
if(loaded)
break;
}
@@ -132,7 +132,7 @@ namespace RedBookPlayer.GUI
// Load image
else if (e.Key == App.Settings.LoadImageKey)
{
playerView?.LoadButton_Click(this, null);
playerView?.PlayerViewModel?.ExecuteLoad();
}
// Toggle playback