const {
app
, BrowserWindow
, Menu
, Tray
, shell
, dialog
, ipcMain
} = require('electron')
var parseCommand = function() {
dialog.showMessageBox({
title : '错误'
, type : 'error'
, message : '此文件没有跟 OnceDoc 绑定'
})
}
var initApp = function() {
parseCommand()
}
app.on('ready', initApp)
参考资料:http://www.jb51.net/article/113856.htm