本文整理匯總了TypeScript中electron.app.dock.hide方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript app.dock.hide方法的具體用法?TypeScript app.dock.hide怎麽用?TypeScript app.dock.hide使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類electron.app.dock
的用法示例。
在下文中一共展示了app.dock.hide方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('should not throw', () => {
app.dock.hide()
expect(app.dock.isVisible()).to.equal(false)
})
示例2: function
app.quit()
}
process.on('uncaughtException', (...args) => {
ipcMain.emit('error', args);
});
// Save userData in separate folders for each environment.
// Thanks to this you can use production and development versions of the app
// on same machine like those are two separate apps.
if (env.name !== 'production') {
var userDataPath = app.getPath('userData');
app.setPath('userData', userDataPath + ' (' + env.name + ')');
}
if (process.platform === 'darwin') app.dock.hide();
app.setAsDefaultProtocolClient('bowtie');
app.on('ready', function () {
Menu.setApplicationMenu(null);
let iconFile = process.platform === 'win32' ? 'tray.ico' : 'trayTemplate.png';
tray = new Tray(path.normalize(`${app.getAppPath()}/icons/${iconFile}`));
var windowOptions = Object.assign({}, {
width: currentTheme.settings.BTWindowWidth,
height: currentTheme.settings.BTWindowHeight,
webPreferences: { preload: path.resolve(`${__dirname}/preload.js`) }
}, env.windowProperties)