Skip to content

Feat/file dialog handler #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Feat/file dialog handler #1

wants to merge 5 commits into from

Conversation

yy-2020
Copy link
Collaborator

@yy-2020 yy-2020 commented Jan 25, 2023

No description provided.

@@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net462</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not necessary

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -1064,6 +1064,8 @@ public IChromiumWebBrowser WebBrowser
set { SetValue(WebBrowserProperty, value); }
}

Handler.IDialogHandler IChromiumWebBrowser.DialogHandler { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no exception, just auto property

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -121,6 +121,8 @@ public IDevToolsContext DevToolsContext
/// <inheritdoc/>
public Frame MainFrame => _devToolsContext == null ? null : _devToolsContext.MainFrame;

Handler.IDialogHandler IChromiumWebBrowser.DialogHandler { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use auto property

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PlatformTarget>AnyCPU</PlatformTarget>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not necessary

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sicher?

@@ -10,7 +11,6 @@
<PackageReference Include="PInvoke.User32" Version="0.7.104" />
<PackageReference Include="StreamJsonRpc" Version="2.11.35" />
<ProjectReference Include="..\CefSharp.OutOfProcess.Interface\CefSharp.OutOfProcess.Interface.csproj" />

<ProjectReference Include="..\CefSharp.Dom\lib\PuppeteerSharp\CefSharp.Dom.OutOfProcess.csproj" />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing line :)

@@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net462</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

{
if (disposing)
{
// TODO: dispose managed state (managed objects)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove todos?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


void IDisposable.Dispose()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Sebbstar
Copy link
Owner

let's try out using devtools

        private void WaitForFile()
        {
            _devToolsContext.WaitForFileChooserAsync(new WaitForFileChooserOptions() { Timeout = 0 }).ContinueWith(async t =>
            {
                FileChooser filec = t.Result;

                // retrieve accept value
                // show our WPF filedialog
                // return dialogs result
                await filec.AcceptAsync(@"C:\_dev\trumpf\file.html");

                WaitForFile();
            });
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants