From 824833865171ad507ffc894ebd0d33243fb9d0b3 Mon Sep 17 00:00:00 2001 From: Philipp Bauer Date: Sat, 21 Jan 2023 17:20:33 -0600 Subject: [PATCH 1/3] Implement ClearBrowserAutoFill as Windows only solution See: https://github.com/tryphotino/photino.NET/issues/116 --- Photino.NET/PhotinoDllImports.cs | 3 ++- Photino.NET/PhotinoWindow.NET.cs | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Photino.NET/PhotinoDllImports.cs b/Photino.NET/PhotinoDllImports.cs index da7ebea..d8c537a 100644 --- a/Photino.NET/PhotinoDllImports.cs +++ b/Photino.NET/PhotinoDllImports.cs @@ -48,7 +48,7 @@ public partial class PhotinoWindow //SET - [DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true, CharSet = CharSet.Auto)] static extern void Photino_setWebView2RuntimePath_win32 (IntPtr instance, string webView2RuntimePath); + [DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true, CharSet = CharSet.Auto)] static extern void Photino_setWebView2RuntimePath_win32(IntPtr instance, string webView2RuntimePath); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] static extern void Photino_SetContextMenuEnabled(IntPtr instance, bool enabled); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] static extern void Photino_SetDevToolsEnabled(IntPtr instance, bool enabled); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] static extern void Photino_SetFullScreen(IntPtr instance, bool fullScreen); @@ -66,6 +66,7 @@ public partial class PhotinoWindow //MISC [DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] static extern void Photino_Center(IntPtr instance); + [DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true)] static extern void Photino_ClearBrowserAutoFill(IntPtr instance); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true, CharSet = CharSet.Auto)] static extern void Photino_SendWebMessage(IntPtr instance, string message); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true, CharSet = CharSet.Auto)] static extern void Photino_ShowMessage(IntPtr instance, string title, string body, uint type); [DllImport(DllName, CallingConvention = CallingConvention.Cdecl, SetLastError = true, CharSet = CharSet.Auto)] static extern void Photino_ShowNotification(IntPtr instance, string title, string body); diff --git a/Photino.NET/PhotinoWindow.NET.cs b/Photino.NET/PhotinoWindow.NET.cs index 61e8438..befcb41 100644 --- a/Photino.NET/PhotinoWindow.NET.cs +++ b/Photino.NET/PhotinoWindow.NET.cs @@ -1196,6 +1196,16 @@ public PhotinoWindow Win32SetWebView2Path(string data) return this; } + public PhotinoWindow ClearBrowserAutoFill() + { + if (IsWindowsPlatform) + Invoke(() => Photino_ClearBrowserAutoFill(_nativeInstance)); + else + Log("ClearBrowserAutoFill is only supported on the Windows platform"); + + return this; + } + //NON-FLUENT METHODS - CAN ONLY BE CALLED AFTER WINDOW IS INITIALIZED //ONE OF THESE 2 METHODS *MUST* BE CALLED TO CREATE THE WINDOW From 0e63e3817971733c8e7b0c9ac92b0fd4dbfb6139 Mon Sep 17 00:00:00 2001 From: Mike Yeager Date: Fri, 3 Feb 2023 14:53:26 -0700 Subject: [PATCH 2/3] Ignore launchSettings.json --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3ef4368..e66c0b6 100644 --- a/.gitignore +++ b/.gitignore @@ -340,4 +340,5 @@ ASALocalRun/ healthchecksdb .vscode -.DS_Store \ No newline at end of file +.DS_Store +/Photino.NET/Properties/launchSettings.json From d4f3cc781304d9a76f212888b89086b9d539ecd0 Mon Sep 17 00:00:00 2001 From: Mike Yeager Date: Fri, 3 Feb 2023 14:58:10 -0700 Subject: [PATCH 3/3] Updated to latest .Native. Changed version to 2.3. Added method for clearing browser auto-fill. --- Photino.NET/Photino.NET.csproj | 2 +- azure-pipelines-photino.net-prod.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Photino.NET/Photino.NET.csproj b/Photino.NET/Photino.NET.csproj index 02ee49d..8e01385 100644 --- a/Photino.NET/Photino.NET.csproj +++ b/Photino.NET/Photino.NET.csproj @@ -29,7 +29,7 @@ - + diff --git a/azure-pipelines-photino.net-prod.yml b/azure-pipelines-photino.net-prod.yml index 69dc88f..8a08bf1 100644 --- a/azure-pipelines-photino.net-prod.yml +++ b/azure-pipelines-photino.net-prod.yml @@ -6,7 +6,7 @@ trigger: variables: major: 2 - minor: 2 + minor: 3 patch: $[counter(variables['minor'], 0)] #this will reset when we bump minor buildConfiguration: 'Release'