forked from Vivelin/CatAlarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPage.xaml
141 lines (120 loc) · 6.17 KB
/
MainPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:vm="clr-namespace:MauiCatAlarm.ViewModels"
x:Class="MauiCatAlarm.MainPage"
x:DataType="vm:MainViewModel">
<ScrollView>
<VerticalStackLayout>
<HorizontalStackLayout HorizontalOptions="Start"
Spacing="6"
Padding="0"
Margin="0,0,0,40" >
<Label Text="{Binding CurrentWeekday}"
Style="{StaticResource Subheading}"/>
<Label Text="{Binding CurrentMonth}"
Style="{StaticResource Subheading}" />
<Label Text="{Binding CurrentDayNumber}"
Style="{StaticResource Subheading}" />
<Label Text="{Binding CurrentTime}"
Style="{StaticResource Subheading}" />
</HorizontalStackLayout>
<!-- Show an ongoing alarm in case the notification was dismissed -->
<Label Text="起床了!"
IsVisible="{Binding IsAlarmOngoing}" />
<Button Text="关掉闹钟"
IsVisible="{Binding IsAlarmOngoing}"
Command="{Binding DismissAlarmCommand}"
Style="{StaticResource DangerButton}"
Margin="0,0,0,40" />
<!-- Show a label with the next occurrence if the alarm is enabled -->
<Label Text="{Binding NextAlarmTime, StringFormat='下个闹钟:{0}'}"
IsVisible="{Binding IsShiftAlarmSet}" />
<HorizontalStackLayout HorizontalOptions="CenterAndExpand"
Spacing="100"
Padding="5">
<Label Text="周一"
VerticalOptions="Center"/>
<Button Text="{Binding SelectShift1}"
Command="{Binding ToggleShift1Command}"
BackgroundColor="{Binding BtnBackgroundColor1}"
TextColor="#000000"/>
</HorizontalStackLayout>
<HorizontalStackLayout HorizontalOptions="CenterAndExpand"
Spacing="100"
Padding="5">
<Label Text="周二"
VerticalOptions="Center"/>
<Button Text="{Binding SelectShift2}"
Command="{Binding ToggleShift2Command}"
BackgroundColor="{Binding BtnBackgroundColor2}"
TextColor="#000000"/>
</HorizontalStackLayout>
<HorizontalStackLayout HorizontalOptions="CenterAndExpand"
Spacing="100"
Padding="5">
<Label Text="周三"
VerticalOptions="Center"/>
<Button Text="{Binding SelectShift3}"
Command="{Binding ToggleShift3Command}"
BackgroundColor="{Binding BtnBackgroundColor3}"
TextColor="#000000"/>
</HorizontalStackLayout>
<HorizontalStackLayout HorizontalOptions="CenterAndExpand"
Spacing="100"
Padding="5">
<Label Text="周四"
VerticalOptions="Center"/>
<Button Text="{Binding SelectShift4}"
Command="{Binding ToggleShift4Command}"
BackgroundColor="{Binding BtnBackgroundColor4}"
TextColor="#000000"/>
</HorizontalStackLayout>
<HorizontalStackLayout HorizontalOptions="CenterAndExpand"
Spacing="100"
Padding="5">
<Label Text="周五"
VerticalOptions="Center"/>
<Button Text="{Binding SelectShift5}"
Command="{Binding ToggleShift5Command}"
BackgroundColor="{Binding BtnBackgroundColor5}"
TextColor="#000000"/>
</HorizontalStackLayout>
<HorizontalStackLayout HorizontalOptions="CenterAndExpand"
Spacing="100"
Padding="5">
<Label Text="周六"
VerticalOptions="Center"/>
<Button Text="{Binding SelectShift6}"
Command="{Binding ToggleShift6Command}"
BackgroundColor="{Binding BtnBackgroundColor6}"
TextColor="#000000"/>
</HorizontalStackLayout>
<HorizontalStackLayout HorizontalOptions="CenterAndExpand"
Spacing="100"
Padding="5">
<Label Text="周日"
VerticalOptions="Center"/>
<Button Text="{Binding SelectShift0}"
Command="{Binding ToggleShift0Command}"
BackgroundColor="{Binding BtnBackgroundColor0}"
TextColor="#000000"/>
</HorizontalStackLayout>
<!--<HorizontalStackLayout HorizontalOptions="CenterAndExpand"
Spacing="100"
Padding="5">
<Label Text="测试"
VerticalOptions="Center"/>
<Button Text="测试"
Command="{Binding TestCommand}"
BackgroundColor="{Binding BtnBackgroundColor0}"
TextColor="#000000"/>
</HorizontalStackLayout>-->
<Label Text="献给至爱♥孙东晓♥:"
Margin="0,20,0,0"
/>
<Label Text="{Binding LoveTalk}"
/>
</VerticalStackLayout>
</ScrollView>
</ContentPage>