2018-09-10 02:41:13 +02:00
|
|
|
// Copyright © 2014 The CefSharp Authors. All rights reserved.
|
2015-03-18 11:13:49 +10:00
|
|
|
//
|
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
2014-06-02 16:36:14 +10:00
|
|
|
using System.IO;
|
2022-05-17 19:51:08 +10:00
|
|
|
using CefSharp.Handler;
|
2014-06-02 16:36:14 +10:00
|
|
|
|
2018-10-29 16:21:42 +10:00
|
|
|
namespace CefSharp.Example.Handlers
|
2014-06-02 16:36:14 +10:00
|
|
|
{
|
2022-05-17 19:51:08 +10:00
|
|
|
public class TempFileDialogHandler : DialogHandler
|
2014-06-03 00:25:37 +10:00
|
|
|
{
|
2022-05-17 19:51:08 +10:00
|
|
|
protected override bool OnFileDialog(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, IFileDialogCallback callback)
|
2014-06-03 00:25:37 +10:00
|
|
|
{
|
2022-05-17 19:51:08 +10:00
|
|
|
callback.Continue(new List<string> { Path.GetRandomFileName() });
|
2018-02-18 22:12:59 +01:00
|
|
|
|
2014-06-03 00:25:37 +10:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-06-02 16:36:14 +10:00
|
|
|
}
|