forked from Vivelin/CatAlarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SettingPage.xaml.cs
39 lines (34 loc) · 1.07 KB
/
SettingPage.xaml.cs
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
namespace MauiCatAlarm;
using MauiCatAlarm.ViewModels;
public partial class SettingPage : ContentPage
{
public SettingPage(SettingViewModel sv)
{
BindingContext = sv;
InitializeComponent();
}
private void TimePickerDay_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if(e.PropertyName == nameof(TimePicker.Time))
{
var sv = (SettingViewModel)BindingContext;
sv.SaveShiftSettingsDay();
}
}
private void TimePickerMid_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(TimePicker.Time))
{
var sv = (SettingViewModel)BindingContext;
sv.SaveShiftSettingsMid();
}
}
private void TimePickerNight_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(TimePicker.Time))
{
var sv = (SettingViewModel)BindingContext;
sv.SaveShiftSettingsNight();
}
}
}