diff --git a/VDownload.Core/VDownload.Core.ViewModels/Home/HomeViewModel.cs b/VDownload.Core/VDownload.Core.ViewModels/Home/HomeViewModel.cs
index 48fae5a..2a32d43 100644
--- a/VDownload.Core/VDownload.Core.ViewModels/Home/HomeViewModel.cs
+++ b/VDownload.Core/VDownload.Core.ViewModels/Home/HomeViewModel.cs
@@ -19,6 +19,13 @@ namespace VDownload.Core.ViewModels.Home
{
#region ENUMS
+ public enum OptionBarMessageIconType
+ {
+ None,
+ ProgressRing,
+ Error
+ }
+
public enum OptionBarContentType
{
None,
@@ -75,7 +82,7 @@ namespace VDownload.Core.ViewModels.Home
private string _optionBarMessage;
[ObservableProperty]
- private bool _optionBarLoading;
+ private OptionBarMessageIconType _optionBarMessageIcon;
[ObservableProperty]
private bool _optionBarVideoSearchButtonChecked;
@@ -131,6 +138,7 @@ namespace VDownload.Core.ViewModels.Home
MainContent = _downloadsView;
OptionBarContent = OptionBarContentType.None;
+ OptionBarMessageIcon = OptionBarMessageIconType.None;
OptionBarMessage = null;
OptionBarVideoSearchButtonChecked = false;
OptionBarPlaylistSearchButtonChecked = false;
@@ -156,6 +164,9 @@ namespace VDownload.Core.ViewModels.Home
[RelayCommand]
public void VideoSearchShow()
{
+ OptionBarSearchNotPending = true;
+ OptionBarMessageIcon = OptionBarMessageIconType.None;
+ OptionBarMessage = null;
MainContent = _downloadsView;
if (OptionBarContent != OptionBarContentType.VideoSearch)
@@ -172,6 +183,9 @@ namespace VDownload.Core.ViewModels.Home
[RelayCommand]
public void PlaylistSearchShow()
{
+ OptionBarSearchNotPending = true;
+ OptionBarMessageIcon = OptionBarMessageIconType.None;
+ OptionBarMessage = null;
MainContent = _downloadsView;
if (OptionBarContent != OptionBarContentType.PlaylistSearch)
@@ -189,7 +203,7 @@ namespace VDownload.Core.ViewModels.Home
public async Task VideoSearchStart()
{
OptionBarSearchNotPending = false;
- OptionBarLoading = true;
+ OptionBarMessageIcon = OptionBarMessageIconType.ProgressRing;
OptionBarMessage = _stringResourcesService.HomeViewResources.Get("OptionBarMessageLoading");
Video video;
@@ -199,7 +213,7 @@ namespace VDownload.Core.ViewModels.Home
}
catch (MediaSearchException ex)
{
- OptionBarLoading = false;
+ OptionBarMessageIcon = OptionBarMessageIconType.Error;
OptionBarMessage = _stringResourcesService.SearchResources.Get(ex.StringCode);
OptionBarSearchNotPending = true;
return;
@@ -210,7 +224,7 @@ namespace VDownload.Core.ViewModels.Home
MainContent = _videoView;
OptionBarSearchNotPending = true;
- OptionBarLoading = false;
+ OptionBarMessageIcon = OptionBarMessageIconType.None;
OptionBarMessage = null;
}
@@ -218,7 +232,7 @@ namespace VDownload.Core.ViewModels.Home
public async Task PlaylistSearchStart()
{
OptionBarSearchNotPending = false;
- OptionBarLoading = true;
+ OptionBarMessageIcon = OptionBarMessageIconType.ProgressRing;
OptionBarMessage = _stringResourcesService.HomeViewResources.Get("OptionBarMessageLoading");
Playlist playlist;
@@ -228,7 +242,7 @@ namespace VDownload.Core.ViewModels.Home
}
catch (MediaSearchException ex)
{
- OptionBarLoading = false;
+ OptionBarMessageIcon = OptionBarMessageIconType.Error;
OptionBarMessage = _stringResourcesService.SearchResources.Get(ex.StringCode);
OptionBarSearchNotPending = true;
return;
@@ -239,7 +253,7 @@ namespace VDownload.Core.ViewModels.Home
MainContent = _playlistView;
OptionBarSearchNotPending = true;
- OptionBarLoading = false;
+ OptionBarMessageIcon = OptionBarMessageIconType.None;
OptionBarMessage = null;
}
diff --git a/VDownload.Core/VDownload.Core.Views/Home/HomeView.xaml b/VDownload.Core/VDownload.Core.Views/Home/HomeView.xaml
index aaf06cf..55aa37b 100644
--- a/VDownload.Core/VDownload.Core.Views/Home/HomeView.xaml
+++ b/VDownload.Core/VDownload.Core.Views/Home/HomeView.xaml
@@ -106,10 +106,24 @@
-
+
+ 20
+ 0,0,10,0
+
+
+
+
+
+
+
+
+
+
diff --git a/VDownload/App.xaml b/VDownload/App.xaml
index 08faa8f..d88ed54 100644
--- a/VDownload/App.xaml
+++ b/VDownload/App.xaml
@@ -14,6 +14,7 @@
+
diff --git a/VDownload/Assets/HomeView/Error.png b/VDownload/Assets/HomeView/Error.png
new file mode 100644
index 0000000..9cbf794
Binary files /dev/null and b/VDownload/Assets/HomeView/Error.png differ
diff --git a/VDownload/Dictionaries/Images/ImagesHomeView.xaml b/VDownload/Dictionaries/Images/ImagesHomeView.xaml
new file mode 100644
index 0000000..bfedf7a
--- /dev/null
+++ b/VDownload/Dictionaries/Images/ImagesHomeView.xaml
@@ -0,0 +1,6 @@
+
+
+ /Assets/HomeView/Error.png
+
diff --git a/VDownload/VDownload.csproj b/VDownload/VDownload.csproj
index ac85d92..e57000c 100644
--- a/VDownload/VDownload.csproj
+++ b/VDownload/VDownload.csproj
@@ -84,6 +84,7 @@
+
@@ -144,6 +145,7 @@
+
@@ -398,6 +400,9 @@
Always
+
+ Always
+
Always
@@ -407,6 +412,9 @@
Always
+
+ MSBuild:Compile
+
MSBuild:Compile