MCPcopy
hub / github.com/CopyTranslator/CopyTranslator / createWindow

Method createWindow

src/main/controller.ts:184–197  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 1

background.tsFile · 0.45

Calls 6

restoreFromConfigMethod · 0.95
startServiceFunction · 0.90
installMethod · 0.80
bindMethod · 0.80
getMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected