|
@@ -35,6 +35,7 @@ function createWindow() {
|
|
|
mainWindow.on('closed', function () {
|
|
mainWindow.on('closed', function () {
|
|
|
mainWindow = null
|
|
mainWindow = null
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
newBrowserWindow = new BrowserWindow({
|
|
newBrowserWindow = new BrowserWindow({
|
|
|
width: 800,
|
|
width: 800,
|
|
|
frame: false
|
|
frame: false
|
|
@@ -44,7 +45,12 @@ function createWindow() {
|
|
|
protocol: 'file:',
|
|
protocol: 'file:',
|
|
|
slashes: true
|
|
slashes: true
|
|
|
}));
|
|
}));
|
|
|
|
|
+ // newBrowserWindow.hide();
|
|
|
ipc.on('BrowserWindow-show-window', function () {//显示
|
|
ipc.on('BrowserWindow-show-window', function () {//显示
|
|
|
|
|
+ if(newBrowserWindow){
|
|
|
|
|
+ newBrowserWindow.hide();
|
|
|
|
|
+ newBrowserWindow = null
|
|
|
|
|
+ }
|
|
|
newBrowserWindow = new BrowserWindow({
|
|
newBrowserWindow = new BrowserWindow({
|
|
|
width: 800,
|
|
width: 800,
|
|
|
frame: false
|
|
frame: false
|
|
@@ -54,9 +60,14 @@ function createWindow() {
|
|
|
protocol: 'file:',
|
|
protocol: 'file:',
|
|
|
slashes: true
|
|
slashes: true
|
|
|
}));
|
|
}));
|
|
|
|
|
+ newBrowserWindow.show();
|
|
|
|
|
+ });
|
|
|
|
|
+ ipc.on('BrowserWindow-close-window', function () {//隐藏
|
|
|
|
|
+ newBrowserWindow.hide();
|
|
|
|
|
+ newBrowserWindow = null
|
|
|
});
|
|
});
|
|
|
ipc.on('BrowserWindow-hide-window', function () {//隐藏
|
|
ipc.on('BrowserWindow-hide-window', function () {//隐藏
|
|
|
- app.exit();
|
|
|
|
|
|
|
+ newBrowserWindow.hide();
|
|
|
newBrowserWindow = null
|
|
newBrowserWindow = null
|
|
|
});
|
|
});
|
|
|
newBrowserWindow.webContents.openDevTools();
|
|
newBrowserWindow.webContents.openDevTools();
|