44 lines
940 B
C#
44 lines
940 B
C#
using System;
|
|
using Billing.Themes;
|
|
using Xamarin.Forms;
|
|
|
|
namespace Billing.UI
|
|
{
|
|
public abstract class BillingPage : ContentPage
|
|
{
|
|
public event EventHandler Loaded;
|
|
public event EventHandler Refreshed;
|
|
|
|
private bool loaded;
|
|
|
|
public BillingPage()
|
|
{
|
|
SetDynamicResource(BackgroundColorProperty, BaseTheme.WindowBackgroundColor);
|
|
Shell.SetTabBarIsVisible(this, false);
|
|
}
|
|
|
|
protected virtual void OnLoaded()
|
|
{
|
|
Loaded?.Invoke(this, EventArgs.Empty);
|
|
}
|
|
|
|
protected virtual void OnRefresh()
|
|
{
|
|
Refreshed?.Invoke(this, EventArgs.Empty);
|
|
}
|
|
|
|
public void TriggerLoad()
|
|
{
|
|
if (!loaded)
|
|
{
|
|
loaded = true;
|
|
OnLoaded();
|
|
}
|
|
}
|
|
|
|
public void TriggerRefresh()
|
|
{
|
|
OnRefresh();
|
|
}
|
|
}
|
|
} |