diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.Tests/Xamarin.Neo4j.Tests.csproj b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.Tests/Xamarin.Neo4j.Tests.csproj index c59385b..62e118a 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.Tests/Xamarin.Neo4j.Tests.csproj +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.Tests/Xamarin.Neo4j.Tests.csproj @@ -1,15 +1,16 @@ - net48 + net10.0 + - + diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/AppDelegate.cs b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/AppDelegate.cs index aff1b9e..8b3600e 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/AppDelegate.cs +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/AppDelegate.cs @@ -1,31 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Linq; using Foundation; -using UIKit; +using Microsoft.Maui; +using Microsoft.Maui.Hosting; namespace Xamarin.Neo4j.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("AppDelegate")] - public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate + public class AppDelegate : MauiUIApplicationDelegate { - // - // 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 - // visible. - // - // You have 17 seconds to return from this method, or iOS will terminate your application. - // - public override bool FinishedLaunching(UIApplication app, NSDictionary options) - { - Forms.Forms.Init(); - - LoadApplication(new App()); - - return base.FinishedLaunching(app, options); - } + protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); } } diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/CustomRenderers/QueryEditorHandler.cs b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/CustomRenderers/QueryEditorHandler.cs new file mode 100644 index 0000000..94b6e29 --- /dev/null +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/CustomRenderers/QueryEditorHandler.cs @@ -0,0 +1,204 @@ +// +// QueryEditorHandler.cs +// +// Trevi Awater +// 13-01-2022 +// +// © Xamarin.Neo4j.iOS +// + +using System; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using CoreGraphics; +using Foundation; +using Microsoft.Maui.Controls; +using Microsoft.Maui.Handlers; +using Microsoft.Maui.Platform; +using UIKit; +using Xamarin.Neo4j.Controls; + +namespace Xamarin.Neo4j.iOS.CustomRenderers +{ + public class QueryEditorHandler : EditorHandler + { + private readonly string[] _keyWords = + [ + // Clauses + "CALL", "CREATE", "DELETE", "DETACH", "FOREACH", "LOAD", "MATCH", "MERGE", "OPTIONAL", "REMOVE", "RETURN", "SET", "START", "UNION", "UNWIND", "WITH", + + // Subclauses + "LIMIT", "ORDER", "SKIP", "WHERE", "YIELD", + + // Modifiers + "ASC", "ASCENDING", "ASSERT", "BY", "CSV", "DESC", "DESCENDING", "ON", + + // Expressions + "ALL", "CASE", "COUNT", "ELSE", "END", "EXISTS", "THEN", "WHEN", + + // Operators + "AND", "AS", "CONTAINS", "DISTINCT", "ENDS", "IN", "IS", "NOT", "OR", "STARTS", "XOR", + + // Schema + "CONSTRAINT", "CREATE", "DROP", "EXISTS", "INDEX", "NODE", "KEY", "UNIQUE", + + // Hints + "INDEX", "JOIN", "SCAN", "USING", + + // Literals + "FALSE", "NULL", "TRUE" + ]; + + protected override void ConnectHandler(MauiTextView platformView) + { + base.ConnectHandler(platformView); + + platformView.AutocorrectionType = UITextAutocorrectionType.No; + platformView.AutocapitalizationType = UITextAutocapitalizationType.None; + platformView.SpellCheckingType = UITextSpellCheckingType.No; + platformView.KeyboardType = UIKeyboardType.Default; + + const float accessoryHeight = 58f; + const float buttonWidth = 33f; + const float executeButtonWidth = 90f; + const float padding = 8f; + const float pillHeight = 38f; + + var keys = new[] + { + ("(", "("), (")", ")"), ("[", "["), ("]", "]"), + (":", ":"), ("-", "-"), ("\u2192", "->"), ("\u2190", "<-") + }; + + // Outer accessory — clear so system background shows through + var accessoryView = new UIView(new CGRect(0, 0, 0, accessoryHeight)); + accessoryView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth; + accessoryView.BackgroundColor = UIColor.Clear; + + // Pill container for scroll view + var pillContainer = new UIView(); + pillContainer.TranslatesAutoresizingMaskIntoConstraints = false; + pillContainer.BackgroundColor = UIColor.SystemBackground.ColorWithAlpha(0.9f); + pillContainer.Layer.CornerRadius = pillHeight / 2f; + pillContainer.Layer.MasksToBounds = true; + + var scrollView = new UIScrollView(); + scrollView.TranslatesAutoresizingMaskIntoConstraints = false; + scrollView.ShowsHorizontalScrollIndicator = false; + scrollView.ShowsVerticalScrollIndicator = false; + scrollView.Bounces = false; + scrollView.BackgroundColor = UIColor.Clear; + + var xOffset = 0f; + foreach (var (label, insertion) in keys) + { + var captured = insertion; + var btn = new UIButton(UIButtonType.System); + btn.SetTitle(label, UIControlState.Normal); + btn.Frame = new CGRect(xOffset, 0, buttonWidth, pillHeight); + btn.TouchUpInside += (s, e) => platformView.InsertText(captured); + scrollView.AddSubview(btn); + xOffset += buttonWidth; + } + + scrollView.ContentSize = new CGSize(xOffset, pillHeight); + pillContainer.AddSubview(scrollView); + + NSLayoutConstraint.ActivateConstraints(new[] + { + scrollView.LeadingAnchor.ConstraintEqualTo(pillContainer.LeadingAnchor), + scrollView.TrailingAnchor.ConstraintEqualTo(pillContainer.TrailingAnchor), + scrollView.TopAnchor.ConstraintEqualTo(pillContainer.TopAnchor), + scrollView.BottomAnchor.ConstraintEqualTo(pillContainer.BottomAnchor), + }); + + // Execute button — blue pill + var executeBtn = new UIButton(UIButtonType.System); + executeBtn.TranslatesAutoresizingMaskIntoConstraints = false; + executeBtn.SetTitle("Execute", UIControlState.Normal); + executeBtn.SetTitleColor(UIColor.White, UIControlState.Normal); + executeBtn.BackgroundColor = UIColor.SystemBlue; + executeBtn.Layer.CornerRadius = pillHeight / 2f; + executeBtn.Layer.MasksToBounds = true; + executeBtn.TouchUpInside += (s, e) => + { + if (VirtualView is QueryEditor queryEditor) + { + queryEditor.RaiseExecuteClicked(); + platformView.ResignFirstResponder(); + } + }; + + accessoryView.AddSubview(pillContainer); + accessoryView.AddSubview(executeBtn); + + NSLayoutConstraint.ActivateConstraints(new[] + { + executeBtn.TrailingAnchor.ConstraintEqualTo(accessoryView.TrailingAnchor, -padding), + executeBtn.CenterYAnchor.ConstraintEqualTo(accessoryView.CenterYAnchor), + executeBtn.HeightAnchor.ConstraintEqualTo(pillHeight), + executeBtn.WidthAnchor.ConstraintEqualTo(executeButtonWidth), + + pillContainer.LeadingAnchor.ConstraintEqualTo(accessoryView.LeadingAnchor, padding), + pillContainer.TrailingAnchor.ConstraintEqualTo(executeBtn.LeadingAnchor, -padding), + pillContainer.CenterYAnchor.ConstraintEqualTo(accessoryView.CenterYAnchor), + pillContainer.HeightAnchor.ConstraintEqualTo(pillHeight), + }); + + platformView.InputAccessoryView = accessoryView; + + platformView.Changed += (s, e) => HighlightWords(platformView, _keyWords); + + HighlightWords(platformView, _keyWords); + } + + private static void HighlightWords(UITextView platformView, IEnumerable wordsToHighlight) + { + var text = PreprocessText(platformView.Text ?? string.Empty); + var attributedText = new NSMutableAttributedString(text); + + foreach (var word in wordsToHighlight) + { + var regex = new Regex("\\b" + Regex.Escape(word) + "\\b", RegexOptions.IgnoreCase); + + foreach (Match match in regex.Matches(text)) + { + attributedText.AddAttribute(UIStringAttributeKey.ForegroundColor, + UIColor.FromRGBA(137 / 255f, 152 / 255f, 46 / 255f, 1f), + new NSRange(match.Index, match.Length)); + } + } + + ApplyQuoteTextColorFormatting(text, attributedText, "'(.*?)'", + UIColor.FromRGBA(174 / 255f, 139 / 255f, 45 / 255f, 1f)); + + ApplyQuoteTextColorFormatting(text, attributedText, "\"(.*?)\"", + UIColor.FromRGBA(174 / 255f, 139 / 255f, 45 / 255f, 1f)); + + var cursorPosition = platformView.SelectedRange; + platformView.AttributedText = attributedText; + platformView.SelectedRange = cursorPosition; + } + + private static void ApplyQuoteTextColorFormatting(string text, NSMutableAttributedString attributedText, + string quotePattern, UIColor color) + { + var quoteRegex = new Regex(quotePattern); + + foreach (Match match in quoteRegex.Matches(text)) + { + attributedText.AddAttribute(UIStringAttributeKey.ForegroundColor, color, + new NSRange(match.Index, match.Length)); + } + } + + private static string PreprocessText(string text) + { + text = text.Replace("\u2018", "'"); + text = text.Replace("\u2019", "'"); + text = text.Replace("\u201c", "\""); + text = text.Replace("\u201d", "\""); + return text; + } + } +} diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/CustomRenderers/QueryEditorRenderer.cs b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/CustomRenderers/QueryEditorRenderer.cs deleted file mode 100644 index 3c52174..0000000 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/CustomRenderers/QueryEditorRenderer.cs +++ /dev/null @@ -1,165 +0,0 @@ -// -// QueryEditorRenderer.cs -// -// Trevi Awater -// 13-01-2022 -// -// © Xamarin.Neo4j.iOS -// - -using System; -using System.Collections.Generic; -using System.Text.RegularExpressions; -using CoreGraphics; -using Foundation; -using UIKit; -using Xamarin.Forms; -using Xamarin.Forms.Platform.iOS; -using Xamarin.Neo4j.Controls; -using Xamarin.Neo4j.iOS.CustomRenderers; - -[assembly: ExportRenderer(typeof(QueryEditor), typeof(QueryEditorRenderer))] -namespace Xamarin.Neo4j.iOS.CustomRenderers -{ - public class QueryEditorRenderer : EditorRenderer - { - private readonly string[] _keyWords = - { - // Clauses - "CALL", "CREATE", "DELETE", "DETACH", "FOREACH", "LOAD", "MATCH", "MERGE", "OPTIONAL", "REMOVE", "RETURN", "SET", "START", "UNION", "UNWIND", "WITH", - - // Subclauses - "LIMIT", "ORDER", "SKIP", "WHERE", "YIELD", - - // Modifiers - "ASC", "ASCENDING", "ASSERT", "BY", "CSV", "DESC", "DESCENDING", "ON", - - // Expressions - "ALL", "CASE", "COUNT", "ELSE", "END", "EXISTS", "THEN", "WHEN", - - // Operators - "AND", "AS", "CONTAINS", "DISTINCT", "ENDS", "IN", "IS", "NOT", "OR", "STARTS", "XOR", - - // Schema - "CONSTRAINT", "CREATE", "DROP", "EXISTS", "INDEX", "NODE", "KEY", "UNIQUE", - - // Hints - "INDEX", "JOIN", "SCAN", "USING", - - // Literals - "FALSE", "NULL", "TRUE" - }; - - protected override void OnElementChanged(ElementChangedEventArgs e) - { - base.OnElementChanged(e); - - if (e.NewElement != null) - { - Element.TextChanged += (sender, args) => - { - HighlightWords(_keyWords); - }; - } - - if (Control != null && Element != null) - { - Control.AutocorrectionType = UITextAutocorrectionType.No; - Control.AutocapitalizationType = UITextAutocapitalizationType.None; - Control.SpellCheckingType = UITextSpellCheckingType.No; - Control.KeyboardType = UIKeyboardType.Default; - - var executeButton = new UIBarButtonItem("Execute", UIBarButtonItemStyle.Done, (sender, args) => - { - if (Element is QueryEditor queryEditor) - { - queryEditor.RaiseExecuteClicked(); - - Control.ResignFirstResponder(); - } - }); - - var keyButtons = new[] - { - new UIBarButtonItem("(", UIBarButtonItemStyle.Plain, (sender, args) => InsertText("(")), - new UIBarButtonItem(")", UIBarButtonItemStyle.Plain, (sender, args) => InsertText(")")), - new UIBarButtonItem("[", UIBarButtonItemStyle.Plain, (sender, args) => InsertText("[")), - new UIBarButtonItem("]", UIBarButtonItemStyle.Plain, (sender, args) => InsertText("]")), - new UIBarButtonItem(":", UIBarButtonItemStyle.Plain, (sender, args) => InsertText(":")), - new UIBarButtonItem("-", UIBarButtonItemStyle.Plain, (sender, args) => InsertText("-")), - new UIBarButtonItem("\u2192", UIBarButtonItemStyle.Plain, (sender, args) => InsertText("->")), - new UIBarButtonItem("\u2190", UIBarButtonItemStyle.Plain, (sender, args) => InsertText("<-")), - - new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), - - executeButton - }; - - var toolbar = new UIToolbar(new CGRect(0.0f, 0.0f, Control.Frame.Size.Width, 44.0f)); - toolbar.Items = keyButtons; - - Control.InputAccessoryView = toolbar; - - HighlightWords(_keyWords); - } - } - - private void HighlightWords(IEnumerable wordsToHighlight) - { - var text = PreprocessText(Control.Text); - var attributedText = new NSMutableAttributedString(text); - - // Iterate through the array and apply formatting to the editor's text. - foreach (var word in wordsToHighlight) - { - var regex = new Regex("\\b" + Regex.Escape(word) + "\\b", RegexOptions.IgnoreCase); - - foreach (Match match in regex.Matches(text)) - { - attributedText.AddAttribute(UIStringAttributeKey.ForegroundColor, Color.FromHex("#89982e").ToUIColor(), - new NSRange(match.Index, match.Length)); - } - } - - // Apply text color formatting for text inside single quotes. - ApplyQuoteTextColorFormatting(text, attributedText, "'(.*?)'", Color.FromHex("#ae8b2d").ToUIColor()); - - // Apply text color formatting for text inside double quotes. - ApplyQuoteTextColorFormatting(text, attributedText, "\"(.*?)\"", Color.FromHex("#ae8b2d").ToUIColor()); - - attributedText.AddAttribute(UIStringAttributeKey.Font, UIFont.FromName("Roboto Mono", (nfloat) Element.FontSize), new NSRange(0, attributedText.Length)); - - Control.AttributedText = attributedText; - } - - private void InsertText(string text) - { - Control.InsertText(text); - } - - private static void ApplyQuoteTextColorFormatting(string text, NSMutableAttributedString attributedText, - string quotePattern, UIColor color) - { - var quoteRegex = new Regex(quotePattern); - - foreach (Match match in quoteRegex.Matches(text)) - { - attributedText.AddAttribute(UIStringAttributeKey.ForegroundColor, color, - new NSRange(match.Index, match.Length)); - } - } - - private static string PreprocessText(string text) - { - // Replace single quotation marks and their curly variants with: ' - text = text.Replace("‘", "'"); - text = text.Replace("’", "'"); - - // Replace double quotation marks and their curly variants with: " - text = text.Replace("“", "\""); - text = text.Replace("”", "\""); - - return text; - } - } -} diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Info.plist b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Info.plist index cb4d7df..b769bfd 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Info.plist +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Info.plist @@ -29,7 +29,7 @@ CFBundleVersion 5 CFBundleShortVersionString - 1.1.0 + 2.0.0 UILaunchStoryboardName LaunchScreen CFBundleName diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/MauiProgram.cs b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/MauiProgram.cs new file mode 100644 index 0000000..b3f09f6 --- /dev/null +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/MauiProgram.cs @@ -0,0 +1,38 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Maui.Controls.Hosting; +using Microsoft.Maui.Hosting; +using Xamarin.Neo4j.iOS.CustomRenderers; +using Xamarin.Neo4j.iOS.Services; +using Xamarin.Neo4j.Services; +using Xamarin.Neo4j.Services.Interfaces; + +namespace Xamarin.Neo4j.iOS +{ + public static class MauiProgram + { + public static MauiApp CreateMauiApp() + { + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .ConfigureFonts(fonts => + { + fonts.AddFont("iconize-fontawesome-brands.ttf", "FontAwesome5Brands-Regular"); + fonts.AddFont("iconize-fontawesome-solid.ttf", "FontAwesome5Free-Solid"); + fonts.AddFont("iconize-fontawesome-regular.ttf", "FontAwesome5Free-Regular"); + fonts.AddFont("roboto-mono-regular.ttf", "RobotoMono"); + }) + .ConfigureMauiHandlers(handlers => + { + handlers.AddHandler(); + }); + + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); + + return builder.Build(); + } + } +} diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Services/ScreenSizeService.cs b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Services/ScreenSizeService.cs index 91d137a..4d705c9 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Services/ScreenSizeService.cs +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Services/ScreenSizeService.cs @@ -7,10 +7,9 @@ // © Xamarin.Neo4j.iOS // +using Microsoft.Maui.Controls; using UIKit; -using Xamarin.Forms; using Xamarin.Neo4j.iOS.Services; -using Xamarin.Neo4j.Services; using Xamarin.Neo4j.Services.Interfaces; [assembly: Dependency(typeof(ScreenSizeService))] diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Services/TrustManagerService.cs b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Services/TrustManagerService.cs index e263687..8f2002e 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Services/TrustManagerService.cs +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Services/TrustManagerService.cs @@ -7,10 +7,9 @@ // © Xamarin.Neo4j.iOS // +using Microsoft.Maui.Controls; using Neo4j.Driver; -using Xamarin.Forms; using Xamarin.Neo4j.iOS.Services; -using Xamarin.Neo4j.Services; using Xamarin.Neo4j.Services.Interfaces; [assembly: Dependency(typeof(TrustManagerService))] diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Services/VersionService.cs b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Services/VersionService.cs index dab2275..6c361f1 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Services/VersionService.cs +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Services/VersionService.cs @@ -8,7 +8,7 @@ // using Foundation; -using Xamarin.Forms; +using Microsoft.Maui.Controls; using Xamarin.Neo4j.iOS.Services; using Xamarin.Neo4j.Services.Interfaces; diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Xamarin.Neo4j.iOS.csproj b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Xamarin.Neo4j.iOS.csproj index 67d179f..4aff079 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Xamarin.Neo4j.iOS.csproj +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.iOS/Xamarin.Neo4j.iOS.csproj @@ -1,158 +1,36 @@ - - + + - Debug - iPhoneSimulator - 8.0.30703 - 2.0 - {544E1297-4171-4B91-8AF4-4CD5CFD18A04} - {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + net10.0-ios Exe - Xamarin.Neo4j.iOS - Resources + true Xamarin.Neo4j.iOS + nl.resoftware.pocketgraph + PocketGraph NSUrlSessionHandler + 14.2 + false - - true - full - false - bin\iPhoneSimulator\Debug - DEBUG - prompt - 4 - false - x86_64 - None - true - Entitlements.plist - iPhone Developer - - - none - true - bin\iPhoneSimulator\Release - prompt - 4 - None - x86_64 - false - iPhone Developer - - - true - full - false - bin\iPhone\Debug - DEBUG - prompt - 4 - false - ARM64 - iPhone Developer - true - Entitlements.plist - SdkOnly - - - none - true - bin\iPhone\Release - prompt - 4 - ARM64 - false - iPhone Developer - Entitlements.plist - SdkOnly - - - none - True - bin\iPhone\Ad-Hoc - prompt - 4 - False - ARM64 - True - Automatic:AdHoc - iPhone Distribution - Entitlements.plist - SdkOnly - - - none - True - bin\iPhone\AppStore - prompt - 4 - False - ARM64 - Automatic:AppStore - iPhone Distribution - Entitlements.plist - SdkOnly - + - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - false - + + - - - - + + + + + + + - + - - - - - - - - - - - - - {756232d0-dbb0-4aeb-b1cf-1f5ca12cac85} - Xamarin.Neo4j - - - - \ No newline at end of file + + diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/App.xaml b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/App.xaml index 9ef1bfc..1caf768 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/App.xaml +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/App.xaml @@ -1,5 +1,5 @@  - diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/App.xaml.cs b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/App.xaml.cs index 618c42f..0b14e8e 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/App.xaml.cs +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/App.xaml.cs @@ -1,6 +1,6 @@ -using System; -using Xamarin.Forms; -using Xamarin.Forms.Xaml; +using Microsoft.Maui.ApplicationModel; +using Microsoft.Maui.Controls; +using Microsoft.Maui.Controls.Xaml; using Xamarin.Neo4j.Pages; using Xamarin.Neo4j.Themes; @@ -19,32 +19,27 @@ namespace Xamarin.Neo4j MainPage = new NavigationPage(new RootPage()); } - - private void SetTheme(OSAppTheme theme) + private void SetTheme(AppTheme theme) { Resources = theme switch { - OSAppTheme.Dark => new DarkTheme(), - OSAppTheme.Light => new LightTheme(), + AppTheme.Dark => new DarkTheme(), + AppTheme.Light => new LightTheme(), _ => new LightTheme() }; } - protected override void OnStart() { - // Handle when your app starts } protected override void OnSleep() { - // Handle when your app sleeps } protected override void OnResume() { - // Handle when your app resumes } } } diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Controls/ConnectionCell.xaml b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Controls/ConnectionCell.xaml index 53a88c0..55315c8 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Controls/ConnectionCell.xaml +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Controls/ConnectionCell.xaml @@ -1,6 +1,6 @@ - diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Controls/ConnectionCell.xaml.cs b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Controls/ConnectionCell.xaml.cs index 3aa7cb7..3ddb2d8 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Controls/ConnectionCell.xaml.cs +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Controls/ConnectionCell.xaml.cs @@ -4,8 +4,8 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using Xamarin.Forms; -using Xamarin.Forms.Xaml; +using Microsoft.Maui.Controls; +using Microsoft.Maui.Controls.Xaml; namespace Xamarin.Neo4j.Controls { diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Controls/LicenseCell.xaml b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Controls/LicenseCell.xaml index 719e28d..2192cfc 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Controls/LicenseCell.xaml +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j/Controls/LicenseCell.xaml @@ -1,5 +1,5 @@ - +