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

@ -29,4 +29,35 @@ namespace Billing.UI
LongPressed?.Invoke(this, EventArgs.Empty);
}
}
public class LongPressGrid : Grid
{
public static readonly BindableProperty LongCommandProperty = BindableProperty.Create(nameof(LongCommand), typeof(Command), typeof(LongPressGrid));
public static readonly BindableProperty LongCommandParameterProperty = BindableProperty.Create(nameof(LongCommandParameter), typeof(object), typeof(LongPressGrid));
public Command LongCommand
{
get => (Command)GetValue(LongCommandProperty);
set => SetValue(LongCommandProperty, value);
}
public object LongCommandParameter
{
get => GetValue(LongCommandParameterProperty);
set => SetValue(LongCommandParameterProperty, value);
}
public void TriggerLongPress()
{
var command = LongCommand;
if (command == null)
{
return;
}
var parameter = LongCommandParameter;
if (command.CanExecute(parameter))
{
command.Execute(parameter);
}
}
}
}