Last active
September 22, 2017 16:45
-
-
Save sigdelsanjog/e73031cf17ed3f96d1e12c585378b29e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const electron = require('electron') | |
const countdown = require('./countdown') | |
const app = electron.app | |
const BrowserWindow = electron.BrowserWindow | |
const ipc = electron.ipcMain | |
let mainWindow | |
app.on('ready', _ => { | |
mainWindow = new BrowserWindow({ | |
icon:'tuxnp.png', | |
height: 400, | |
width: 400 | |
}) | |
mainWindow.on('closed', _ =>{ | |
console.log('Closed the Window') | |
mainWindow = null | |
}) | |
}) | |
ipc.on('countdown-start', _ => { | |
countdown(count => { | |
mainWindow.webContents.send('countdown', count) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment