-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
37 lines (28 loc) · 849 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const { app, BrowserWindow, Menu } = require('electron');
let mainWindow;
const path = require('path');
const iconPath = path.join(__dirname, 'Resource', 'SkyIcon.png');
function createWindow() {
mainWindow = new BrowserWindow({
width: 700,
height: 566,
resizable: false, // Desabilita a capacidade de redimensionar a janela
icon: iconPath,
webPreferences: {
nodeIntegration: true
}
});
mainWindow.loadFile('index.html');
// Remover a barra de menus
Menu.setApplicationMenu(null);
mainWindow.on('closed', function () {
mainWindow = null;
});
}
app.whenReady().then(createWindow);
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') app.quit();
});
app.on('activate', function () {
if (mainWindow === null) createWindow();
});