mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-13 13:44:57 +00:00
46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width" />
|
|
</head>
|
|
<body>
|
|
<h3>Hello from ASP.NET Core MVC!</h3>
|
|
|
|
We are using node
|
|
<script>document.write(process.versions.node)</script>,
|
|
Chrome
|
|
<script>document.write(process.versions.chrome)</script>,
|
|
and Electron
|
|
<script>document.write(process.versions.electron)</script>.
|
|
<br /><br />
|
|
<input id="callButton" type="button" value="Call Notification" />
|
|
|
|
<div>
|
|
<p id="picturesPathLabel"></p>
|
|
<input id="picturesButton" type="button" value="Get Pictures-Path" />
|
|
</div>
|
|
|
|
<script>
|
|
const { ipcRenderer } = require("electron");
|
|
|
|
document.getElementById("callButton").addEventListener("click", () => {
|
|
ipcRenderer.send("SayHello");
|
|
});
|
|
|
|
ipcRenderer.on("Goodbye", (sender, data) => {
|
|
alert('Goodbye ' + data);
|
|
});
|
|
|
|
document.getElementById("picturesButton").addEventListener("click", () => {
|
|
ipcRenderer.send("GetPath");
|
|
});
|
|
|
|
ipcRenderer.on("GetPathComplete", (sender, data) => {
|
|
document.getElementById("picturesPathLabel").innerText = data;
|
|
});
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|