-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
43 lines (36 loc) · 1.19 KB
/
main.js
File metadata and controls
43 lines (36 loc) · 1.19 KB
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
const electron = require('electron');
const{app, BrowserWindow, Menu} = electron;
let window;
const ipc = require('electron').ipcMain;
global.received = {receivedpdf: false};
//global.year = {value: ''};
global.week = {weekdays: {}}
global.semester = {term: '', year: '',
Fall: {fstart: '',fstartday: '', fend: '', fendday: ''},
Spring: {sstart: '',sstartday: '', send: '', sendday: ''},
Summer: {sumstart: '',sumstartday: '', sumend: '', sumendday: ''}}
global.numevents = {termnumber: 0, prevtotal: 0, eventsnumber: 0}
// waits for app to be ready
app.on('ready', () => {
// create a new window
window = new BrowserWindow({
width: 1000,
height: 600,
titleBarStyle: 'hidden',
webPreferences: {
nodeIntegration: true
},
resizable: false,
fullscreen: false
});
// load the html onto the window
window.loadFile('window.html')
// waits for the window to close
window.on('close', () => {
win = null;
});
// login verification
ipc.on('valid-login', function(event, cloud) {
window.webContents.send('cloud-info', cloud)
})
});