本文整理匯總了TypeScript中nw.gui.default.Window.get方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript gui.default.Window.get方法的具體用法?TypeScript gui.default.Window.get怎麽用?TypeScript gui.default.Window.get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類nw.gui.default.Window
的用法示例。
在下文中一共展示了gui.default.Window.get方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: alert
alert(err);
});
IDE = new Ide();
// IDE.mainEditor = new TextEditor(IDE.editor);
// mainEditor.on("activeSession",()=>{console.log("active session changed")})
var prjName = determineProject();
if (prjName) {
IDE.addProject(prjName);
} else {
IDE.loadDefaultProjects();
}
Cats.Commands.init();
Cats.Menu.createMenuBar();
IDE.initViews();
IDE.layout();
Cats.Menu.initFileContextMenu();
Cats.Menu.initTabContextMenu();
// IDE.mainEditor.init();
var win = GUI.Window.get();
win.on("close", function() {
Cats.Commands.get(Cats.Commands.CMDS.ide_quit).command();
});
}
示例2: require
namespace jmxhealth {
var pubsub = require('pubsub-js'),
initializedServices = 0,
gui = require('nw.gui'),
currentWindow = gui.Window.get();
//When all services are initialized we sent the start event
pubsub.subscribe(topic.INITIALIZED, (message: string, data: string) => {
initializedServices += 1;
if (initializedServices === 2) {
pubsub.publish(topic.START, 'Let`s get this party started :)');
}
});
currentWindow.on('close', (event: any) => {
currentWindow.hide();
});
angular.module('jmxhealth', ['jmxhealth.common', 'jmxhealth.state', 'jmxhealth.tray', 'jmxhealth.state', 'jmxhealth.detail'])
.controller('TestController', function() {
this.publish = function(state: string): void {
pubsub.publish(topic.OVERALL_STATE, state);
};
});
}
示例3: showDevTools
/**
* Open the webkit developers tools for debugging etc.
*/
function showDevTools() {
var GUI = require('nw.gui');
GUI.Window.get().showDevTools();
}