language version degraded to 9.0

This commit is contained in:
Tsanie Lily 2022-02-25 13:38:42 +08:00
parent 9a6011c3d8
commit e012110b00
32 changed files with 1287 additions and 1262 deletions

View File

@ -3,10 +3,10 @@ using Billing.Themes;
using Xamarin.Essentials; using Xamarin.Essentials;
using Xamarin.Forms; using Xamarin.Forms;
namespace Billing; namespace Billing
public class App : Application
{ {
public class App : Application
{
public static AppTheme CurrentTheme { get; private set; } public static AppTheme CurrentTheme { get; private set; }
public static PlatformCulture CurrentCulture { get; private set; } public static PlatformCulture CurrentCulture { get; private set; }
@ -58,4 +58,5 @@ public class App : Application
// TODO: status bar // TODO: status bar
Resources = instance; Resources = instance;
} }
}
} }

View File

@ -1,9 +1,9 @@
using System; using System;
namespace Billing; namespace Billing
internal static class Helper
{ {
internal static class Helper
{
public static void Debug(string message) public static void Debug(string message)
{ {
var time = DateTime.Now.ToString("HH:mm:ss.fff"); var time = DateTime.Now.ToString("HH:mm:ss.fff");
@ -20,4 +20,5 @@ internal static class Helper
var time = DateTime.Now.ToString("HH:mm:ss.fff"); var time = DateTime.Now.ToString("HH:mm:ss.fff");
System.Diagnostics.Debug.Fail($"[{time}] - {category}", message); System.Diagnostics.Debug.Fail($"[{time}] - {category}", message);
} }
}
} }

View File

@ -36,7 +36,7 @@ namespace Billing.Languages
{ {
get get
{ {
if (strings?.TryGetValue(key, out string val) == true) if (strings != null && strings.TryGetValue(key, out string val))
{ {
return val; return val;
} }

View File

@ -1,11 +1,12 @@
using Xamarin.Forms; using Xamarin.Forms;
namespace Billing; namespace Billing
public partial class MainShell : Shell
{ {
public partial class MainShell : Shell
{
public MainShell() public MainShell()
{ {
InitializeComponent(); InitializeComponent();
} }
}
} }

View File

@ -1,9 +1,9 @@
using System.Xml.Linq; using System.Xml.Linq;
namespace Billing.Models; namespace Billing.Models
public class Account : BaseModel
{ {
public class Account : BaseModel
{
public int Id { get; set; } public int Id { get; set; }
public string Icon { get; set; } = ICON_DEFAULT; public string Icon { get; set; } = ICON_DEFAULT;
public AccountCategory Category { get; set; } public AccountCategory Category { get; set; }
@ -30,12 +30,13 @@ public class Account : BaseModel
Write(node, nameof(Balance), Balance); Write(node, nameof(Balance), Balance);
Write(node, nameof(Memo), Memo); Write(node, nameof(Memo), Memo);
} }
} }
public enum AccountCategory public enum AccountCategory
{ {
Cash = 0, Cash = 0,
CreditCard, CreditCard,
DebitCard, DebitCard,
ElecAccount ElecAccount
}
} }

View File

@ -5,17 +5,17 @@ using System.Linq;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
namespace Billing.Models; namespace Billing.Models
public interface IModel
{ {
public interface IModel
{
void OnXmlSerialize(XElement node); void OnXmlSerialize(XElement node);
void OnXmlDeserialize(XElement node); void OnXmlDeserialize(XElement node);
} }
public abstract class BaseModel : IModel, IDisposable public abstract class BaseModel : IModel, IDisposable
{ {
protected const string ICON_DEFAULT = "ic_default"; protected const string ICON_DEFAULT = "ic_default";
private bool disposed = false; private bool disposed = false;
@ -181,4 +181,5 @@ public abstract class BaseModel : IModel, IDisposable
disposed = true; disposed = true;
} }
} }
}
} }

View File

@ -1,10 +1,10 @@
using System; using System;
using System.Xml.Linq; using System.Xml.Linq;
namespace Billing.Models; namespace Billing.Models
public class Billing : BaseModel
{ {
public class Billing : BaseModel
{
public decimal Amount { get; set; } public decimal Amount { get; set; }
public string Name { get; set; } public string Name { get; set; }
public int CategoryId { get; set; } public int CategoryId { get; set; }
@ -31,4 +31,5 @@ public class Billing : BaseModel
Write(node, nameof(Store), Store); Write(node, nameof(Store), Store);
Write(node, nameof(CreateTime), CreateTime); Write(node, nameof(CreateTime), CreateTime);
} }
}
} }

View File

@ -1,9 +1,9 @@
using System.Xml.Linq; using System.Xml.Linq;
namespace Billing.Models; namespace Billing.Models
public class Category : BaseModel
{ {
public class Category : BaseModel
{
public int Id { get; set; } public int Id { get; set; }
public string Icon { get; set; } = ICON_DEFAULT; public string Icon { get; set; } = ICON_DEFAULT;
public string Name { get; set; } public string Name { get; set; }
@ -31,4 +31,5 @@ public class Category : BaseModel
Write(node, nameof(ParentId), ParentId.Value); Write(node, nameof(ParentId), ParentId.Value);
} }
} }
}
} }

View File

@ -1,10 +1,10 @@
using Billing.UI; using Billing.UI;
using Xamarin.Forms; using Xamarin.Forms;
namespace Billing.Themes; namespace Billing.Themes
public abstract class BaseTheme : ResourceDictionary
{ {
public abstract class BaseTheme : ResourceDictionary
{
public const string CascadiaFontRegular = nameof(CascadiaFontRegular); public const string CascadiaFontRegular = nameof(CascadiaFontRegular);
public const string CascadiaFontBold = nameof(CascadiaFontBold); public const string CascadiaFontBold = nameof(CascadiaFontBold);
public const string RobotoCondensedFontRegular = nameof(RobotoCondensedFontRegular); public const string RobotoCondensedFontRegular = nameof(RobotoCondensedFontRegular);
@ -73,4 +73,5 @@ public abstract class BaseTheme : ResourceDictionary
} }
}); });
} }
}
} }

View File

@ -1,10 +1,9 @@
using Billing.UI; using Xamarin.Forms;
using Xamarin.Forms;
namespace Billing.Themes; namespace Billing.Themes
public class Dark : BaseTheme
{ {
public class Dark : BaseTheme
{
private static Dark _instance; private static Dark _instance;
public static Dark Instance => _instance ??= new Dark(); public static Dark Instance => _instance ??= new Dark();
@ -47,4 +46,5 @@ public class Dark : BaseTheme
} }
}); });
} }
}
} }

View File

@ -1,10 +1,9 @@
using Billing.UI; using Xamarin.Forms;
using Xamarin.Forms;
namespace Billing.Themes; namespace Billing.Themes
public class Light : BaseTheme
{ {
public class Light : BaseTheme
{
private static Light _instance; private static Light _instance;
public static Light Instance => _instance ??= new Light(); public static Light Instance => _instance ??= new Light();
@ -47,4 +46,5 @@ public class Light : BaseTheme
} }
}); });
} }
}
} }

View File

@ -1,10 +1,10 @@
using System; using System;
using Xamarin.Forms; using Xamarin.Forms;
namespace Billing.UI; namespace Billing.UI
public partial class BillingDate : ContentView
{ {
public partial class BillingDate : ContentView
{
#region UI Properties #region UI Properties
private static readonly BindableProperty SundayProperty = BindableProperty.Create(nameof(Sunday), typeof(BillingDay), typeof(BillingDate)); private static readonly BindableProperty SundayProperty = BindableProperty.Create(nameof(Sunday), typeof(BillingDay), typeof(BillingDate));
@ -188,20 +188,20 @@ public partial class BillingDate : ContentView
OnSelectedDatePropertyChanged(this, null, SelectedDate); OnSelectedDatePropertyChanged(this, null, SelectedDate);
} }
} }
} }
public class DateEventArgs : EventArgs public class DateEventArgs : EventArgs
{ {
public DateTime Date { get; } public DateTime Date { get; }
public DateEventArgs(DateTime date) public DateEventArgs(DateTime date)
{ {
Date = date; Date = date;
} }
} }
public class BillingDayView : ContentView public class BillingDayView : ContentView
{ {
public static readonly BindableProperty BillingDayProperty = BindableProperty.Create(nameof(BillingDay), typeof(BillingDay), typeof(BillingDayView)); public static readonly BindableProperty BillingDayProperty = BindableProperty.Create(nameof(BillingDay), typeof(BillingDay), typeof(BillingDayView));
public static readonly BindableProperty CommandProperty = BindableProperty.Create(nameof(Command), typeof(Command), typeof(BillingDayView)); public static readonly BindableProperty CommandProperty = BindableProperty.Create(nameof(Command), typeof(Command), typeof(BillingDayView));
@ -215,10 +215,10 @@ public class BillingDayView : ContentView
get => (Command)GetValue(CommandProperty); get => (Command)GetValue(CommandProperty);
set => SetValue(CommandProperty, value); set => SetValue(CommandProperty, value);
} }
} }
public class BillingDay : BindableObject public class BillingDay : BindableObject
{ {
private static readonly BindableProperty DateProperty = BindableProperty.Create(nameof(Date), typeof(DateTime), typeof(BillingDay), propertyChanged: OnDatePropertyChanged); private static readonly BindableProperty DateProperty = BindableProperty.Create(nameof(Date), typeof(DateTime), typeof(BillingDay), propertyChanged: OnDatePropertyChanged);
private static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(BillingDay)); private static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(BillingDay));
private static readonly BindableProperty FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(BillingDay), defaultValue: Definition.GetCascadiaRegularFontFamily()); private static readonly BindableProperty FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(BillingDay), defaultValue: Definition.GetCascadiaRegularFontFamily());
@ -286,4 +286,5 @@ public class BillingDay : BindableObject
SetValue(TextOpacityProperty, .4); SetValue(TextOpacityProperty, .4);
} }
} }
}
} }

View File

@ -1,12 +1,13 @@
using Billing.Themes; using Billing.Themes;
using Xamarin.Forms; using Xamarin.Forms;
namespace Billing.UI; namespace Billing.UI
public abstract class BillingPage : ContentPage
{ {
public abstract class BillingPage : ContentPage
{
public BillingPage() public BillingPage()
{ {
SetDynamicResource(BackgroundColorProperty, BaseTheme.WindowBackgroundColor); SetDynamicResource(BackgroundColorProperty, BaseTheme.WindowBackgroundColor);
} }
}
} }

View File

@ -3,10 +3,10 @@ using System;
using System.Globalization; using System.Globalization;
using Xamarin.Forms; using Xamarin.Forms;
namespace Billing.UI; namespace Billing.UI
public class TitleDateConverter : IValueConverter
{ {
public class TitleDateConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{ {
if (value is DateTime date) if (value is DateTime date)
@ -20,10 +20,10 @@ public class TitleDateConverter : IValueConverter
{ {
return value; return value;
} }
} }
public class MoneyConverter : IValueConverter public class MoneyConverter : IValueConverter
{ {
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{ {
if (value is decimal d) if (value is decimal d)
@ -37,4 +37,5 @@ public class MoneyConverter : IValueConverter
{ {
return value; return value;
} }
}
} }

View File

@ -2,10 +2,10 @@
using System; using System;
using Xamarin.Forms; using Xamarin.Forms;
namespace Billing.UI; namespace Billing.UI
public class TintImage : Image
{ {
public class TintImage : Image
{
public static readonly BindableProperty PrimaryColorProperty = BindableProperty.Create(nameof(PrimaryColor), typeof(Color?), typeof(TintImage)); public static readonly BindableProperty PrimaryColorProperty = BindableProperty.Create(nameof(PrimaryColor), typeof(Color?), typeof(TintImage));
public Color? PrimaryColor public Color? PrimaryColor
@ -13,10 +13,10 @@ public class TintImage : Image
get => (Color?)GetValue(PrimaryColorProperty); get => (Color?)GetValue(PrimaryColorProperty);
set => SetValue(PrimaryColorProperty, value); set => SetValue(PrimaryColorProperty, value);
} }
} }
public class LongPressButton : Button public class LongPressButton : Button
{ {
public event EventHandler LongPressed; public event EventHandler LongPressed;
public LongPressButton() public LongPressButton()
@ -29,12 +29,12 @@ public class LongPressButton : Button
{ {
LongPressed?.Invoke(this, EventArgs.Empty); LongPressed?.Invoke(this, EventArgs.Empty);
} }
} }
public class OptionEntry : Entry { } public class OptionEntry : Entry { }
public abstract class OptionCell : ViewCell public abstract class OptionCell : ViewCell
{ {
public static readonly BindableProperty TitleProperty = BindableProperty.Create(nameof(Title), typeof(string), typeof(OptionCell)); public static readonly BindableProperty TitleProperty = BindableProperty.Create(nameof(Title), typeof(string), typeof(OptionCell));
public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(OptionCell)); public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(OptionCell));
@ -77,10 +77,10 @@ public abstract class OptionCell : ViewCell
} }
.DynamicResource(VisualElement.BackgroundColorProperty, BaseTheme.OptionTintColor); .DynamicResource(VisualElement.BackgroundColorProperty, BaseTheme.OptionTintColor);
} }
} }
public class OptionTextCell : OptionCell public class OptionTextCell : OptionCell
{ {
public static readonly BindableProperty DetailProperty = BindableProperty.Create(nameof(Detail), typeof(string), typeof(OptionTextCell)); public static readonly BindableProperty DetailProperty = BindableProperty.Create(nameof(Detail), typeof(string), typeof(OptionTextCell));
public string Detail public string Detail
@ -96,10 +96,10 @@ public class OptionTextCell : OptionCell
} }
.Binding(Label.TextProperty, nameof(Detail)) .Binding(Label.TextProperty, nameof(Detail))
.DynamicResource(Label.TextColorProperty, BaseTheme.SecondaryTextColor); .DynamicResource(Label.TextColorProperty, BaseTheme.SecondaryTextColor);
} }
public class OptionSwitchCell : OptionCell public class OptionSwitchCell : OptionCell
{ {
public static readonly BindableProperty IsToggledProperty = BindableProperty.Create(nameof(IsToggled), typeof(bool), typeof(OptionSwitchCell)); public static readonly BindableProperty IsToggledProperty = BindableProperty.Create(nameof(IsToggled), typeof(bool), typeof(OptionSwitchCell));
public bool IsToggled public bool IsToggled
@ -114,10 +114,10 @@ public class OptionSwitchCell : OptionCell
VerticalOptions = LayoutOptions.Center VerticalOptions = LayoutOptions.Center
} }
.Binding(Switch.IsToggledProperty, nameof(IsToggled), BindingMode.TwoWay); .Binding(Switch.IsToggledProperty, nameof(IsToggled), BindingMode.TwoWay);
} }
public class OptionEntryCell : OptionCell public class OptionEntryCell : OptionCell
{ {
public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(OptionEntryCell)); public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(OptionEntryCell));
public static readonly BindableProperty KeyboardProperty = BindableProperty.Create(nameof(Keyboard), typeof(Keyboard), typeof(OptionEntryCell)); public static readonly BindableProperty KeyboardProperty = BindableProperty.Create(nameof(Keyboard), typeof(Keyboard), typeof(OptionEntryCell));
public static readonly BindableProperty PlaceholderProperty = BindableProperty.Create(nameof(Placeholder), typeof(string), typeof(OptionEntryCell)); public static readonly BindableProperty PlaceholderProperty = BindableProperty.Create(nameof(Placeholder), typeof(string), typeof(OptionEntryCell));
@ -151,4 +151,5 @@ public class OptionEntryCell : OptionCell
.DynamicResource(Entry.TextColorProperty, BaseTheme.TextColor) .DynamicResource(Entry.TextColorProperty, BaseTheme.TextColor)
.DynamicResource(Entry.PlaceholderColorProperty, BaseTheme.SecondaryTextColor) .DynamicResource(Entry.PlaceholderColorProperty, BaseTheme.SecondaryTextColor)
.DynamicResource(VisualElement.BackgroundColorProperty, BaseTheme.OptionTintColor); .DynamicResource(VisualElement.BackgroundColorProperty, BaseTheme.OptionTintColor);
}
} }

View File

@ -1,9 +1,9 @@
using Xamarin.Forms; using Xamarin.Forms;
namespace Billing.UI; namespace Billing.UI
public class ShadowEffect : RoutingEffect
{ {
public class ShadowEffect : RoutingEffect
{
public float Radius { get; set; } public float Radius { get; set; }
public Color Color { get; set; } public Color Color { get; set; }
public Size Offect { get; set; } public Size Offect { get; set; }
@ -12,4 +12,5 @@ public class ShadowEffect : RoutingEffect
public ShadowEffect() : base($"Org.Tsanie.{nameof(ShadowEffect)}") public ShadowEffect() : base($"Org.Tsanie.{nameof(ShadowEffect)}")
{ {
} }
}
} }

View File

@ -1,18 +1,18 @@
using System; using System;
using Xamarin.Forms; using Xamarin.Forms;
namespace Billing.UI; namespace Billing.UI
public static partial class Definition
{ {
public static partial class Definition
{
public static partial string GetCascadiaRegularFontFamily(); public static partial string GetCascadiaRegularFontFamily();
public static partial string GetCascadiaBoldFontFamily(); public static partial string GetCascadiaBoldFontFamily();
public static partial string GetRobotoCondensedRegularFontFamily(); public static partial string GetRobotoCondensedRegularFontFamily();
public static partial string GetRobotoCondensedBoldFontFamily(); public static partial string GetRobotoCondensedBoldFontFamily();
} }
public static class ExtensionHelper public static class ExtensionHelper
{ {
public static View Binding(this View view, BindableProperty property, string path, BindingMode mode = BindingMode.Default, IValueConverter converter = null) public static View Binding(this View view, BindableProperty property, string path, BindingMode mode = BindingMode.Default, IValueConverter converter = null)
{ {
view.SetBinding(property, path, mode, converter); view.SetBinding(property, path, mode, converter);
@ -36,10 +36,10 @@ public static class ExtensionHelper
Grid.SetRow(view, row); Grid.SetRow(view, row);
return view; return view;
} }
} }
public class Tap : IDisposable public class Tap : IDisposable
{ {
private readonly static object sync = new(); private readonly static object sync = new();
private static Tap instance; private static Tap instance;
@ -65,4 +65,5 @@ public class Tap : IDisposable
busy = false; busy = false;
} }
} }
}
} }

View File

@ -1,11 +1,10 @@
using Billing.UI; using Billing.UI;
using System;
using Xamarin.Forms; using Xamarin.Forms;
namespace Billing.Views; namespace Billing.Views
public partial class AccountPage : BillingPage
{ {
public partial class AccountPage : BillingPage
{
private static readonly BindableProperty BalanceProperty = BindableProperty.Create(nameof(Balance), typeof(decimal), typeof(AccountPage)); private static readonly BindableProperty BalanceProperty = BindableProperty.Create(nameof(Balance), typeof(decimal), typeof(AccountPage));
private static readonly BindableProperty AssetProperty = BindableProperty.Create(nameof(Asset), typeof(decimal), typeof(AccountPage)); private static readonly BindableProperty AssetProperty = BindableProperty.Create(nameof(Asset), typeof(decimal), typeof(AccountPage));
private static readonly BindableProperty LiabilityProperty = BindableProperty.Create(nameof(Liability), typeof(decimal), typeof(AccountPage)); private static readonly BindableProperty LiabilityProperty = BindableProperty.Create(nameof(Liability), typeof(decimal), typeof(AccountPage));
@ -41,4 +40,5 @@ public partial class AccountPage : BillingPage
{ {
Helper.Debug(e.Account.ToString()); Helper.Debug(e.Account.ToString());
} }
}
} }

View File

@ -3,10 +3,10 @@ using Billing.UI;
using System; using System;
using Xamarin.Forms; using Xamarin.Forms;
namespace Billing.Views; namespace Billing.Views
public partial class AddAccountPage : BillingPage
{ {
public partial class AddAccountPage : BillingPage
{
private static readonly BindableProperty AccountNameProperty = BindableProperty.Create(nameof(AccountName), typeof(string), typeof(AddAccountPage)); private static readonly BindableProperty AccountNameProperty = BindableProperty.Create(nameof(AccountName), typeof(string), typeof(AddAccountPage));
private static readonly BindableProperty AccountIconProperty = BindableProperty.Create(nameof(AccountIcon), typeof(string), typeof(AddAccountPage)); private static readonly BindableProperty AccountIconProperty = BindableProperty.Create(nameof(AccountIcon), typeof(string), typeof(AddAccountPage));
private static readonly BindableProperty CategoryProperty = BindableProperty.Create(nameof(Category), typeof(string), typeof(AddAccountPage)); private static readonly BindableProperty CategoryProperty = BindableProperty.Create(nameof(Category), typeof(string), typeof(AddAccountPage));
@ -78,9 +78,10 @@ public partial class AddAccountPage : BillingPage
} }
}); });
} }
} }
public class AccountEventArgs : EventArgs public class AccountEventArgs : EventArgs
{ {
public Account Account { get; set; } public Account Account { get; set; }
}
} }

View File

@ -1,11 +1,12 @@
using Billing.UI; using Billing.UI;
namespace Billing.Views; namespace Billing.Views
public partial class AddBillPage : BillingPage
{ {
public partial class AddBillPage : BillingPage
{
public AddBillPage() public AddBillPage()
{ {
InitializeComponent(); InitializeComponent();
} }
}
} }

View File

@ -2,10 +2,10 @@ using Billing.UI;
using System; using System;
using Xamarin.Forms; using Xamarin.Forms;
namespace Billing.Views; namespace Billing.Views
public partial class BillPage : BillingPage
{ {
public partial class BillPage : BillingPage
{
private static readonly BindableProperty SelectedDateProperty = BindableProperty.Create(nameof(SelectedDate), typeof(DateTime), typeof(BillPage)); private static readonly BindableProperty SelectedDateProperty = BindableProperty.Create(nameof(SelectedDate), typeof(DateTime), typeof(BillPage));
public DateTime SelectedDate public DateTime SelectedDate
@ -41,4 +41,5 @@ public partial class BillPage : BillingPage
{ {
await Navigation.PushAsync(new AddBillPage()); await Navigation.PushAsync(new AddBillPage());
} }
}
} }

View File

@ -1,11 +1,12 @@
using Billing.UI; using Billing.UI;
namespace Billing.Views; namespace Billing.Views
public partial class SettingPage : BillingPage
{ {
public partial class SettingPage : BillingPage
{
public SettingPage() public SettingPage()
{ {
InitializeComponent(); InitializeComponent();
} }
}
} }

View File

@ -16,14 +16,13 @@
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest> <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix> <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix> <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v12.0</TargetFrameworkVersion> <TargetFrameworkVersion>v12.0</TargetFrameworkVersion>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent> <AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<AndroidUseAapt2>true</AndroidUseAapt2> <AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType> <AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
<NuGetPackageImportStamp> <NuGetPackageImportStamp>
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
<LangVersion>10.0</LangVersion> <LangVersion>9.0</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -65,8 +64,8 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2196" /> <PackageReference Include="Xamarin.Forms" Version="5.0.0.2337" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" /> <PackageReference Include="Xamarin.Essentials" Version="1.7.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Definition.cs" /> <Compile Include="Definition.cs" />

View File

@ -1,14 +1,14 @@
using Foundation; using Foundation;
using UIKit; using UIKit;
namespace Billing.iOS; namespace Billing.iOS
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register(nameof(AppDelegate))]
public partial class AppDelegate : Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{ {
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register(nameof(AppDelegate))]
public partial class AppDelegate : Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
// //
// This method is invoked when the application has loaded and is ready to run. In this // This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window // method you should instantiate the window, load the UI into it and then make the window
@ -23,4 +23,5 @@ public partial class AppDelegate : Xamarin.Forms.Platform.iOS.FormsApplicationDe
return base.FinishedLaunching(app, options); return base.FinishedLaunching(app, options);
} }
}
} }

View File

@ -15,7 +15,7 @@
<MtouchEnableSGenConc>true</MtouchEnableSGenConc> <MtouchEnableSGenConc>true</MtouchEnableSGenConc>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<ProvisioningType>automatic</ProvisioningType> <ProvisioningType>automatic</ProvisioningType>
<LangVersion>10.0</LangVersion> <LangVersion>9.0</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -138,8 +138,8 @@
<Reference Include="System.Numerics.Vectors" /> <Reference Include="System.Numerics.Vectors" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2196" /> <PackageReference Include="Xamarin.Forms" Version="5.0.0.2337" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" /> <PackageReference Include="Xamarin.Essentials" Version="1.7.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<BundleResource Include="Resources\bars.png" /> <BundleResource Include="Resources\bars.png" />

View File

@ -1,9 +1,10 @@
namespace Billing.UI; namespace Billing.UI
public static partial class Definition
{ {
public static partial class Definition
{
public static partial string GetCascadiaRegularFontFamily() => "CascadiaCode-Regular"; public static partial string GetCascadiaRegularFontFamily() => "CascadiaCode-Regular";
public static partial string GetCascadiaBoldFontFamily() => "CascadiaCode-Bold"; public static partial string GetCascadiaBoldFontFamily() => "CascadiaCode-Bold";
public static partial string GetRobotoCondensedRegularFontFamily() => "RobotoCondensed-Regular"; public static partial string GetRobotoCondensedRegularFontFamily() => "RobotoCondensed-Regular";
public static partial string GetRobotoCondensedBoldFontFamily() => "RobotoCondensed-Bold"; public static partial string GetRobotoCondensedBoldFontFamily() => "RobotoCondensed-Bold";
}
} }

View File

@ -7,10 +7,10 @@ using Xamarin.Forms.Platform.iOS;
[assembly: ResolutionGroupName("Org.Tsanie")] [assembly: ResolutionGroupName("Org.Tsanie")]
[assembly: ExportEffect(typeof(ShadowEffectPlatform), nameof(ShadowEffect))] [assembly: ExportEffect(typeof(ShadowEffectPlatform), nameof(ShadowEffect))]
namespace Billing.iOS.Effects; namespace Billing.iOS.Effects
public class ShadowEffectPlatform : PlatformEffect
{ {
public class ShadowEffectPlatform : PlatformEffect
{
protected override void OnAttached() protected override void OnAttached()
{ {
try try
@ -40,4 +40,5 @@ public class ShadowEffectPlatform : PlatformEffect
layer.ShadowOpacity = 0; layer.ShadowOpacity = 0;
} }
} }
}
} }

View File

@ -1,9 +1,9 @@
using UIKit; using UIKit;
namespace Billing.iOS; namespace Billing.iOS
public class Application
{ {
public class Application
{
// This is the main entry point of the application. // This is the main entry point of the application.
static void Main(string[] args) static void Main(string[] args)
{ {
@ -11,4 +11,5 @@ public class Application
// you can specify it here. // you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate)); UIApplication.Main(args, null, typeof(AppDelegate));
} }
}
} }

View File

@ -4,10 +4,10 @@ using System.Diagnostics.CodeAnalysis;
using System.Globalization; using System.Globalization;
using System.Threading; using System.Threading;
namespace Billing.Languages; namespace Billing.Languages
public partial class PlatformCulture
{ {
public partial class PlatformCulture
{
public partial string GetNamespace() public partial string GetNamespace()
{ {
return typeof(AppDelegate).Namespace; return typeof(AppDelegate).Namespace;
@ -72,4 +72,5 @@ public partial class PlatformCulture
Helper.Debug($"iOS Language: {iOSLanguage}, .NET Language/Locale: {netLanguage}"); Helper.Debug($"iOS Language: {iOSLanguage}, .NET Language/Locale: {netLanguage}");
return netLanguage; return netLanguage;
} }
}
} }

View File

@ -5,10 +5,10 @@ using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS; using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer(typeof(LongPressButton), typeof(LongPressButtonRenderer))] [assembly: ExportRenderer(typeof(LongPressButton), typeof(LongPressButtonRenderer))]
namespace Billing.iOS.Renderers; namespace Billing.iOS.Renderers
public class LongPressButtonRenderer : ButtonRenderer
{ {
public class LongPressButtonRenderer : ButtonRenderer
{
private UILongPressGestureRecognizer longGesture; private UILongPressGestureRecognizer longGesture;
protected override void OnElementChanged(ElementChangedEventArgs<Button> e) protected override void OnElementChanged(ElementChangedEventArgs<Button> e)
@ -40,4 +40,5 @@ public class LongPressButtonRenderer : ButtonRenderer
button.TriggerLongPress(); button.TriggerLongPress();
} }
} }
}
} }

View File

@ -5,10 +5,10 @@ using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS; using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer(typeof(OptionEntry), typeof(OptionEntryRenderer))] [assembly: ExportRenderer(typeof(OptionEntry), typeof(OptionEntryRenderer))]
namespace Billing.iOS.Renderers; namespace Billing.iOS.Renderers
public class OptionEntryRenderer : EntryRenderer
{ {
public class OptionEntryRenderer : EntryRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e) protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
{ {
base.OnElementChanged(e); base.OnElementChanged(e);
@ -19,4 +19,5 @@ public class OptionEntryRenderer : EntryRenderer
control.BorderStyle = UITextBorderStyle.None; control.BorderStyle = UITextBorderStyle.None;
} }
} }
}
} }

View File

@ -5,10 +5,10 @@ using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS; using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer(typeof(TintImage), typeof(TintImageRenderer))] [assembly: ExportRenderer(typeof(TintImage), typeof(TintImageRenderer))]
namespace Billing.iOS.Renderers; namespace Billing.iOS.Renderers
public class TintImageRenderer : ImageRenderer
{ {
public class TintImageRenderer : ImageRenderer
{
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{ {
@ -28,4 +28,5 @@ public class TintImageRenderer : ImageRenderer
Control.TintColor = image.PrimaryColor?.ToUIColor(); Control.TintColor = image.PrimaryColor?.ToUIColor();
} }
} }
}
} }