rushfee/WebContent/www/huaweiScripts/demo/agentapp/ui/wndui.ui.js

30 lines
918 B
JavaScript
Raw Normal View History

2022-05-16 15:07:40 +00:00
//WndUiUIClass constructor
function WndUiUIClass() {
}
//WndUiUIClass methods define
WndUiUIClass.prototype = {
UpdateWindowList: function () {
var selectID = document.getElementById('AgentAppDemo.WindowList');
var wndList = WndUiState.GetWndList();
// first remove all
selectID.options.length = 0;
//update the window list
for (var i=0; i < wndList.length; i++){
var varItem = new Option(wndList[i].title, wndList[i].hwnd);
selectID.options.add(varItem);
}
},
RemoveWindowList: function () {
var selectID = document.getElementById('AgentAppDemo.WindowList');
for (var i = 0; i < selectID.options.length; i++) {
//first, destory the window resource
WndUiExcute('Destroy', selectID.options[i].value)
}
//remove all
selectID.options.length = 0;
}
}