first test-flight version

This commit is contained in:
2022-03-03 15:10:36 +08:00
parent 9929eee056
commit 25191127f3
116 changed files with 1124 additions and 173 deletions

View File

@ -6,6 +6,8 @@ namespace Billing.UI
{
public class OptionEntry : Entry { }
public class OptionEditor : Editor { }
public class OptionDatePicker : DatePicker { }
public class OptionTimePicker : TimePicker { }
public abstract class OptionCell : ViewCell
{
@ -163,7 +165,6 @@ namespace Billing.UI
{
new Label
{
HorizontalOptions = LayoutOptions.End,
VerticalOptions = LayoutOptions.Center
}
.Binding(Label.TextProperty, nameof(Detail))
@ -207,7 +208,6 @@ namespace Billing.UI
{
WidthRequest = 26,
HeightRequest = 20,
HorizontalOptions = LayoutOptions.End,
VerticalOptions = LayoutOptions.Center,
Margin = new Thickness(6, 0)
}
@ -248,6 +248,46 @@ namespace Billing.UI
.Binding(Switch.IsToggledProperty, nameof(IsToggled), mode: BindingMode.TwoWay);
}
public class OptionDatePickerCell : OptionCell
{
public static readonly BindableProperty DateProperty = BindableProperty.Create(nameof(Date), typeof(DateTime), typeof(OptionDatePickerCell));
public DateTime Date
{
get => (DateTime)GetValue(DateProperty);
set => SetValue(DateProperty, value);
}
protected override View Content => new OptionDatePicker
{
HorizontalOptions = LayoutOptions.End,
VerticalOptions = LayoutOptions.Center
}
.Binding(DatePicker.DateProperty, nameof(Date), mode: BindingMode.TwoWay)
.DynamicResource(DatePicker.TextColorProperty, BaseTheme.TextColor)
.DynamicResource(VisualElement.BackgroundColorProperty, BaseTheme.OptionTintColor);
}
public class OptionTimePickerCell : OptionCell
{
public static readonly BindableProperty TimeProperty = BindableProperty.Create(nameof(Time), typeof(TimeSpan), typeof(OptionTimePickerCell));
public TimeSpan Time
{
get => (TimeSpan)GetValue(TimeProperty);
set => SetValue(TimeProperty, value);
}
protected override View Content => new OptionTimePicker
{
HorizontalOptions = LayoutOptions.End,
VerticalOptions = LayoutOptions.Center
}
.Binding(TimePicker.TimeProperty, nameof(Time), mode: BindingMode.TwoWay)
.DynamicResource(TimePicker.TextColorProperty, BaseTheme.TextColor)
.DynamicResource(VisualElement.BackgroundColorProperty, BaseTheme.OptionTintColor);
}
public class OptionEntryCell : OptionCell
{
public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(OptionEntryCell));