()
| 182 | } |
| 183 | |
| 184 | async createWindow() { |
| 185 | this.l10n.install(store, this.config.get("localeSetting")); //修复无法检测系统语言的问题 |
| 186 | const transInitPromise = this.transCon.init(); //初始化翻译控制器 |
| 187 | this.restoreFromConfig(); //恢复设置 |
| 188 | eventListener.bind(); //绑定事件 |
| 189 | startService(this, authorizeKey); // 创建代理服务 |
| 190 | this.win.mainWindow; //创建主窗口 |
| 191 | this.shortcut.init(); |
| 192 | this.menu.init(); |
| 193 | if (this.get("autoCheckUpdate")) { |
| 194 | bus.at("dispatch", "checkUpdate"); |
| 195 | } |
| 196 | await transInitPromise; |
| 197 | } |
| 198 | |
| 199 | async onExit() { |
| 200 | await this.transCon.onExit(); |
no test coverage detected