📄 windowscript.cs
字号:
using System;
using System.DHTML;
using Ext;
using Ext.form;
using Ext.util;
namespace SampleScripts.window {
public class HelloScript {
private WindowClass _win;
public static void main(Dictionary args) {
ExtClass.onReady(new AnonymousDelegate(delegate() { new HelloScript().init(); }));
}
public void init() {
Element button = ExtClass.get("show-btn");
button.on("click", new ButtonClickDelegate(ShowWindow));
}
private void ShowWindow(Button button, EventObject evt)
{
if (_win == null)
{
_win = new Ext.WindowClass(new WindowConfig()
.custom("el", "hello-win")
.layout("fit")
.width(500)
.height(300)
.closeAction("hide")
.plain(true)
.items(new TabPanel(new TabPanelConfig()
.custom("el", "hello-tabs")
.custom("autoTabs", true)
.custom("activeTab", 0)
.custom("deferredRender", false)
.border(false)
.ToDictionary()))
.buttons(new object[] {
new ButtonConfig()
.text("Submit")
.disabled(true)
.ToDictionary(),
new ButtonConfig()
.text("Close")
.handler(new DOMEventHandler(delegate { _win.hide(); }))
.ToDictionary(),
})
.ToDictionary());
}
_win.show(button.getEl());
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -