mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
fix get main window from windows service
This commit is contained in:
@@ -8,6 +8,7 @@ import { InstallationLocationService } from "./installation-location.service";
|
||||
import { ctrlc } from "ctrlc-windows";
|
||||
import { BSLocalVersionService } from "./bs-local-version.service";
|
||||
import isOnline from 'is-online';
|
||||
import { WindowManagerService } from "./window-manager.service";
|
||||
|
||||
export class BSInstallerService{
|
||||
|
||||
@@ -16,6 +17,7 @@ export class BSInstallerService{
|
||||
private readonly utils: UtilsService;
|
||||
private readonly installLocationService: InstallationLocationService;
|
||||
private readonly localVersionService: BSLocalVersionService;
|
||||
private readonly windows: WindowManagerService;
|
||||
|
||||
private downloadProcess: ChildProcessWithoutNullStreams;
|
||||
|
||||
@@ -23,8 +25,9 @@ export class BSInstallerService{
|
||||
this.utils = UtilsService.getInstance();
|
||||
this.installLocationService = InstallationLocationService.getInstance();
|
||||
this.localVersionService = BSLocalVersionService.getInstance();
|
||||
this.windows = WindowManagerService.getInstance();
|
||||
|
||||
this.utils.getMainWindow().on("close", () => {
|
||||
this.windows.getWindows("index.html").on("close", () => {
|
||||
this.killDownloadProcess();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -75,4 +75,8 @@ export class WindowManagerService{
|
||||
});
|
||||
}
|
||||
|
||||
public getWindows(window: AppWindow): BrowserWindow{
|
||||
return this.windows.get(window);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user