exit from app
This commit is contained in:
@@ -3,7 +3,7 @@ import { UhkHidDevice } from 'uhk-usb';
|
||||
import { readFile } from 'fs';
|
||||
import { join } from 'path';
|
||||
|
||||
import { AppStartInfo, CommandLineArgs, IpcEvents, LogService } from 'uhk-common';
|
||||
import { AppStartInfo, IpcEvents, LogService } from 'uhk-common';
|
||||
import { MainServiceBase } from './main-service-base';
|
||||
import { DeviceService } from './device.service';
|
||||
import { CommandLineInputs } from '../models/command-line-inputs';
|
||||
@@ -17,6 +17,7 @@ export class AppService extends MainServiceBase {
|
||||
super(logService, win);
|
||||
|
||||
ipcMain.on(IpcEvents.app.getAppStartInfo, this.handleAppStartInfo.bind(this));
|
||||
ipcMain.on(IpcEvents.app.exit, this.exit.bind(this));
|
||||
logService.info('[AppService] init success');
|
||||
}
|
||||
|
||||
@@ -61,4 +62,9 @@ export class AppService extends MainServiceBase {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private exit() {
|
||||
this.logService.info('[AppService] exit');
|
||||
this.win.close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user