mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-17 13:45:34 +00:00
Update to the native Electron 9.0.0 - Update electron-updater 4.3.1 - Update Changelog
This commit is contained in:
@@ -63,18 +63,18 @@ namespace ElectronNET.API
|
||||
/// </summary>
|
||||
/// <param name="fullPath"></param>
|
||||
/// <returns>Whether the item was successfully opened.</returns>
|
||||
public Task<bool> OpenItemAsync(string fullPath)
|
||||
public Task<bool> OpenPathAsync(string fullPath)
|
||||
{
|
||||
var taskCompletionSource = new TaskCompletionSource<bool>();
|
||||
|
||||
BridgeConnector.Socket.On("shell-openItemCompleted", (success) =>
|
||||
BridgeConnector.Socket.On("shell-openPathCompleted", (success) =>
|
||||
{
|
||||
BridgeConnector.Socket.Off("shell-openItemCompleted");
|
||||
BridgeConnector.Socket.Off("shell-openPathCompleted");
|
||||
|
||||
taskCompletionSource.SetResult((bool)success);
|
||||
});
|
||||
|
||||
BridgeConnector.Socket.Emit("shell-openItem", fullPath);
|
||||
BridgeConnector.Socket.Emit("shell-openPath", fullPath);
|
||||
|
||||
return taskCompletionSource.Task;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user