share db
This commit is contained in:
@@ -73,7 +73,7 @@ namespace Billing.Views
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public override void OnLoaded()
|
||||
protected override void OnLoaded()
|
||||
{
|
||||
editorName.SetFocus();
|
||||
}
|
||||
|
@@ -116,7 +116,7 @@ namespace Billing.Views
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnLoaded()
|
||||
protected override void OnLoaded()
|
||||
{
|
||||
editorAmount.SetFocus();
|
||||
}
|
||||
|
@@ -78,7 +78,7 @@ namespace Billing.Views
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public override void OnLoaded()
|
||||
protected override void OnLoaded()
|
||||
{
|
||||
editorName.SetFocus();
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ namespace Billing.Views
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public override void OnLoaded()
|
||||
protected override void OnLoaded()
|
||||
{
|
||||
billingDate.SetDateTime(DateTime.Today);
|
||||
}
|
||||
|
@@ -11,6 +11,10 @@
|
||||
BindingContext="{x:Reference settingPage}"
|
||||
Shell.TabBarIsVisible="True">
|
||||
|
||||
<ContentPage.ToolbarItems>
|
||||
<ToolbarItem Order="Primary" IconImageSource="project.png" Command="{Binding ShareCommand}"/>
|
||||
</ContentPage.ToolbarItems>
|
||||
|
||||
<TableView Intent="Settings" HasUnevenRows="True">
|
||||
<TableSection Title="{r:Text About}">
|
||||
<ui:OptionTextCell Height="36" Title="{r:Text Version}"
|
||||
|
@@ -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