mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 08:34:55 +00:00
ed6a98389f
- IDialogHandler.OnFileDialog add new extensions and descriptions arguments (Breaking Change) Resolves #4838
21 lines
800 B
C#
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;
|
|
}
|
|
}
|
|
}
|