Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ITAgnesmeyer committed Oct 6, 2023
1 parent 94b41fb commit 6318356
Show file tree
Hide file tree
Showing 9 changed files with 563 additions and 467 deletions.
92 changes: 8 additions & 84 deletions BrowseForFileAndFolder/BrowseForFileAndFolder.csproj
Original file line number Diff line number Diff line change
@@ -1,96 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{74EA2D69-AF51-4BC9-A531-335219379E2A}</ProjectGuid>
<TargetFramework>net472</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace>BrowseForFileAndFolder</RootNamespace>
<AssemblyName>BrowseForFileAndFolder</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="CoreWindowsWrapper, Version=2.0.3.0, Culture=neutral, PublicKeyToken=e492a3b3f6b0a798, processorArchitecture=MSIL">
<HintPath>..\packages\CoreWindowsWrapper.2.0.3\lib\net472\CoreWindowsWrapper.dll</HintPath>
</Reference>
<Reference Include="Diga.Core.Api.Win32, Version=2.0.6.0, Culture=neutral, PublicKeyToken=195159b462588500, processorArchitecture=MSIL">
<HintPath>..\packages\Diga.Core.Api.Win32.2.0.6\lib\net472\Diga.Core.Api.Win32.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainWindow.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<PackageReference Include="CoreWindowsWrapper" Version="2.0.4" />
<PackageReference Include="Diga.Core.Api.Win32" Version="2.0.7" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,53 @@
<PackageReleaseNotes>WebBrowserControl build with WebView2 and CoreWindowsWrapper</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<AssemblyName>Diga.NativeControls.WebBrowser</AssemblyName>
<AssemblyVersion>1.1.24</AssemblyVersion>
<FileVersion>1.1.24</FileVersion>
<AssemblyVersion>1.1.25</AssemblyVersion>
<FileVersion>1.1.25</FileVersion>
<PackageProjectUrl>https://github.com/ITAgnesmeyer/WebAssemblyViewer</PackageProjectUrl>
<RepositoryUrl>https://github.com/ITAgnesmeyer/Diga.NativeControls</RepositoryUrl>
<version>1.1.24</version>
<version>1.1.25</version>
<PackageIcon>logo.png</PackageIcon>
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net4.7.2|AnyCPU'">
<NoWarn>1701;1702;CA1416</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0|AnyCPU'">
<NoWarn>1701;1702;CA1416</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0|AnyCPU'">
<NoWarn>1701;1702;CA1416</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net4.7.2|AnyCPU'">
<NoWarn>1701;1702;CA1416</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0|AnyCPU'">
<NoWarn>1701;1702;CA1416</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0|AnyCPU'">
<NoWarn>1701;1702;CA1416</NoWarn>
</PropertyGroup>



<ItemGroup>
<None Include="logo.png" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CoreWindowsWrapper" Version="2.0.3" />
<PackageReference Include="Diga.Core.Api.Win32" Version="2.0.6" />
<PackageReference Include="CoreWindowsWrapper" Version="2.0.4" />
<PackageReference Include="Diga.Core.Api.Win32" Version="2.0.7" />
<PackageReference Include="Diga.Core.Json" Version="1.0.2" />
<PackageReference Include="Diga.Core.Threading" Version="1.0.6" />
<PackageReference Include="Diga.WebView2.Scripting" Version="1.20.3" />
<PackageReference Include="Diga.WebView2.Wrapper" Version="20.1.1" />
<PackageReference Include="Diga.Core.Threading" Version="1.0.11" />
<PackageReference Include="Diga.WebView2.Monitoring" Version="1.20.4" />
<PackageReference Include="Diga.WebView2.Scripting" Version="1.20.5" />
<PackageReference Include="Diga.WebView2.Wrapper" Version="20.1.4" />
<PackageReference Include="MimeTypeExtension" Version="1.0.29" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
</ItemGroup>
Expand Down
24 changes: 23 additions & 1 deletion Diga.NativeControls.WebBrowser.Core/NativeWebBrowser.Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,33 @@ protected virtual void OnFrameNavigationCompleted(NavigationCompletedEventArgs e
FrameNavigationCompleted?.Invoke(this, e);
}

private static void BeforeProcessExitCatch(object sender, EventArgs e)
{
Debug.Print("BeforeProcessExitCatch");
DateTime n = DateTime.Now;
DateTime x = DateTime.Now;
TimeSpan diff = x - n;
while (diff.Seconds < 5)
{
UIDispatcher.UIThread.DoEvents();
x = DateTime.Now;
diff = x - n;
}
}
protected virtual void OnBeforeWebViewDestroy()
{
try
{
BeforeWebViewDestroy?.Invoke(this, EventArgs.Empty);
ControlCounter--;
if (ControlCounter <= 0)
{
//UIDispatcher.Wait(5000);
#if !NETCOREAPP3_1_OR_GREATER
//AppDomain.CurrentDomain.ProcessExit += BeforeProcessExitCatch;
#endif
UIDispatcher.FilnalDisposed = true;
}
}
catch (Exception ex)
{
Expand Down Expand Up @@ -310,7 +332,7 @@ protected virtual void OnDomContentLoaded(DOMContentLoadedEventArgs e)
protected virtual void OnWebResourceResponseReceived(WebResourceResponseReceivedEventArgs e)
{
WebResourceResponseReceived?.Invoke(this, e);
CleanUpResponses(e);
//CleanUpResponses(e);
}


Expand Down
Loading

0 comments on commit 6318356

Please sign in to comment.