share db
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
using Billing.Store;
|
||||
using Billing.Themes;
|
||||
using Billing.UI;
|
||||
using Xamarin.Essentials;
|
||||
@ -17,11 +18,13 @@ namespace Billing.Views
|
||||
set => SetValue(PrimaryColorProperty, value);
|
||||
}
|
||||
|
||||
public Command ShareCommand { get; }
|
||||
public Command CategoryCommand { get; }
|
||||
public Command ColorPickerCommand { get; }
|
||||
|
||||
public SettingPage()
|
||||
{
|
||||
ShareCommand = new Command(OnShareCommand);
|
||||
CategoryCommand = new Command(OnCategoryCommand);
|
||||
ColorPickerCommand = new Command(OnColorPickerCommand);
|
||||
InitializeComponent();
|
||||
@ -48,6 +51,21 @@ namespace Billing.Views
|
||||
Light.Instance.RefreshColor(Color.FromHex(color));
|
||||
}
|
||||
|
||||
private async void OnShareCommand()
|
||||
{
|
||||
if (Tap.IsBusy)
|
||||
{
|
||||
return;
|
||||
}
|
||||
using (Tap.Start())
|
||||
{
|
||||
await Share.RequestAsync(new ShareFileRequest
|
||||
{
|
||||
File = new ShareFile(StoreHelper.DatabasePath)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnCategoryCommand()
|
||||
{
|
||||
if (Tap.IsBusy)
|
||||
|
Reference in New Issue
Block a user