complete account page

This commit is contained in:
2022-03-02 17:31:49 +08:00
parent aa38e186c7
commit 51f8e4f2e8
26 changed files with 547 additions and 76 deletions

View File

@@ -1,9 +1,11 @@
using System;
using Xamarin.Essentials;
namespace Billing
{
internal static class Helper
{
#if DEBUG
public static void Debug(string message)
{
var time = DateTime.Now.ToString("HH:mm:ss.fff");
@@ -20,5 +22,36 @@ namespace Billing
var time = DateTime.Now.ToString("HH:mm:ss.fff");
System.Diagnostics.Debug.Fail($"[{time}] - {category}", message);
}
#else
#pragma warning disable IDE0060 // Remove unused parameter
public static void Debug(string message)
{
}
public static void Error(string category, Exception ex)
{
}
public static void Error(string category, string message)
{
}
#pragma warning restore IDE0060 // Remove unused parameter
#endif
public static bool NetworkAvailable
{
get
{
try
{
return Connectivity.NetworkAccess == NetworkAccess.Internet
|| Connectivity.NetworkAccess == NetworkAccess.ConstrainedInternet;
}
catch
{
return false;
}
}
}
}
}