From 3979fcd479fe0051c249ad66d5bb203a19099510 Mon Sep 17 00:00:00 2001 From: ARIYAMA Keiji Date: Fri, 14 Jan 2022 19:58:25 +0900 Subject: [PATCH] Add UseStable button in InqueryPage. --- .../Resources/AppResources.Designer.cs | 6 ++++++ .../Resources/AppResources.ja.resx | 4 ++++ .../Covid19Radar/Resources/AppResources.resx | 6 +++++- .../HelpPage/InqueryPageViewModel.cs | 19 ++++++++++++++++++- .../Views/HelpPage/InqueryPage.xaml | 9 +++++++++ .../HelpPage/InqueryPageViewModelTests.cs | 7 ++++++- 6 files changed, 48 insertions(+), 3 deletions(-) diff --git a/Covid19Radar/Covid19Radar/Resources/AppResources.Designer.cs b/Covid19Radar/Covid19Radar/Resources/AppResources.Designer.cs index 7cd1f73ac..3a96e89bd 100644 --- a/Covid19Radar/Covid19Radar/Resources/AppResources.Designer.cs +++ b/Covid19Radar/Covid19Radar/Resources/AppResources.Designer.cs @@ -1883,6 +1883,12 @@ public static string InqueryBetaViaGitHub { } } + public static string InqueryBetaViaGitHubInstallStable { + get { + return ResourceManager.GetString("InqueryBetaViaGitHubInstallStable", resourceCulture); + } + } + public static string Beta_Splash_WelcomeBeta { get { return ResourceManager.GetString("Beta_Splash_WelcomeBeta", resourceCulture); diff --git a/Covid19Radar/Covid19Radar/Resources/AppResources.ja.resx b/Covid19Radar/Covid19Radar/Resources/AppResources.ja.resx index 3e3909e18..fc0d415fa 100644 --- a/Covid19Radar/Covid19Radar/Resources/AppResources.ja.resx +++ b/Covid19Radar/Covid19Radar/Resources/AppResources.ja.resx @@ -1225,6 +1225,10 @@ GitHubを開く GitHubを開く + + 安定版をインストール + 安定版をインストール + COCOA(Beta)へようこそ! diff --git a/Covid19Radar/Covid19Radar/Resources/AppResources.resx b/Covid19Radar/Covid19Radar/Resources/AppResources.resx index 932c9697d..809ba9701 100644 --- a/Covid19Radar/Covid19Radar/Resources/AppResources.resx +++ b/Covid19Radar/Covid19Radar/Resources/AppResources.resx @@ -1335,6 +1335,10 @@ Note: this app does not collect users’ location information. Open GitHub GitHubを開く + + Use Stable veriosn + 安定版をインストール + Welcome COCOA(Beta)!! @@ -1365,7 +1369,7 @@ Note: this app does not collect users’ location information. COCOA(Beta)を利用する - Use Stable veriosn. + Use Stable veriosn 安定版をインストール diff --git a/Covid19Radar/Covid19Radar/ViewModels/HelpPage/InqueryPageViewModel.cs b/Covid19Radar/Covid19Radar/ViewModels/HelpPage/InqueryPageViewModel.cs index 5e0d93aee..944a85ee7 100644 --- a/Covid19Radar/Covid19Radar/ViewModels/HelpPage/InqueryPageViewModel.cs +++ b/Covid19Radar/Covid19Radar/ViewModels/HelpPage/InqueryPageViewModel.cs @@ -5,6 +5,7 @@ using System; using System.Threading.Tasks; using Covid19Radar.Resources; +using Covid19Radar.Services; using Covid19Radar.Services.Logs; using Covid19Radar.Views; using Prism.Navigation; @@ -16,14 +17,20 @@ namespace Covid19Radar.ViewModels public class InqueryPageViewModel : ViewModelBase { private readonly ILoggerService loggerService; + private readonly IEssentialsService essentialService; public Func BrowserOpenAsync = Browser.OpenAsync; public Func ComposeEmailAsync { get; set; } = Email.ComposeAsync; - public InqueryPageViewModel(INavigationService navigationService, ILoggerService loggerService) : base(navigationService) + public InqueryPageViewModel( + INavigationService navigationService, + ILoggerService loggerService, + IEssentialsService eseentialService + ) : base(navigationService) { Title = AppResources.InqueryPageTitle; this.loggerService = loggerService; + this.essentialService = eseentialService; } public Command OpenGitHub => new Command(async () => @@ -32,6 +39,16 @@ public InqueryPageViewModel(INavigationService navigationService, ILoggerService await BrowserOpenAsync(url, BrowserLaunchMode.External); }); + public Command OnClickUseStable => new Command(async () => + { + loggerService.StartMethod(); + + var url = essentialService.StoreUrl; + await BrowserOpenAsync(url, BrowserLaunchMode.External); + + loggerService.EndMethod(); + }); + public Command OnClickQuestionCommand => new Command(async () => { loggerService.StartMethod(); diff --git a/Covid19Radar/Covid19Radar/Views/HelpPage/InqueryPage.xaml b/Covid19Radar/Covid19Radar/Views/HelpPage/InqueryPage.xaml index 2b996d79e..c209da0cb 100644 --- a/Covid19Radar/Covid19Radar/Views/HelpPage/InqueryPage.xaml +++ b/Covid19Radar/Covid19Radar/Views/HelpPage/InqueryPage.xaml @@ -67,6 +67,15 @@ Style="{StaticResource DefaultButton}" Text="{x:Static resources:AppResources.InqueryBetaViaGitHub}" /> +