Skip to content

Commit

Permalink
mac close
Browse files Browse the repository at this point in the history
  • Loading branch information
Narazaka committed Dec 17, 2019
1 parent 5c9f982 commit db4718d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions seedtable-egui/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
RestorePersonalFormValues();
}

[JSInvokable]
public static void OnClose() {
ElectronNET.API.Electron.App.Quit();
}

void EndLog() {
LogWindow = false;
}
Expand Down
4 changes: 4 additions & 0 deletions seedtable-egui/Pages/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
function showErrorBox(title, content) {
return dialog.showErrorBox(title || undefined, content || undefined);
}
win().on('close', function(e) {
DotNet.invokeMethodAsync("seedtable-egui", "OnClose");
});
</script>
</head>
<body>
Expand Down

0 comments on commit db4718d

Please sign in to comment.