⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basicscript.cs

📁 经典编程900例(C语言),主要是C基础知识
💻 CS
字号:
using System;
using System.DHTML;
using Ext;

namespace SampleScripts.resizable {
    public class BasicScript {
        public static void main(Dictionary args) {
            ExtClass.onReady(new AnonymousDelegate(delegate() { new BasicScript().init(); }));
        }

        public void init() {
			new Resizable("basic", new ResizableConfig()
				.width(200)
				.height(100)
				.minWidth(100)
				.minHeight(50)
				.ToDictionary());

			new Resizable("animated", new ResizableConfig()
				.width(200)
				.pinned(true)
				.height(100)
				.minWidth(100)
				.minHeight(50)
				.animate(true)
				.easing("backIn")
				.custom("duration", .6)
				.ToDictionary());
	        
			new Resizable("wrapped", new ResizableConfig()
				.wrap(true)
				.pinned(true)
				.minWidth(50)
				.minHeight(50)
				.preserveRatio(true)
				.ToDictionary());
	        
			new Resizable("transparent", new ResizableConfig()
				.wrap(true)
				.minWidth(50)
				.minHeight(50)
				.preserveRatio(true)
				.transparent(true)
				.ToDictionary());
	        
			Resizable custom = new Resizable("custom", new ResizableConfig()
				.wrap(true)
				.pinned(true)
				.minWidth(50)
				.minHeight(50)
				.preserveRatio(true)
				.handles("all")
				.draggable(true)
				.dynamic(true)
				.ToDictionary());
			
			Element customEl = custom.getEl();
			// move to the body to prevent overlap on my blog
			Document.Body.InsertBefore(customEl.dom, Document.Body.FirstChild);
	        
			customEl.on("dblclick", new AnonymousDelegate(delegate
				{
					customEl.hide(true);
				}));
			customEl.hide();
	        
			ExtClass.get("showMe").on("click", new AnonymousDelegate(delegate
				{
					customEl.center();
					customEl.show(true);
				}));
	        
			new Resizable("dwrapped", new ResizableConfig()
				.wrap(true)
				.pinned(true)
				.width(450)
				.height(150)
				.minWidth(200)
				.minHeight(50)
				.dynamic(true)
				.ToDictionary());
	        
			new Resizable("snap", new ResizableConfig()
				.wrap(true)
				.width(250)
				.height(100)
				.handles("e")
				.widthIncrement(50)
				.minWidth(500)
				.dynamic(true)
				.ToDictionary());
       }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -