Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

NonContactPageなどに日付を表示 #198 の解決 #235

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Xamarin.Forms;
using Xamarin.Essentials;
using Covid19Radar.Resources;
using System;

namespace Covid19Radar.ViewModels
{
Expand All @@ -20,6 +21,10 @@ public string ExposureCount
get { return _exposureCount; }
set { SetProperty(ref _exposureCount, value); }
}
public string NowDate
{
get { return DateTime.Now.ToLocalTime().ToString("D"); }
}

public ContactedNotifyPageViewModel(INavigationService navigationService, ILoggerService loggerService, IExposureNotificationService exposureNotificationService) : base(navigationService)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

using System;
using Covid19Radar.Common;
using Covid19Radar.Services;
using Covid19Radar.Services.Logs;
Expand All @@ -13,7 +14,10 @@ namespace Covid19Radar.ViewModels
public class NotContactPageViewModel : ViewModelBase
{
private readonly ILoggerService loggerService;

public string NowDate
{
get { return DateTime.Now.ToLocalTime().ToString("D"); }
}
public NotContactPageViewModel(INavigationService navigationService, ILoggerService loggerService, IUserDataService userDataService) : base(navigationService)
{
Title = Resources.AppResources.TitileUserStatusSettings;
Expand Down
13 changes: 10 additions & 3 deletions Covid19Radar/Covid19Radar/Views/HomePage/ContactedNotifyPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@
Source="InfoMark.png" />
<Label
Margin="0,0,0,5"
Style="{StaticResource DefaultTitleLabel}"
Text="{x:Static resources:AppResources.ContactedNotifyPageMainText}" />
Style="{StaticResource DefaultTitleLabel}" >
<Label.FormattedText>
<FormattedString>
<Span Text="{Binding NowDate}" />
<Span Text="&#xa;" />
<Span Text="{x:Static resources:AppResources.ContactedNotifyPageMainText}" />
</FormattedString>
</Label.FormattedText>
</Label>
<Label
Margin="0,0,0,5"
FontSize="Large"
Expand Down Expand Up @@ -66,4 +73,4 @@
Text="{x:Static resources:AppResources.ContactedNotifyPageButton1}" />
</StackLayout>
</ScrollView>
</ContentPage>
</ContentPage>
4 changes: 3 additions & 1 deletion Covid19Radar/Covid19Radar/Views/HomePage/NotContactPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
<Label HorizontalOptions="Center" Style="{StaticResource DefaultTitleLabel}">
<Label.FormattedText>
<FormattedString>
<Span Text="{Binding NowDate}" />
<Span Text="&#xa;" />
<Span Text="{x:Static resources:AppResources.NotContactPageLabel1}" />
</FormattedString>
</Label.FormattedText>
Expand Down Expand Up @@ -57,4 +59,4 @@
</Grid>
</Grid>
</ScrollView>
</ContentPage>
</ContentPage>