1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2024-11-23 17:42:46 +01:00
TweetDuck/windows/TweetImpl.CefSharp/Adapters/CefFileDialogCallbackAdapter.cs

24 lines
643 B
C#

using System.Linq;
using CefSharp;
using TweetLib.Browser.CEF.Interfaces;
namespace TweetImpl.CefSharp.Adapters {
sealed class CefFileDialogCallbackAdapter : IFileDialogCallbackAdapter<IFileDialogCallback> {
public static CefFileDialogCallbackAdapter Instance { get; } = new ();
private CefFileDialogCallbackAdapter() {}
public void Continue(IFileDialogCallback callback, int selectedAcceptFilter, string[] filePaths) {
callback.Continue(filePaths.ToList());
}
public void Cancel(IFileDialogCallback callback) {
callback.Cancel();
}
public void Dispose(IFileDialogCallback callback) {
callback.Dispose();
}
}
}