-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.js
60 lines (41 loc) · 961 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*++
Copyright (c) 2017 Chris Stevens
Module Name:
main.js
Abstract:
This module implements the main application process.
Author:
Chris Stevens 8-Sept-2017
--*/
//
// -------------------------------------------------------------------- Imports
//
const electron = require('electron');
const timer = require('./timer');
const tray = require('./tray');
const app = electron.app;
//
// --------------------------------------------------------------------- Script
//
//
// Once Electron has completed initialization, it triggers the ready event.
//
app.on('ready', function () {
//
// Add the tray menu.
//
result = tray.initialize();
if (result === false) {
return;
}
//
// Start the timer.
//
timer.start();
return;
});
//
// Do not quit the application when all windows are close. The timer is always
// running in the background.
//
app.on('window-all-closed', function () {});