Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

Commit

Permalink
Added somehow lost ViewClosedCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
remiX- committed May 2, 2018
1 parent 5fd244a commit e00a81c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions YouTubeTool/ViewModels/IMainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public interface IMainViewModel
RelayCommand DownloadAllCommand { get; }

RelayCommand ViewLoadedCommand { get; }
RelayCommand ViewClosedCommand { get; }
RelayCommand ViewSizeChangedCommand { get; }
}
}
6 changes: 4 additions & 2 deletions YouTubeTool/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ public bool IsProgressIndeterminate
public RelayCommand ShowAboutCommand { get; }

public RelayCommand ViewLoadedCommand { get; }
public RelayCommand ViewClosedCommand { get; }
public RelayCommand ViewSizeChangedCommand { get; }
#endregion
#endregion
Expand Down Expand Up @@ -251,6 +252,7 @@ public MainViewModel(ISettingsService settingsService, IUpdateService updateServ
ShowAboutCommand = new RelayCommand(ShowAbout);

ViewLoadedCommand = new RelayCommand(ViewLoaded);
ViewClosedCommand = new RelayCommand(ViewClosed);
ViewSizeChangedCommand = new RelayCommand(ViewSizeChanged);
}

Expand All @@ -260,8 +262,8 @@ private async void ViewLoaded()
_settingsService.Load();

// Vars
Query = "Sa0c1VGoiyc";
Query = "https://www.youtube.com/playlist?list=PLyiJecar_vAhAQNqZtbSfCLH-LpUeBnxh";
//Query = "Sa0c1VGoiyc";
//Query = "https://www.youtube.com/playlist?list=PLyiJecar_vAhAQNqZtbSfCLH-LpUeBnxh";
X = _settingsService.WindowSettings.X;
Y = _settingsService.WindowSettings.Y;
Width = _settingsService.WindowSettings.Width;
Expand Down
3 changes: 3 additions & 0 deletions YouTubeTool/Windows/WindowMain.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<i:EventTrigger EventName="Loaded">
<i:InvokeCommandAction Command="{Binding ViewLoadedCommand}" />
</i:EventTrigger>
<i:EventTrigger EventName="Closed">
<i:InvokeCommandAction Command="{Binding ViewClosedCommand}" />
</i:EventTrigger>
<i:EventTrigger EventName="SizeChanged">
<i:InvokeCommandAction Command="{Binding ViewSizeChangedCommand}" />
</i:EventTrigger>
Expand Down

0 comments on commit e00a81c

Please sign in to comment.