123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- var app = require('app');
- var BrowserWindow = require('browser-window');
- var ipc = require('ipc');
- var mainWindow = null;
- var preferencesWindow = null;
- var createMainWindow = function() {
-
- mainWindow = new BrowserWindow({
- width: 1030,
- height: 700,
- 'min-width': 500,
- 'min-height': 200,
- 'accept-first-mouse': true,
- 'title-bar-style': 'hidden',
- 'fullscreen' : true
- });
-
- mainWindow.loadUrl('file://' + __dirname + '/app/index.html');
-
-
-
- mainWindow.on('closed', function() {
-
-
-
- mainWindow = null;
- });
- }
- var createPreferencesWindow = function() {
- if(preferencesWindow === null){
- preferencesWindow = new BrowserWindow({
- width: 500,
- height: 300,
- show: true,
- resizable: false,
- 'title-bar-style': 'hidden',
- 'fullscreen' : false
- });
- preferencesWindow.loadUrl('file://' + __dirname + '/app/preferences-window.html');
- preferencesWindow.on('closed', function() {
- preferencesWindow = null;
- });
- }
- }
- app.on('window-all-closed', function() {
-
-
- if (process.platform != 'darwin') {
- app.quit();
- }
- });
- app.on('ready', function() {
- createMainWindow();
-
- ipc.on('show-preferences-window', function() {
- createPreferencesWindow();
- });
- });
|