test
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
using Microsoft.Windows.ApplicationModel.Resources;
|
using Windows.ApplicationModel.Resources;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace VDownload.Core.Strings
|
namespace VDownload.Core.Strings
|
||||||
{
|
{
|
||||||
@@ -30,7 +31,10 @@ namespace VDownload.Core.Strings
|
|||||||
|
|
||||||
#region PUBLIC METHODS
|
#region PUBLIC METHODS
|
||||||
|
|
||||||
public string Get(string key) => _resourceLoader.GetString(key);
|
public string Get(string key)
|
||||||
|
{
|
||||||
|
return _resourceLoader.GetString(key);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.Windows.ApplicationModel.Resources;
|
using Windows.ApplicationModel.Resources;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace VDownload.Core.Strings
|
namespace VDownload.Core.Strings
|
||||||
{
|
{
|
||||||
@@ -35,7 +36,19 @@ namespace VDownload.Core.Strings
|
|||||||
|
|
||||||
private static StringResource BuildResource(string resourceName)
|
private static StringResource BuildResource(string resourceName)
|
||||||
{
|
{
|
||||||
ResourceLoader loader = new ResourceLoader(resourceName);
|
File.AppendAllText("C:\\Users\\mateusz\\Desktop\\test.txt", $"teststring {resourceName}\n");
|
||||||
|
ResourceLoader loader;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
loader = new ResourceLoader($"VDownload.Core.Strings/{resourceName}");
|
||||||
|
File.AppendAllText("C:\\Users\\mateusz\\Desktop\\test.txt", $"afterteststring {resourceName}\n");
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
|
File.AppendAllText("C:\\Users\\mateusz\\Desktop\\test.txt", $"teststringerror {e.Message}\n");
|
||||||
|
throw;
|
||||||
|
}
|
||||||
return new StringResource(loader);
|
return new StringResource(loader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,48 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PRIResource Update="Strings\en-US\AboutViewResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
|
<PRIResource Update="Strings\en-US\AuthenticationViewResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
<PRIResource Update="Strings\en-US\BaseViewResources.resw">
|
<PRIResource Update="Strings\en-US\BaseViewResources.resw">
|
||||||
<Generator></Generator>
|
<Generator></Generator>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
|
<PRIResource Update="Strings\en-US\CommonResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
|
<PRIResource Update="Strings\en-US\DialogButtonsResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
|
<PRIResource Update="Strings\en-US\FilenameTemplateResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
|
<PRIResource Update="Strings\en-US\HomeDownloadsViewResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
|
<PRIResource Update="Strings\en-US\HomeVideoCollectionViewResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
|
<PRIResource Update="Strings\en-US\HomeVideoViewResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
|
<PRIResource Update="Strings\en-US\HomeViewResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
|
<PRIResource Update="Strings\en-US\NotificationsResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
|
<PRIResource Update="Strings\en-US\SearchResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
|
<PRIResource Update="Strings\en-US\SettingsViewResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</PRIResource>
|
||||||
|
<PRIResource Update="Strings\en-US\SubscriptionsViewResources.resw">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</PRIResource>
|
</PRIResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ using System.Linq;
|
|||||||
using Windows.Storage;
|
using Windows.Storage;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using VDownload.Services.UI.Notifications;
|
using VDownload.Services.UI.Notifications;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using Instances.Exceptions;
|
using Instances.Exceptions;
|
||||||
using FFMpegCore.Exceptions;
|
using FFMpegCore.Exceptions;
|
||||||
|
using VDownload.Core.Strings;
|
||||||
|
|
||||||
namespace VDownload.Core.Tasks
|
namespace VDownload.Core.Tasks
|
||||||
{
|
{
|
||||||
@@ -39,7 +39,6 @@ namespace VDownload.Core.Tasks
|
|||||||
protected readonly IConfigurationService _configurationService;
|
protected readonly IConfigurationService _configurationService;
|
||||||
protected readonly ISettingsService _settingsService;
|
protected readonly ISettingsService _settingsService;
|
||||||
protected readonly IFFmpegService _ffmpegService;
|
protected readonly IFFmpegService _ffmpegService;
|
||||||
protected readonly IStringResourcesService _stringResourcesService;
|
|
||||||
protected readonly INotificationsService _notificationsService;
|
protected readonly INotificationsService _notificationsService;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -87,12 +86,11 @@ namespace VDownload.Core.Tasks
|
|||||||
|
|
||||||
#region CONSTRUCTORS
|
#region CONSTRUCTORS
|
||||||
|
|
||||||
internal DownloadTask(Video video, VideoDownloadOptions downloadOptions, IConfigurationService configurationService, ISettingsService settingsService, IFFmpegService ffmpegService, IStringResourcesService stringResourcesService, INotificationsService notificationsService)
|
internal DownloadTask(Video video, VideoDownloadOptions downloadOptions, IConfigurationService configurationService, ISettingsService settingsService, IFFmpegService ffmpegService, INotificationsService notificationsService)
|
||||||
{
|
{
|
||||||
_configurationService = configurationService;
|
_configurationService = configurationService;
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
_ffmpegService = ffmpegService;
|
_ffmpegService = ffmpegService;
|
||||||
_stringResourcesService = stringResourcesService;
|
|
||||||
_notificationsService = notificationsService;
|
_notificationsService = notificationsService;
|
||||||
|
|
||||||
_video = video;
|
_video = video;
|
||||||
@@ -165,8 +163,8 @@ namespace VDownload.Core.Tasks
|
|||||||
|
|
||||||
List<string> content = new List<string>()
|
List<string> content = new List<string>()
|
||||||
{
|
{
|
||||||
$"{_stringResourcesService.NotificationsResources.Get("Title")}: {Video.Title}",
|
$"{StringResourcesManager.Notifications.Get("Title")}: {Video.Title}",
|
||||||
$"{_stringResourcesService.NotificationsResources.Get("Author")}: {Video.Author}"
|
$"{StringResourcesManager.Notifications.Get("Author")}: {Video.Author}"
|
||||||
};
|
};
|
||||||
|
|
||||||
string errorMessage = null;
|
string errorMessage = null;
|
||||||
@@ -222,15 +220,15 @@ namespace VDownload.Core.Tasks
|
|||||||
|
|
||||||
if (ex is TaskCanceledException || ex is HttpRequestException)
|
if (ex is TaskCanceledException || ex is HttpRequestException)
|
||||||
{
|
{
|
||||||
message = _stringResourcesService.HomeDownloadsViewResources.Get("ErrorDownloadingTimeout");
|
message = StringResourcesManager.HomeDownloadsView.Get("ErrorDownloadingTimeout");
|
||||||
}
|
}
|
||||||
else if (ex is InstanceFileNotFoundException)
|
else if (ex is InstanceFileNotFoundException)
|
||||||
{
|
{
|
||||||
message = _stringResourcesService.HomeDownloadsViewResources.Get("ErrorFFmpegPath");
|
message = StringResourcesManager.HomeDownloadsView.Get("ErrorFFmpegPath");
|
||||||
}
|
}
|
||||||
else if (ex is FFMpegException)
|
else if (ex is FFMpegException)
|
||||||
{
|
{
|
||||||
message = _stringResourcesService.HomeDownloadsViewResources.Get("ErrorFFmpeg");
|
message = StringResourcesManager.HomeDownloadsView.Get("ErrorFFmpeg");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -249,15 +247,15 @@ namespace VDownload.Core.Tasks
|
|||||||
case TaskResult.Error:
|
case TaskResult.Error:
|
||||||
if (_settingsService.Data.Common.Notifications.OnUnsuccessful)
|
if (_settingsService.Data.Common.Notifications.OnUnsuccessful)
|
||||||
{
|
{
|
||||||
string title = _stringResourcesService.NotificationsResources.Get("OnUnsuccessfulTitle");
|
string title = StringResourcesManager.Notifications.Get("OnUnsuccessfulTitle");
|
||||||
content.Add($"{_stringResourcesService.NotificationsResources.Get("Message")}: {errorMessage}");
|
content.Add($"{StringResourcesManager.Notifications.Get("Message")}: {errorMessage}");
|
||||||
_notificationsService.SendNotification(title, content);
|
_notificationsService.SendNotification(title, content);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TaskResult.Success:
|
case TaskResult.Success:
|
||||||
if (_settingsService.Data.Common.Notifications.OnSuccessful)
|
if (_settingsService.Data.Common.Notifications.OnSuccessful)
|
||||||
{
|
{
|
||||||
string title = _stringResourcesService.NotificationsResources.Get("OnSuccessfulTitle");
|
string title = StringResourcesManager.Notifications.Get("OnSuccessfulTitle");
|
||||||
_notificationsService.SendNotification(title, content);
|
_notificationsService.SendNotification(title, content);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ using VDownload.Models;
|
|||||||
using VDownload.Services.Data.Configuration;
|
using VDownload.Services.Data.Configuration;
|
||||||
using VDownload.Services.Data.Settings;
|
using VDownload.Services.Data.Settings;
|
||||||
using VDownload.Services.UI.Notifications;
|
using VDownload.Services.UI.Notifications;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
using VDownload.Services.Utility.FFmpeg;
|
using VDownload.Services.Utility.FFmpeg;
|
||||||
|
|
||||||
namespace VDownload.Core.Tasks
|
namespace VDownload.Core.Tasks
|
||||||
@@ -26,7 +25,6 @@ namespace VDownload.Core.Tasks
|
|||||||
protected readonly IConfigurationService _configurationService;
|
protected readonly IConfigurationService _configurationService;
|
||||||
protected readonly ISettingsService _settingsService;
|
protected readonly ISettingsService _settingsService;
|
||||||
protected readonly IFFmpegService _ffmpegService;
|
protected readonly IFFmpegService _ffmpegService;
|
||||||
protected readonly IStringResourcesService _stringResourcesService;
|
|
||||||
protected readonly INotificationsService _notificationsService;
|
protected readonly INotificationsService _notificationsService;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -35,12 +33,11 @@ namespace VDownload.Core.Tasks
|
|||||||
|
|
||||||
#region CONSTRUCTORS
|
#region CONSTRUCTORS
|
||||||
|
|
||||||
public DownloadTaskFactoryService(IConfigurationService configurationService, ISettingsService settingsService, IFFmpegService ffmpegService, IStringResourcesService stringResourcesService, INotificationsService notificationsService)
|
public DownloadTaskFactoryService(IConfigurationService configurationService, ISettingsService settingsService, IFFmpegService ffmpegService, INotificationsService notificationsService)
|
||||||
{
|
{
|
||||||
_configurationService = configurationService;
|
_configurationService = configurationService;
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
_ffmpegService = ffmpegService;
|
_ffmpegService = ffmpegService;
|
||||||
_stringResourcesService = stringResourcesService;
|
|
||||||
_notificationsService = notificationsService;
|
_notificationsService = notificationsService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +49,7 @@ namespace VDownload.Core.Tasks
|
|||||||
|
|
||||||
public DownloadTask Create(Video video, VideoDownloadOptions downloadOptions)
|
public DownloadTask Create(Video video, VideoDownloadOptions downloadOptions)
|
||||||
{
|
{
|
||||||
return new DownloadTask(video, downloadOptions, _configurationService, _settingsService, _ffmpegService, _stringResourcesService, _notificationsService);
|
return new DownloadTask(video, downloadOptions, _configurationService, _settingsService, _ffmpegService, _notificationsService);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Configuration\VDownload.Services.Data.Configuration.csproj" />
|
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Configuration\VDownload.Services.Data.Configuration.csproj" />
|
||||||
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Settings\VDownload.Services.Data.Settings.csproj" />
|
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Settings\VDownload.Services.Data.Settings.csproj" />
|
||||||
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.Notifications\VDownload.Services.UI.Notifications.csproj" />
|
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.Notifications\VDownload.Services.UI.Notifications.csproj" />
|
||||||
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.StringResources\VDownload.Services.UI.StringResources.csproj" />
|
|
||||||
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.Utility\VDownload.Services.Utility.FFmpeg\VDownload.Services.Utility.FFmpeg.csproj" />
|
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.Utility\VDownload.Services.Utility.FFmpeg\VDownload.Services.Utility.FFmpeg.csproj" />
|
||||||
|
<ProjectReference Include="..\VDownload.Core.Strings\VDownload.Core.Strings.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ using System.Linq;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using VDownload.Core.Strings;
|
||||||
using VDownload.Core.ViewModels.About.Helpers;
|
using VDownload.Core.ViewModels.About.Helpers;
|
||||||
using VDownload.Services.Data.Configuration;
|
using VDownload.Services.Data.Configuration;
|
||||||
using VDownload.Services.Data.Configuration.Models;
|
using VDownload.Services.Data.Configuration.Models;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
using Windows.System.UserProfile;
|
using Windows.System.UserProfile;
|
||||||
|
|
||||||
namespace VDownload.Core.ViewModels.About
|
namespace VDownload.Core.ViewModels.About
|
||||||
@@ -21,7 +21,6 @@ namespace VDownload.Core.ViewModels.About
|
|||||||
{
|
{
|
||||||
#region SERVICES
|
#region SERVICES
|
||||||
|
|
||||||
protected readonly IStringResourcesService _stringResourcesService;
|
|
||||||
protected readonly IConfigurationService _configurationService;
|
protected readonly IConfigurationService _configurationService;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -51,15 +50,14 @@ namespace VDownload.Core.ViewModels.About
|
|||||||
|
|
||||||
#region CONSTRUCTORS
|
#region CONSTRUCTORS
|
||||||
|
|
||||||
public AboutViewModel(IStringResourcesService stringResourcesService, IConfigurationService configurationService)
|
public AboutViewModel(IConfigurationService configurationService)
|
||||||
{
|
{
|
||||||
_stringResourcesService = stringResourcesService;
|
|
||||||
_configurationService = configurationService;
|
_configurationService = configurationService;
|
||||||
|
|
||||||
string version = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion;
|
string version = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion;
|
||||||
if (version == "0.0.0")
|
if (version == "0.0.0")
|
||||||
{
|
{
|
||||||
version = _stringResourcesService.AboutViewResources.Get("SelfbuiltVersion");
|
version = StringResourcesManager.AboutView.Get("SelfbuiltVersion");
|
||||||
}
|
}
|
||||||
_version = version;
|
_version = version;
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ using System.Net.Http;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using VDownload.Core.Strings;
|
||||||
using VDownload.Services.Data.Configuration;
|
using VDownload.Services.Data.Configuration;
|
||||||
using VDownload.Services.UI.Dialogs;
|
using VDownload.Services.UI.Dialogs;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
using VDownload.Services.UI.WebView;
|
using VDownload.Services.UI.WebView;
|
||||||
using VDownload.Sources.Twitch.Authentication;
|
using VDownload.Sources.Twitch.Authentication;
|
||||||
|
|
||||||
@@ -36,7 +36,6 @@ namespace VDownload.Core.ViewModels.Authentication
|
|||||||
protected readonly IDialogsService _dialogsService;
|
protected readonly IDialogsService _dialogsService;
|
||||||
protected readonly IWebViewService _webViewService;
|
protected readonly IWebViewService _webViewService;
|
||||||
protected readonly IConfigurationService _configurationService;
|
protected readonly IConfigurationService _configurationService;
|
||||||
protected readonly IStringResourcesService _stringResourcesService;
|
|
||||||
protected readonly ITwitchAuthenticationService _twitchAuthenticationService;
|
protected readonly ITwitchAuthenticationService _twitchAuthenticationService;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -60,12 +59,11 @@ namespace VDownload.Core.ViewModels.Authentication
|
|||||||
|
|
||||||
#region CONSTRUCTORS
|
#region CONSTRUCTORS
|
||||||
|
|
||||||
public AuthenticationViewModel(IDialogsService dialogsService, IWebViewService webViewService, IConfigurationService configurationService, IStringResourcesService stringResourcesService, ITwitchAuthenticationService twitchAuthenticationService)
|
public AuthenticationViewModel(IDialogsService dialogsService, IWebViewService webViewService, IConfigurationService configurationService, ITwitchAuthenticationService twitchAuthenticationService)
|
||||||
{
|
{
|
||||||
_dialogsService = dialogsService;
|
_dialogsService = dialogsService;
|
||||||
_webViewService = webViewService;
|
_webViewService = webViewService;
|
||||||
_configurationService = configurationService;
|
_configurationService = configurationService;
|
||||||
_stringResourcesService = stringResourcesService;
|
|
||||||
_twitchAuthenticationService = twitchAuthenticationService;
|
_twitchAuthenticationService = twitchAuthenticationService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,7 +98,7 @@ namespace VDownload.Core.ViewModels.Authentication
|
|||||||
Sources.Twitch.Configuration.Models.Authentication auth = _configurationService.Twitch.Authentication;
|
Sources.Twitch.Configuration.Models.Authentication auth = _configurationService.Twitch.Authentication;
|
||||||
string authUrl = string.Format(auth.Url, auth.ClientId, auth.RedirectUrl, auth.ResponseType, string.Join(' ', auth.Scopes));
|
string authUrl = string.Format(auth.Url, auth.ClientId, auth.RedirectUrl, auth.ResponseType, string.Join(' ', auth.Scopes));
|
||||||
|
|
||||||
string url = await _webViewService.Show(new Uri(authUrl), (url) => url.StartsWith(auth.RedirectUrl), _stringResourcesService.AuthenticationViewResources.Get("TwitchAuthenticationWindowTitle"));
|
string url = await _webViewService.Show(new Uri(authUrl), (url) => url.StartsWith(auth.RedirectUrl), StringResourcesManager.AuthenticationView.Get("TwitchAuthenticationWindowTitle"));
|
||||||
|
|
||||||
Regex regex = new Regex(auth.RedirectUrlRegex);
|
Regex regex = new Regex(auth.RedirectUrlRegex);
|
||||||
Match match = regex.Match(url);
|
Match match = regex.Match(url);
|
||||||
@@ -112,8 +110,8 @@ namespace VDownload.Core.ViewModels.Authentication
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string title = _stringResourcesService.AuthenticationViewResources.Get("TwitchAuthenticationDialogTitle");
|
string title = StringResourcesManager.AuthenticationView.Get("TwitchAuthenticationDialogTitle");
|
||||||
string message = _stringResourcesService.AuthenticationViewResources.Get("TwitchAuthenticationDialogMessage");
|
string message = StringResourcesManager.AuthenticationView.Get("TwitchAuthenticationDialogMessage");
|
||||||
await _dialogsService.ShowOk(title, message);
|
await _dialogsService.ShowOk(title, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,11 +136,11 @@ namespace VDownload.Core.ViewModels.Authentication
|
|||||||
if (!NetworkHelper.Instance.ConnectionInformation.IsInternetAvailable)
|
if (!NetworkHelper.Instance.ConnectionInformation.IsInternetAvailable)
|
||||||
{
|
{
|
||||||
TwitchButtonEnable = false;
|
TwitchButtonEnable = false;
|
||||||
TwitchDescription = _stringResourcesService.AuthenticationViewResources.Get("TwitchAuthenticationDescriptionNotAuthenticatedNoInternetConnection");
|
TwitchDescription = StringResourcesManager.AuthenticationView.Get("TwitchAuthenticationDescriptionNotAuthenticatedNoInternetConnection");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TwitchDescription = _stringResourcesService.AuthenticationViewResources.Get("TwitchAuthenticationDescriptionNotAuthenticated");
|
TwitchDescription = StringResourcesManager.AuthenticationView.Get("TwitchAuthenticationDescriptionNotAuthenticated");
|
||||||
}
|
}
|
||||||
TwitchButtonState = AuthenticationButton.SignIn;
|
TwitchButtonState = AuthenticationButton.SignIn;
|
||||||
}
|
}
|
||||||
@@ -155,7 +153,7 @@ namespace VDownload.Core.ViewModels.Authentication
|
|||||||
}
|
}
|
||||||
catch (Exception ex) when (ex is TaskCanceledException || ex is HttpRequestException)
|
catch (Exception ex) when (ex is TaskCanceledException || ex is HttpRequestException)
|
||||||
{
|
{
|
||||||
TwitchDescription = _stringResourcesService.AuthenticationViewResources.Get("TwitchAuthenticationDescriptionCannotValidate");
|
TwitchDescription = StringResourcesManager.AuthenticationView.Get("TwitchAuthenticationDescriptionCannotValidate");
|
||||||
TwitchButtonState = AuthenticationButton.SignIn;
|
TwitchButtonState = AuthenticationButton.SignIn;
|
||||||
TwitchButtonEnable = false;
|
TwitchButtonEnable = false;
|
||||||
return;
|
return;
|
||||||
@@ -163,13 +161,13 @@ namespace VDownload.Core.ViewModels.Authentication
|
|||||||
|
|
||||||
if (validationResult.Success)
|
if (validationResult.Success)
|
||||||
{
|
{
|
||||||
TwitchDescription = string.Format(_stringResourcesService.AuthenticationViewResources.Get("TwitchAuthenticationDescriptionAuthenticated"), validationResult.TokenData.Login, validationResult.TokenData.ExpirationDate);
|
TwitchDescription = string.Format(StringResourcesManager.AuthenticationView.Get("TwitchAuthenticationDescriptionAuthenticated"), validationResult.TokenData.Login, validationResult.TokenData.ExpirationDate);
|
||||||
TwitchButtonState = AuthenticationButton.SignOut;
|
TwitchButtonState = AuthenticationButton.SignOut;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
await _twitchAuthenticationService.DeleteToken();
|
await _twitchAuthenticationService.DeleteToken();
|
||||||
TwitchDescription = _stringResourcesService.AuthenticationViewResources.Get("TwitchAuthenticationDescriptionAuthenticationInvalid");
|
TwitchDescription = StringResourcesManager.AuthenticationView.Get("TwitchAuthenticationDescriptionAuthenticationInvalid");
|
||||||
TwitchButtonState = AuthenticationButton.SignIn;
|
TwitchButtonState = AuthenticationButton.SignIn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ using VDownload.Core.ViewModels.Authentication;
|
|||||||
using VDownload.Core.ViewModels.Home;
|
using VDownload.Core.ViewModels.Home;
|
||||||
using VDownload.Core.ViewModels.Settings;
|
using VDownload.Core.ViewModels.Settings;
|
||||||
using VDownload.Services.UI.DictionaryResources;
|
using VDownload.Services.UI.DictionaryResources;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
using SimpleToolkit.UI.Models;
|
using SimpleToolkit.UI.Models;
|
||||||
using VDownload.Core.ViewModels.About;
|
using VDownload.Core.ViewModels.About;
|
||||||
using VDownload.Core.ViewModels.Subscriptions;
|
using VDownload.Core.ViewModels.Subscriptions;
|
||||||
|
using VDownload.Core.Strings;
|
||||||
|
|
||||||
namespace VDownload.Core.ViewModels
|
namespace VDownload.Core.ViewModels
|
||||||
{
|
{
|
||||||
@@ -21,7 +21,6 @@ namespace VDownload.Core.ViewModels
|
|||||||
{
|
{
|
||||||
#region SERVICES
|
#region SERVICES
|
||||||
|
|
||||||
protected readonly IStringResourcesService _stringResourcesService;
|
|
||||||
protected readonly IDictionaryResourcesService _dictionaryResourcesService;
|
protected readonly IDictionaryResourcesService _dictionaryResourcesService;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -53,9 +52,8 @@ namespace VDownload.Core.ViewModels
|
|||||||
|
|
||||||
#region CONSTRUCTORS
|
#region CONSTRUCTORS
|
||||||
|
|
||||||
public BaseViewModel(IStringResourcesService stringResourcesService, IDictionaryResourcesService dictionaryResourcesService)
|
public BaseViewModel(IDictionaryResourcesService dictionaryResourcesService)
|
||||||
{
|
{
|
||||||
_stringResourcesService = stringResourcesService;
|
|
||||||
_dictionaryResourcesService = dictionaryResourcesService;
|
_dictionaryResourcesService = dictionaryResourcesService;
|
||||||
|
|
||||||
Items = new ReadOnlyObservableCollection<NavigationViewItem>
|
Items = new ReadOnlyObservableCollection<NavigationViewItem>
|
||||||
@@ -64,13 +62,13 @@ namespace VDownload.Core.ViewModels
|
|||||||
{
|
{
|
||||||
new NavigationViewItem()
|
new NavigationViewItem()
|
||||||
{
|
{
|
||||||
Name = _stringResourcesService.BaseViewResources.Get("HomeNavigationViewItem"),
|
Name = StringResourcesManager.BaseView.Get("HomeNavigationViewItem"),
|
||||||
IconSource = _dictionaryResourcesService.Get<string>("ImageBaseViewHome"),
|
IconSource = _dictionaryResourcesService.Get<string>("ImageBaseViewHome"),
|
||||||
ViewModel = typeof(HomeViewModel),
|
ViewModel = typeof(HomeViewModel),
|
||||||
},
|
},
|
||||||
new NavigationViewItem()
|
new NavigationViewItem()
|
||||||
{
|
{
|
||||||
Name = _stringResourcesService.BaseViewResources.Get("SubscriptionsNavigationViewItem"),
|
Name = StringResourcesManager.BaseView.Get("SubscriptionsNavigationViewItem"),
|
||||||
IconSource = _dictionaryResourcesService.Get<string>("ImageBaseViewSubscriptions"),
|
IconSource = _dictionaryResourcesService.Get<string>("ImageBaseViewSubscriptions"),
|
||||||
ViewModel = typeof(SubscriptionsViewModel),
|
ViewModel = typeof(SubscriptionsViewModel),
|
||||||
},
|
},
|
||||||
@@ -82,13 +80,13 @@ namespace VDownload.Core.ViewModels
|
|||||||
{
|
{
|
||||||
new NavigationViewItem()
|
new NavigationViewItem()
|
||||||
{
|
{
|
||||||
Name = _stringResourcesService.BaseViewResources.Get("AboutNavigationViewItem"),
|
Name = StringResourcesManager.BaseView.Get("AboutNavigationViewItem"),
|
||||||
IconSource = _dictionaryResourcesService.Get<string>("ImageBaseViewAbout"),
|
IconSource = _dictionaryResourcesService.Get<string>("ImageBaseViewAbout"),
|
||||||
ViewModel = typeof(AboutViewModel),
|
ViewModel = typeof(AboutViewModel),
|
||||||
},
|
},
|
||||||
new NavigationViewItem()
|
new NavigationViewItem()
|
||||||
{
|
{
|
||||||
Name = _stringResourcesService.BaseViewResources.Get("AuthenticationNavigationViewItem"),
|
Name = StringResourcesManager.BaseView.Get("AuthenticationNavigationViewItem"),
|
||||||
IconSource = _dictionaryResourcesService.Get<string>("ImageBaseViewAuthentication"),
|
IconSource = _dictionaryResourcesService.Get<string>("ImageBaseViewAuthentication"),
|
||||||
ViewModel = typeof(AuthenticationViewModel),
|
ViewModel = typeof(AuthenticationViewModel),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ using System.Collections.ObjectModel;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using VDownload.Core.Strings;
|
||||||
using VDownload.Core.Tasks;
|
using VDownload.Core.Tasks;
|
||||||
using VDownload.Services.Data.Settings;
|
using VDownload.Services.Data.Settings;
|
||||||
using VDownload.Services.UI.Dialogs;
|
using VDownload.Services.UI.Dialogs;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
|
|
||||||
namespace VDownload.Core.ViewModels.Home
|
namespace VDownload.Core.ViewModels.Home
|
||||||
{
|
{
|
||||||
@@ -21,7 +21,6 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
protected readonly IDownloadTaskManager _tasksManager;
|
protected readonly IDownloadTaskManager _tasksManager;
|
||||||
|
|
||||||
protected readonly IDialogsService _dialogsService;
|
protected readonly IDialogsService _dialogsService;
|
||||||
protected readonly IStringResourcesService _stringResourcesService;
|
|
||||||
protected readonly ISettingsService _settingsService;
|
protected readonly ISettingsService _settingsService;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -41,13 +40,12 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
|
|
||||||
#region CONSTRUCTORS
|
#region CONSTRUCTORS
|
||||||
|
|
||||||
public HomeDownloadsViewModel(IDownloadTaskManager tasksManager, IDialogsService dialogsService, IStringResourcesService stringResourcesService, ISettingsService settingsService)
|
public HomeDownloadsViewModel(IDownloadTaskManager tasksManager, IDialogsService dialogsService, ISettingsService settingsService)
|
||||||
{
|
{
|
||||||
_tasksManager = tasksManager;
|
_tasksManager = tasksManager;
|
||||||
_tasksManager.TaskCollectionChanged += Tasks_CollectionChanged;
|
_tasksManager.TaskCollectionChanged += Tasks_CollectionChanged;
|
||||||
|
|
||||||
_dialogsService = dialogsService;
|
_dialogsService = dialogsService;
|
||||||
_stringResourcesService = stringResourcesService;
|
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
|
|
||||||
_taskListIsEmpty = _tasksManager.Tasks.Count == 0;
|
_taskListIsEmpty = _tasksManager.Tasks.Count == 0;
|
||||||
@@ -73,8 +71,8 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
{
|
{
|
||||||
if (!NetworkHelper.Instance.ConnectionInformation.IsInternetAvailable)
|
if (!NetworkHelper.Instance.ConnectionInformation.IsInternetAvailable)
|
||||||
{
|
{
|
||||||
string title = _stringResourcesService.HomeDownloadsViewResources.Get("DialogErrorTitle");
|
string title = StringResourcesManager.HomeDownloadsView.Get("DialogErrorTitle");
|
||||||
string message = _stringResourcesService.HomeDownloadsViewResources.Get("DialogErrorMessageNoInternetConnection");
|
string message = StringResourcesManager.HomeDownloadsView.Get("DialogErrorMessageNoInternetConnection");
|
||||||
await _dialogsService.ShowOk(title, message);
|
await _dialogsService.ShowOk(title, message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -87,8 +85,8 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
NetworkHelper.Instance.ConnectionInformation.IsInternetOnMeteredConnection
|
NetworkHelper.Instance.ConnectionInformation.IsInternetOnMeteredConnection
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
string title = _stringResourcesService.CommonResources.Get("StartAtMeteredConnectionDialogTitle");
|
string title = StringResourcesManager.Common.Get("StartAtMeteredConnectionDialogTitle");
|
||||||
string message = _stringResourcesService.CommonResources.Get("StartAtMeteredConnectionDialogMessage");
|
string message = StringResourcesManager.Common.Get("StartAtMeteredConnectionDialogMessage");
|
||||||
DialogResultYesNo result = await _dialogsService.ShowYesNo(title, message);
|
DialogResultYesNo result = await _dialogsService.ShowYesNo(title, message);
|
||||||
continueEnqueue = result == DialogResultYesNo.Yes;
|
continueEnqueue = result == DialogResultYesNo.Yes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ using SimpleToolkit.MVVM;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using VDownload.Services.Utility.Filename;
|
using VDownload.Services.Utility.Filename;
|
||||||
using VDownload.Services.UI.Dialogs;
|
using VDownload.Services.UI.Dialogs;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
using CommunityToolkit.WinUI.Helpers;
|
using CommunityToolkit.WinUI.Helpers;
|
||||||
using VDownload.Services.Data.Application;
|
using VDownload.Services.Data.Application;
|
||||||
|
using VDownload.Core.Strings;
|
||||||
|
|
||||||
namespace VDownload.Core.ViewModels.Home
|
namespace VDownload.Core.ViewModels.Home
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,6 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
protected readonly IStoragePickerService _storagePickerService;
|
protected readonly IStoragePickerService _storagePickerService;
|
||||||
protected readonly IFilenameService _filenameService;
|
protected readonly IFilenameService _filenameService;
|
||||||
protected readonly IDialogsService _dialogsService;
|
protected readonly IDialogsService _dialogsService;
|
||||||
protected readonly IStringResourcesService _stringResourcesService;
|
|
||||||
protected readonly IApplicationDataService _applicationDataService;
|
protected readonly IApplicationDataService _applicationDataService;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -181,14 +180,13 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
|
|
||||||
#region CONSTRUCTORS
|
#region CONSTRUCTORS
|
||||||
|
|
||||||
public HomeVideoCollectionViewModel(IDownloadTaskManager tasksManager, ISettingsService settingsService, IStoragePickerService storagePickerService, IFilenameService filenameService, IDialogsService dialogsService, IStringResourcesService stringResourcesService, IApplicationDataService applicationDataService)
|
public HomeVideoCollectionViewModel(IDownloadTaskManager tasksManager, ISettingsService settingsService, IStoragePickerService storagePickerService, IFilenameService filenameService, IDialogsService dialogsService, IApplicationDataService applicationDataService)
|
||||||
{
|
{
|
||||||
_tasksManager = tasksManager;
|
_tasksManager = tasksManager;
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
_storagePickerService = storagePickerService;
|
_storagePickerService = storagePickerService;
|
||||||
_filenameService = filenameService;
|
_filenameService = filenameService;
|
||||||
_dialogsService = dialogsService;
|
_dialogsService = dialogsService;
|
||||||
_stringResourcesService = stringResourcesService;
|
|
||||||
_applicationDataService = applicationDataService;
|
_applicationDataService = applicationDataService;
|
||||||
|
|
||||||
_removedVideos = new List<VideoViewModel>();
|
_removedVideos = new List<VideoViewModel>();
|
||||||
@@ -306,8 +304,8 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
NetworkHelper.Instance.ConnectionInformation.IsInternetOnMeteredConnection
|
NetworkHelper.Instance.ConnectionInformation.IsInternetOnMeteredConnection
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
string title = _stringResourcesService.CommonResources.Get("StartAtMeteredConnectionDialogTitle");
|
string title = StringResourcesManager.Common.Get("StartAtMeteredConnectionDialogTitle");
|
||||||
string message = _stringResourcesService.CommonResources.Get("StartAtMeteredConnectionDialogMessage");
|
string message = StringResourcesManager.Common.Get("StartAtMeteredConnectionDialogMessage");
|
||||||
DialogResultYesNo result = await _dialogsService.ShowYesNo(title, message);
|
DialogResultYesNo result = await _dialogsService.ShowYesNo(title, message);
|
||||||
download = result == DialogResultYesNo.Yes;
|
download = result == DialogResultYesNo.Yes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using VDownload.Core.Strings;
|
||||||
using VDownload.Core.Tasks;
|
using VDownload.Core.Tasks;
|
||||||
using VDownload.Models;
|
using VDownload.Models;
|
||||||
using VDownload.Services.Data.Application;
|
using VDownload.Services.Data.Application;
|
||||||
using VDownload.Services.Data.Settings;
|
using VDownload.Services.Data.Settings;
|
||||||
using VDownload.Services.UI.Dialogs;
|
using VDownload.Services.UI.Dialogs;
|
||||||
using VDownload.Services.UI.StoragePicker;
|
using VDownload.Services.UI.StoragePicker;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
using VDownload.Services.Utility.Filename;
|
using VDownload.Services.Utility.Filename;
|
||||||
|
|
||||||
namespace VDownload.Core.ViewModels.Home
|
namespace VDownload.Core.ViewModels.Home
|
||||||
@@ -29,7 +29,6 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
protected readonly IStoragePickerService _storagePickerService;
|
protected readonly IStoragePickerService _storagePickerService;
|
||||||
protected readonly IFilenameService _filenameService;
|
protected readonly IFilenameService _filenameService;
|
||||||
protected readonly IDialogsService _dialogsService;
|
protected readonly IDialogsService _dialogsService;
|
||||||
protected readonly IStringResourcesService _stringResourcesService;
|
|
||||||
protected readonly IApplicationDataService _applicationDataService;
|
protected readonly IApplicationDataService _applicationDataService;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -98,14 +97,13 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
|
|
||||||
#region CONSTRUCTORS
|
#region CONSTRUCTORS
|
||||||
|
|
||||||
public HomeVideoViewModel(IDownloadTaskManager tasksManager, ISettingsService settingsService, IStoragePickerService storagePickerService, IFilenameService filenameService, IDialogsService dialogsService, IStringResourcesService stringResourcesService, IApplicationDataService applicationDataService)
|
public HomeVideoViewModel(IDownloadTaskManager tasksManager, ISettingsService settingsService, IStoragePickerService storagePickerService, IFilenameService filenameService, IDialogsService dialogsService, IApplicationDataService applicationDataService)
|
||||||
{
|
{
|
||||||
_tasksManager = tasksManager;
|
_tasksManager = tasksManager;
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
_storagePickerService = storagePickerService;
|
_storagePickerService = storagePickerService;
|
||||||
_filenameService = filenameService;
|
_filenameService = filenameService;
|
||||||
_dialogsService = dialogsService;
|
_dialogsService = dialogsService;
|
||||||
_stringResourcesService = stringResourcesService;
|
|
||||||
_applicationDataService = applicationDataService;
|
_applicationDataService = applicationDataService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,8 +182,8 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
NetworkHelper.Instance.ConnectionInformation.IsInternetOnMeteredConnection
|
NetworkHelper.Instance.ConnectionInformation.IsInternetOnMeteredConnection
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
string title = _stringResourcesService.CommonResources.Get("StartAtMeteredConnectionDialogTitle");
|
string title = StringResourcesManager.Common.Get("StartAtMeteredConnectionDialogTitle");
|
||||||
string message = _stringResourcesService.CommonResources.Get("StartAtMeteredConnectionDialogMessage");
|
string message = StringResourcesManager.Common.Get("StartAtMeteredConnectionDialogMessage");
|
||||||
DialogResultYesNo result = await _dialogsService.ShowYesNo(title, message);
|
DialogResultYesNo result = await _dialogsService.ShowYesNo(title, message);
|
||||||
download = result == DialogResultYesNo.Yes;
|
download = result == DialogResultYesNo.Yes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ using System.Linq;
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using VDownload.Core.Strings;
|
||||||
using VDownload.Core.Tasks;
|
using VDownload.Core.Tasks;
|
||||||
using VDownload.Models;
|
using VDownload.Models;
|
||||||
using VDownload.Services.Data.Configuration;
|
using VDownload.Services.Data.Configuration;
|
||||||
using VDownload.Services.Data.Settings;
|
using VDownload.Services.Data.Settings;
|
||||||
using VDownload.Services.Data.Subscriptions;
|
using VDownload.Services.Data.Subscriptions;
|
||||||
using VDownload.Services.UI.Dialogs;
|
using VDownload.Services.UI.Dialogs;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
using VDownload.Sources;
|
using VDownload.Sources;
|
||||||
using VDownload.Sources.Common;
|
using VDownload.Sources.Common;
|
||||||
using VDownload.Sources.Twitch.Configuration.Models;
|
using VDownload.Sources.Twitch.Configuration.Models;
|
||||||
@@ -45,7 +45,6 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
|
|
||||||
protected readonly IConfigurationService _configurationService;
|
protected readonly IConfigurationService _configurationService;
|
||||||
protected readonly ISettingsService _settingsService;
|
protected readonly ISettingsService _settingsService;
|
||||||
protected readonly IStringResourcesService _stringResourcesService;
|
|
||||||
protected readonly ISearchService _searchService;
|
protected readonly ISearchService _searchService;
|
||||||
protected readonly ISubscriptionsDataService _subscriptionsDataService;
|
protected readonly ISubscriptionsDataService _subscriptionsDataService;
|
||||||
protected readonly IDialogsService _dialogsService;
|
protected readonly IDialogsService _dialogsService;
|
||||||
@@ -116,11 +115,10 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
|
|
||||||
#region CONSTRUCTORS
|
#region CONSTRUCTORS
|
||||||
|
|
||||||
public HomeViewModel(IConfigurationService configurationService, ISettingsService settingsService, IStringResourcesService stringResourcesService, ISearchService searchService, ISubscriptionsDataService subscriptionsDataService, IDialogsService dialogsService, IDownloadTaskManager downloadTaskManager, HomeVideoViewModel videoViewModel, HomeVideoCollectionViewModel videoCollectionViewModel)
|
public HomeViewModel(IConfigurationService configurationService, ISettingsService settingsService, ISearchService searchService, ISubscriptionsDataService subscriptionsDataService, IDialogsService dialogsService, IDownloadTaskManager downloadTaskManager, HomeVideoViewModel videoViewModel, HomeVideoCollectionViewModel videoCollectionViewModel)
|
||||||
{
|
{
|
||||||
_configurationService = configurationService;
|
_configurationService = configurationService;
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
_stringResourcesService = stringResourcesService;
|
|
||||||
_searchService = searchService;
|
_searchService = searchService;
|
||||||
_subscriptionsDataService = subscriptionsDataService;
|
_subscriptionsDataService = subscriptionsDataService;
|
||||||
_dialogsService = dialogsService;
|
_dialogsService = dialogsService;
|
||||||
@@ -181,7 +179,7 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
|
|
||||||
StartSearch();
|
StartSearch();
|
||||||
|
|
||||||
SubscriptionsVideoList subList = new SubscriptionsVideoList { Name = _stringResourcesService.CommonResources.Get("SubscriptionVideoListName") };
|
SubscriptionsVideoList subList = new SubscriptionsVideoList { Name = StringResourcesManager.Common.Get("SubscriptionVideoListName") };
|
||||||
List<Task> tasks = new List<Task>();
|
List<Task> tasks = new List<Task>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -218,14 +216,14 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
|
|
||||||
if (subList.Count > 0)
|
if (subList.Count > 0)
|
||||||
{
|
{
|
||||||
OptionBarMessage = $"{_stringResourcesService.HomeViewResources.Get("OptionBarMessageVideosFound")} {subList.Count}";
|
OptionBarMessage = $"{StringResourcesManager.HomeView.Get("OptionBarMessageVideosFound")} {subList.Count}";
|
||||||
|
|
||||||
_videoCollectionViewModel.LoadCollection(subList);
|
_videoCollectionViewModel.LoadCollection(subList);
|
||||||
MainContent = _videoCollectionView;
|
MainContent = _videoCollectionView;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OptionBarMessage = _stringResourcesService.HomeViewResources.Get("OptionBarMessageVideosNotFound");
|
OptionBarMessage = StringResourcesManager.HomeView.Get("OptionBarMessageVideosNotFound");
|
||||||
}
|
}
|
||||||
|
|
||||||
OptionBarSearchNotPending = true;
|
OptionBarSearchNotPending = true;
|
||||||
@@ -285,7 +283,7 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
}
|
}
|
||||||
catch (MediaSearchException ex)
|
catch (MediaSearchException ex)
|
||||||
{
|
{
|
||||||
ShowError(_stringResourcesService.SearchResources.Get(ex.StringCode));
|
ShowError(StringResourcesManager.Search.Get(ex.StringCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catch (Exception ex) when (ex is TaskCanceledException || ex is HttpRequestException)
|
catch (Exception ex) when (ex is TaskCanceledException || ex is HttpRequestException)
|
||||||
@@ -321,7 +319,7 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
}
|
}
|
||||||
catch (MediaSearchException ex)
|
catch (MediaSearchException ex)
|
||||||
{
|
{
|
||||||
ShowError(_stringResourcesService.SearchResources.Get(ex.StringCode));
|
ShowError(StringResourcesManager.Search.Get(ex.StringCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catch (Exception ex) when (ex is TaskCanceledException || ex is HttpRequestException)
|
catch (Exception ex) when (ex is TaskCanceledException || ex is HttpRequestException)
|
||||||
@@ -357,8 +355,8 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
NetworkHelper.Instance.ConnectionInformation.IsInternetOnMeteredConnection
|
NetworkHelper.Instance.ConnectionInformation.IsInternetOnMeteredConnection
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
string title = _stringResourcesService.CommonResources.Get("StartAtMeteredConnectionDialogTitle");
|
string title = StringResourcesManager.Common.Get("StartAtMeteredConnectionDialogTitle");
|
||||||
string message = _stringResourcesService.CommonResources.Get("StartAtMeteredConnectionDialogMessage");
|
string message = StringResourcesManager.Common.Get("StartAtMeteredConnectionDialogMessage");
|
||||||
DialogResultYesNo result = await _dialogsService.ShowYesNo(title, message);
|
DialogResultYesNo result = await _dialogsService.ShowYesNo(title, message);
|
||||||
if (result == DialogResultYesNo.No)
|
if (result == DialogResultYesNo.No)
|
||||||
{
|
{
|
||||||
@@ -417,14 +415,14 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
{
|
{
|
||||||
OptionBarSearchNotPending = false;
|
OptionBarSearchNotPending = false;
|
||||||
OptionBarLoading = true;
|
OptionBarLoading = true;
|
||||||
OptionBarMessage = _stringResourcesService.HomeViewResources.Get("OptionBarMessageLoading");
|
OptionBarMessage = StringResourcesManager.HomeView.Get("OptionBarMessageLoading");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async void BackToDownload_EventHandler(object sender, EventArgs e) => await Navigation();
|
protected async void BackToDownload_EventHandler(object sender, EventArgs e) => await Navigation();
|
||||||
|
|
||||||
protected string ErrorNoInternetConnection() => _stringResourcesService.HomeViewResources.Get("ErrorInfoBarNoInternetConnection");
|
protected string ErrorNoInternetConnection() => StringResourcesManager.HomeView.Get("ErrorInfoBarNoInternetConnection");
|
||||||
|
|
||||||
protected string ErrorSearchTimeout() => _stringResourcesService.SearchResources.Get("SearchTimeout");
|
protected string ErrorSearchTimeout() => StringResourcesManager.Search.Get("SearchTimeout");
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ using System.Linq;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using VDownload.Core.Strings;
|
||||||
using VDownload.Models;
|
using VDownload.Models;
|
||||||
using VDownload.Services.Data.Configuration;
|
using VDownload.Services.Data.Configuration;
|
||||||
using VDownload.Services.Data.Settings;
|
using VDownload.Services.Data.Settings;
|
||||||
using VDownload.Services.UI.StoragePicker;
|
using VDownload.Services.UI.StoragePicker;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
|
|
||||||
namespace VDownload.Core.ViewModels.Settings
|
namespace VDownload.Core.ViewModels.Settings
|
||||||
{
|
{
|
||||||
@@ -20,7 +20,6 @@ namespace VDownload.Core.ViewModels.Settings
|
|||||||
|
|
||||||
protected readonly ISettingsService _settingsService;
|
protected readonly ISettingsService _settingsService;
|
||||||
protected readonly IConfigurationService _configurationService;
|
protected readonly IConfigurationService _configurationService;
|
||||||
protected readonly IStringResourcesService _stringResourcesService;
|
|
||||||
protected readonly IStoragePickerService _storagePickerService;
|
protected readonly IStoragePickerService _storagePickerService;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -176,16 +175,15 @@ namespace VDownload.Core.ViewModels.Settings
|
|||||||
|
|
||||||
#region CONSTRUCTORS
|
#region CONSTRUCTORS
|
||||||
|
|
||||||
public SettingsViewModel(ISettingsService settingsService, IConfigurationService configurationService, IStringResourcesService stringResourcesService, IStoragePickerService storagePickerService)
|
public SettingsViewModel(ISettingsService settingsService, IConfigurationService configurationService, IStoragePickerService storagePickerService)
|
||||||
{
|
{
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
_configurationService = configurationService;
|
_configurationService = configurationService;
|
||||||
_stringResourcesService = stringResourcesService;
|
|
||||||
_storagePickerService = storagePickerService;
|
_storagePickerService = storagePickerService;
|
||||||
|
|
||||||
base.PropertyChanged += PropertyChangedEventHandler;
|
base.PropertyChanged += PropertyChangedEventHandler;
|
||||||
|
|
||||||
_tasksFilenameTemplateTooltip = string.Join('\n', _configurationService.Common.FilenameTemplates.Select(x => _stringResourcesService.FilenameTemplateResources.Get(x.Name)));
|
_tasksFilenameTemplateTooltip = string.Join('\n', _configurationService.Common.FilenameTemplates.Select(x => StringResourcesManager.FilenameTemplate.Get(x.Name)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ using System.Linq;
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using VDownload.Core.Strings;
|
||||||
using VDownload.Core.ViewModels.Subscriptions.Helpers;
|
using VDownload.Core.ViewModels.Subscriptions.Helpers;
|
||||||
using VDownload.Models;
|
using VDownload.Models;
|
||||||
using VDownload.Services.Data.Subscriptions;
|
using VDownload.Services.Data.Subscriptions;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
using VDownload.Sources;
|
using VDownload.Sources;
|
||||||
using VDownload.Sources.Common;
|
using VDownload.Sources.Common;
|
||||||
|
|
||||||
@@ -23,7 +23,6 @@ namespace VDownload.Core.ViewModels.Subscriptions
|
|||||||
#region SERVICES
|
#region SERVICES
|
||||||
|
|
||||||
protected readonly ISearchService _searchService;
|
protected readonly ISearchService _searchService;
|
||||||
protected readonly IStringResourcesService _stringResourcesService;
|
|
||||||
protected readonly ISubscriptionsDataService _subscriptionsDataService;
|
protected readonly ISubscriptionsDataService _subscriptionsDataService;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -53,10 +52,9 @@ namespace VDownload.Core.ViewModels.Subscriptions
|
|||||||
|
|
||||||
#region CONSTRUCTORS
|
#region CONSTRUCTORS
|
||||||
|
|
||||||
public SubscriptionsViewModel(ISearchService searchService, IStringResourcesService stringResourcesService, ISubscriptionsDataService subscriptionsDataService)
|
public SubscriptionsViewModel(ISearchService searchService, ISubscriptionsDataService subscriptionsDataService)
|
||||||
{
|
{
|
||||||
_searchService = searchService;
|
_searchService = searchService;
|
||||||
_stringResourcesService = stringResourcesService;
|
|
||||||
_subscriptionsDataService = subscriptionsDataService;
|
_subscriptionsDataService = subscriptionsDataService;
|
||||||
|
|
||||||
_playlists = new ObservableCollection<PlaylistViewModel>();
|
_playlists = new ObservableCollection<PlaylistViewModel>();
|
||||||
@@ -96,7 +94,7 @@ namespace VDownload.Core.ViewModels.Subscriptions
|
|||||||
{
|
{
|
||||||
if (!NetworkHelper.Instance.ConnectionInformation.IsInternetAvailable)
|
if (!NetworkHelper.Instance.ConnectionInformation.IsInternetAvailable)
|
||||||
{
|
{
|
||||||
ShowError(_stringResourcesService.SubscriptionsViewResources.Get("NoInternetConnectionError"));
|
ShowError(StringResourcesManager.SubscriptionsView.Get("NoInternetConnectionError"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,18 +107,18 @@ namespace VDownload.Core.ViewModels.Subscriptions
|
|||||||
}
|
}
|
||||||
catch (MediaSearchException ex)
|
catch (MediaSearchException ex)
|
||||||
{
|
{
|
||||||
ShowError(_stringResourcesService.SearchResources.Get(ex.StringCode));
|
ShowError(StringResourcesManager.Search.Get(ex.StringCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catch (Exception ex) when (ex is TaskCanceledException || ex is HttpRequestException)
|
catch (Exception ex) when (ex is TaskCanceledException || ex is HttpRequestException)
|
||||||
{
|
{
|
||||||
ShowError(_stringResourcesService.SearchResources.Get("SearchTimeout"));
|
ShowError(StringResourcesManager.Search.Get("SearchTimeout"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_subscriptionsDataService.Data.Any(x => x.Source == playlist.Source && x.Name == playlist.Name))
|
if (_subscriptionsDataService.Data.Any(x => x.Source == playlist.Source && x.Name == playlist.Name))
|
||||||
{
|
{
|
||||||
ShowError(_stringResourcesService.SubscriptionsViewResources.Get("DuplicateError"));
|
ShowError(StringResourcesManager.SubscriptionsView.Get("DuplicateError"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.Dialogs\VDownload.Services.UI.Dialogs.csproj" />
|
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.Dialogs\VDownload.Services.UI.Dialogs.csproj" />
|
||||||
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.DictionaryResources\VDownload.Services.UI.DictionaryResources.csproj" />
|
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.DictionaryResources\VDownload.Services.UI.DictionaryResources.csproj" />
|
||||||
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.StoragePicker\VDownload.Services.UI.StoragePicker.csproj" />
|
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.StoragePicker\VDownload.Services.UI.StoragePicker.csproj" />
|
||||||
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.StringResources\VDownload.Services.UI.StringResources.csproj" />
|
|
||||||
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.WebView\VDownload.Services.UI.WebView.csproj" />
|
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.WebView\VDownload.Services.UI.WebView.csproj" />
|
||||||
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.Utility\VDownload.Services.Utility.Filename\VDownload.Services.Utility.Filename.csproj" />
|
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.Utility\VDownload.Services.Utility.Filename\VDownload.Services.Utility.Filename.csproj" />
|
||||||
<ProjectReference Include="..\..\VDownload.Sources\VDownload.Sources.Twitch\VDownload.Sources.Twitch.Authentication\VDownload.Sources.Twitch.Authentication.csproj" />
|
<ProjectReference Include="..\..\VDownload.Sources\VDownload.Sources.Twitch\VDownload.Sources.Twitch.Authentication\VDownload.Sources.Twitch.Authentication.csproj" />
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ using System.Linq;
|
|||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using VDownload.Core.Strings;
|
||||||
using VDownload.Services.Common;
|
using VDownload.Services.Common;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
|
|
||||||
namespace VDownload.Services.UI.Dialogs
|
namespace VDownload.Services.UI.Dialogs
|
||||||
{
|
{
|
||||||
@@ -27,21 +27,13 @@ namespace VDownload.Services.UI.Dialogs
|
|||||||
|
|
||||||
public class DialogsService : IDialogsService
|
public class DialogsService : IDialogsService
|
||||||
{
|
{
|
||||||
#region SERVICES
|
|
||||||
|
|
||||||
protected readonly IStringResourcesService _stringResourcesService;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region FIELDS
|
#region FIELDS
|
||||||
|
|
||||||
protected string _okString;
|
protected string _okString = StringResourcesManager.DialogButtons.Get("OK");
|
||||||
protected string _closeString;
|
protected string _closeString = StringResourcesManager.DialogButtons.Get("Close");
|
||||||
protected string _cancelString;
|
protected string _cancelString = StringResourcesManager.DialogButtons.Get("Cancel");
|
||||||
protected string _yesString;
|
protected string _yesString = StringResourcesManager.DialogButtons.Get("Yes");
|
||||||
protected string _noString;
|
protected string _noString = StringResourcesManager.DialogButtons.Get("No");
|
||||||
|
|
||||||
protected XamlRoot _root;
|
protected XamlRoot _root;
|
||||||
|
|
||||||
@@ -49,22 +41,6 @@ namespace VDownload.Services.UI.Dialogs
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region CONSTRUCTORS
|
|
||||||
|
|
||||||
public DialogsService(IStringResourcesService stringResourcesService)
|
|
||||||
{
|
|
||||||
_stringResourcesService = stringResourcesService;
|
|
||||||
_okString = _stringResourcesService.DialogButtonsResources.Get("OK");
|
|
||||||
_closeString = _stringResourcesService.DialogButtonsResources.Get("Close");
|
|
||||||
_cancelString = _stringResourcesService.DialogButtonsResources.Get("Cancel");
|
|
||||||
_yesString = _stringResourcesService.DialogButtonsResources.Get("Yes");
|
|
||||||
_noString = _stringResourcesService.DialogButtonsResources.Get("No");
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region PUBLIC METHODS
|
#region PUBLIC METHODS
|
||||||
|
|
||||||
public async Task Initialize(XamlRoot arg) => await Task.Run(() => _root = arg);
|
public async Task Initialize(XamlRoot arg) => await Task.Run(() => _root = arg);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\VDownload.Core\VDownload.Core.Strings\VDownload.Core.Strings.csproj" />
|
||||||
<ProjectReference Include="..\..\VDownload.Services.Common\VDownload.Services.Common.csproj" />
|
<ProjectReference Include="..\..\VDownload.Services.Common\VDownload.Services.Common.csproj" />
|
||||||
<ProjectReference Include="..\VDownload.Services.UI.StringResources\VDownload.Services.UI.StringResources.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VDownload.Core", "VDownload
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Models", "VDownload.Models\VDownload.Models.csproj", "{16B56EA9-C218-4A8E-B3DE-29F200EF2EE2}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Models", "VDownload.Models\VDownload.Models.csproj", "{16B56EA9-C218-4A8E-B3DE-29F200EF2EE2}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Services.UI.StringResources", "VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.StringResources\VDownload.Services.UI.StringResources.csproj", "{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Services.UI.DictionaryResources", "VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.DictionaryResources\VDownload.Services.UI.DictionaryResources.csproj", "{8DC55331-B9F3-4811-8474-348662963260}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Services.UI.DictionaryResources", "VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.DictionaryResources\VDownload.Services.UI.DictionaryResources.csproj", "{8DC55331-B9F3-4811-8474-348662963260}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Sources.Twitch.Settings", "VDownload.Sources\VDownload.Sources.Twitch\VDownload.Sources.Twitch.Settings\VDownload.Sources.Twitch.Settings.csproj", "{A726FD43-B111-423B-BAF6-D65B4C0E37B5}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Sources.Twitch.Settings", "VDownload.Sources\VDownload.Sources.Twitch\VDownload.Sources.Twitch.Settings\VDownload.Sources.Twitch.Settings.csproj", "{A726FD43-B111-423B-BAF6-D65B4C0E37B5}"
|
||||||
@@ -75,7 +73,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Services.Data.App
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Services.Data.Subscriptions", "VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Subscriptions\VDownload.Services.Data.Subscriptions.csproj", "{3193DABC-87F8-4256-9449-3CF42FEF7098}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Services.Data.Subscriptions", "VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Subscriptions\VDownload.Services.Data.Subscriptions.csproj", "{3193DABC-87F8-4256-9449-3CF42FEF7098}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VDownload.Services.Common", "VDownload.Services\VDownload.Services.Common\VDownload.Services.Common.csproj", "{267F5A31-1257-4820-9FE5-C11D26CC3C55}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Services.Common", "VDownload.Services\VDownload.Services.Common\VDownload.Services.Common.csproj", "{267F5A31-1257-4820-9FE5-C11D26CC3C55}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@@ -383,22 +381,6 @@ Global
|
|||||||
{16B56EA9-C218-4A8E-B3DE-29F200EF2EE2}.Release|x64.Build.0 = Release|Any CPU
|
{16B56EA9-C218-4A8E-B3DE-29F200EF2EE2}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{16B56EA9-C218-4A8E-B3DE-29F200EF2EE2}.Release|x86.ActiveCfg = Release|Any CPU
|
{16B56EA9-C218-4A8E-B3DE-29F200EF2EE2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{16B56EA9-C218-4A8E-B3DE-29F200EF2EE2}.Release|x86.Build.0 = Release|Any CPU
|
{16B56EA9-C218-4A8E-B3DE-29F200EF2EE2}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Debug|ARM64.Build.0 = Debug|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Release|ARM64.ActiveCfg = Release|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Release|ARM64.Build.0 = Release|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{8DC55331-B9F3-4811-8474-348662963260}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{8DC55331-B9F3-4811-8474-348662963260}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{8DC55331-B9F3-4811-8474-348662963260}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{8DC55331-B9F3-4811-8474-348662963260}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{8DC55331-B9F3-4811-8474-348662963260}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
{8DC55331-B9F3-4811-8474-348662963260}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||||
@@ -600,7 +582,6 @@ Global
|
|||||||
{711FA7BE-27DA-425D-9777-967F6E519CFF} = {8D94F264-4EE9-4C24-AB77-2CCA36858309}
|
{711FA7BE-27DA-425D-9777-967F6E519CFF} = {8D94F264-4EE9-4C24-AB77-2CCA36858309}
|
||||||
{8E850249-E79D-40E7-B02D-393632DF8B8E} = {9A8EB967-1EAB-439E-8FDB-B9ACAC6499EC}
|
{8E850249-E79D-40E7-B02D-393632DF8B8E} = {9A8EB967-1EAB-439E-8FDB-B9ACAC6499EC}
|
||||||
{64A217AE-4E95-468E-85C3-67C27D689FF4} = {9A8EB967-1EAB-439E-8FDB-B9ACAC6499EC}
|
{64A217AE-4E95-468E-85C3-67C27D689FF4} = {9A8EB967-1EAB-439E-8FDB-B9ACAC6499EC}
|
||||||
{6F6CA153-1AC6-454A-ACDC-2C706E2A437E} = {4CC2DC7D-27D2-4F52-89DF-7D45B41BB40F}
|
|
||||||
{8DC55331-B9F3-4811-8474-348662963260} = {4CC2DC7D-27D2-4F52-89DF-7D45B41BB40F}
|
{8DC55331-B9F3-4811-8474-348662963260} = {4CC2DC7D-27D2-4F52-89DF-7D45B41BB40F}
|
||||||
{A726FD43-B111-423B-BAF6-D65B4C0E37B5} = {8D94F264-4EE9-4C24-AB77-2CCA36858309}
|
{A726FD43-B111-423B-BAF6-D65B4C0E37B5} = {8D94F264-4EE9-4C24-AB77-2CCA36858309}
|
||||||
{E1D4352C-51AC-4572-8515-0B4E89A2442F} = {8539067C-9968-4AEB-928C-FEDC43989A79}
|
{E1D4352C-51AC-4572-8515-0B4E89A2442F} = {8539067C-9968-4AEB-928C-FEDC43989A79}
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ using VDownload.Services.UI.Dialogs;
|
|||||||
using VDownload.Services.UI.DictionaryResources;
|
using VDownload.Services.UI.DictionaryResources;
|
||||||
using VDownload.Services.UI.Notifications;
|
using VDownload.Services.UI.Notifications;
|
||||||
using VDownload.Services.UI.StoragePicker;
|
using VDownload.Services.UI.StoragePicker;
|
||||||
using VDownload.Services.UI.StringResources;
|
|
||||||
using VDownload.Services.UI.WebView;
|
using VDownload.Services.UI.WebView;
|
||||||
using VDownload.Services.Utility.Encryption;
|
using VDownload.Services.Utility.Encryption;
|
||||||
using VDownload.Services.Utility.FFmpeg;
|
using VDownload.Services.Utility.FFmpeg;
|
||||||
@@ -130,8 +129,8 @@ namespace VDownload
|
|||||||
|
|
||||||
protected void UnhandledExceptionCatched(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)
|
protected void UnhandledExceptionCatched(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)
|
||||||
{
|
{
|
||||||
File.AppendAllText("C:\\Users\\mateusz\\Desktop\\test.txt", $"test {e.Message}\n");
|
File.AppendAllText("C:\\Users\\mateusz\\Desktop\\test.txt", $"test {e.Message} {e.Exception.StackTrace}\n");
|
||||||
throw new NotImplementedException();
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -152,7 +151,6 @@ namespace VDownload
|
|||||||
|
|
||||||
protected void BuildUIServices(IServiceCollection services)
|
protected void BuildUIServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddSingleton<IStringResourcesService, StringResourcesService>();
|
|
||||||
services.AddSingleton<IDictionaryResourcesService, DictionaryResourcesService>();
|
services.AddSingleton<IDictionaryResourcesService, DictionaryResourcesService>();
|
||||||
services.AddSingleton<IWebViewService, WebViewService>();
|
services.AddSingleton<IWebViewService, WebViewService>();
|
||||||
services.AddSingleton<IStoragePickerService, StoragePickerService>();
|
services.AddSingleton<IStoragePickerService, StoragePickerService>();
|
||||||
|
|||||||
@@ -204,7 +204,6 @@
|
|||||||
<ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.DictionaryResources\VDownload.Services.UI.DictionaryResources.csproj" />
|
<ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.DictionaryResources\VDownload.Services.UI.DictionaryResources.csproj" />
|
||||||
<ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.Notifications\VDownload.Services.UI.Notifications.csproj" />
|
<ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.Notifications\VDownload.Services.UI.Notifications.csproj" />
|
||||||
<ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.StoragePicker\VDownload.Services.UI.StoragePicker.csproj" />
|
<ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.StoragePicker\VDownload.Services.UI.StoragePicker.csproj" />
|
||||||
<ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.StringResources\VDownload.Services.UI.StringResources.csproj" />
|
|
||||||
<ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.WebView\VDownload.Services.UI.WebView.csproj" />
|
<ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.WebView\VDownload.Services.UI.WebView.csproj" />
|
||||||
<ProjectReference Include="..\VDownload.Services\VDownload.Services.Utility\VDownload.Services.Utility.Encryption\VDownload.Services.Utility.Encryption.csproj" />
|
<ProjectReference Include="..\VDownload.Services\VDownload.Services.Utility\VDownload.Services.Utility.Encryption\VDownload.Services.Utility.Encryption.csproj" />
|
||||||
<ProjectReference Include="..\VDownload.Services\VDownload.Services.Utility\VDownload.Services.Utility.FFmpeg\VDownload.Services.Utility.FFmpeg.csproj" />
|
<ProjectReference Include="..\VDownload.Services\VDownload.Services.Utility\VDownload.Services.Utility.FFmpeg\VDownload.Services.Utility.FFmpeg.csproj" />
|
||||||
|
|||||||
Reference in New Issue
Block a user