rebuild project

This commit is contained in:
zhandouxiaojiji committed 2020-10-14 11:39:13 +08:00
1 parent 69a284cc16
commit 84e1e376b9
9 files changed
+8 -7

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
import { app, BrowserWindow, Menu, MenuItem, dialog, nativeTheme } from 'electron';
import {initMenu} from './AppMenu'
let mainWindow: BrowserWindow = null;
nativeTheme.themeSource = 'dark';
let createWindow = function () {
mainWindow = new BrowserWindow({
width: 1280,
height: 800,
webPreferences: {
nodeIntegration: true
}
// fullscreenable:false,
// maximizable:false
});
// mainWindow.webContents.openDevTools();
mainWindow.loadFile('index.html');
mainWindow.on('closed', function () {
mainWindow = null
});
initMenu(mainWindow);
}
app.on('ready', createWindow)
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
if (mainWindow === null) {
createWindow()
}
});