Files
cefsharp/CefSharp.Example/Handlers/TempFileDialogHandler.cs
Alex Maitland ed6a98389f Upgrade to 126.1.14+g2be337f+chromium-126.0.6478.57 / Chromium 126.0.6478.57
- IDialogHandler.OnFileDialog add new extensions and descriptions arguments (Breaking Change)

Resolves #4838
2024-06-16 08:32:50 +10:00

21 lines
800 B
C#

// Copyright © 2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System.Collections.Generic;
using System.IO;
using CefSharp.Handler;
namespace CefSharp.Example.Handlers
{
public class TempFileDialogHandler : DialogHandler
{
protected override bool OnFileDialog(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, IReadOnlyCollection<string> acceptFilters, IReadOnlyCollection<string> acceptExtensions, IReadOnlyCollection<string> acceptDescriptions, IFileDialogCallback callback)
{
callback.Continue(new List<string> { Path.GetRandomFileName() });
return true;
}
}
}