filter conditions
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
using Billing.Themes;
|
||||
using Billing.UI;
|
||||
using System.Globalization;
|
||||
using Xamarin.Essentials;
|
||||
using Xamarin.Forms;
|
||||
|
||||
@ -8,8 +7,8 @@ namespace Billing.Views
|
||||
{
|
||||
public partial class SettingPage : BillingPage
|
||||
{
|
||||
private static readonly BindableProperty VersionProperty = BindableProperty.Create(nameof(Version), typeof(string), typeof(SettingPage));
|
||||
private static readonly BindableProperty PrimaryColorProperty = BindableProperty.Create(nameof(PrimaryColor), typeof(string), typeof(SettingPage));
|
||||
private static readonly BindableProperty VersionProperty = Helper.Create<string, SettingPage>(nameof(Version));
|
||||
private static readonly BindableProperty PrimaryColorProperty = Helper.Create<string, SettingPage>(nameof(PrimaryColor));
|
||||
|
||||
public string Version => (string)GetValue(VersionProperty);
|
||||
public string PrimaryColor
|
||||
@ -19,10 +18,12 @@ namespace Billing.Views
|
||||
}
|
||||
|
||||
public Command CategoryCommand { get; }
|
||||
public Command ColorPickerCommand { get; }
|
||||
|
||||
public SettingPage()
|
||||
{
|
||||
CategoryCommand = new Command(OnCategoryCommand);
|
||||
ColorPickerCommand = new Command(OnColorPickerCommand);
|
||||
InitializeComponent();
|
||||
|
||||
var (main, build) = Definition.GetVersion();
|
||||
@ -60,9 +61,12 @@ namespace Billing.Views
|
||||
}
|
||||
}
|
||||
|
||||
private void ColorPicker_ColorChanged(object sender, Color e)
|
||||
private void OnColorPickerCommand(object o)
|
||||
{
|
||||
PrimaryColor = Helper.WrapColorString(e.ToHex());
|
||||
if (o is Color color)
|
||||
{
|
||||
PrimaryColor = Helper.WrapColorString(color.ToHex());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user