2016-01-11 14:11:30 +10:00
|
|
|
// Copyright © 2010-2016 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;
|
|
|
|
|
|
|
|
|
|
namespace CefSharp.Example
|
|
|
|
|
{
|
2014-06-03 00:25:37 +10:00
|
|
|
public class TempFileDialogHandler : IDialogHandler
|
|
|
|
|
{
|
2015-06-11 09:45:55 +10:00
|
|
|
public bool OnFileDialog(IWebBrowser browserControl, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, int selectedAcceptFilter, IFileDialogCallback callback)
|
2014-06-03 00:25:37 +10:00
|
|
|
{
|
2015-06-01 16:27:42 +10:00
|
|
|
callback.Continue(selectedAcceptFilter, new List<string> { Path.GetRandomFileName() });
|
|
|
|
|
|
2014-06-03 00:25:37 +10:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-06-02 16:36:14 +10:00
|
|
|
}
|