const {app, BrowserWindow, dialog} = require('electron');

let mainWindow;

app.on('ready', () => {
  mainWindow = new BrowserWindow({
      height: 942,
      width: 962,
      fullscreenable: false,
      icon: __dirname + '/app.ico',
      resizable : false
  });

  mainWindow.setMenu(null);
  mainWindow.loadURL('file://' + __dirname + '/index.html');
});

const ipc = require('electron').ipcMain

ipc.on('open-information', function (event, arg) {
    const options = {
        type: 'info',
        title: 'Information',
        message: arg,
        buttons: ['OK']
    }
    dialog.showMessageBox(options, function (index) {
        event.sender.send('information-dialog', index)
    })
});
