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

📄 defaultmanagerdialog.js

📁 MAX+PLUSII下载电缆制作资料 ,.内有电路图等
💻 JS
字号:
var WidgetList_RowCount = 2;   // 一页显示的Widget行数
var WidgetList_ColCount = 5;   // 一页显示的Widget列数
var WidgetList_TotalNum = WidgetList_RowCount * WidgetList_ColCount;  // 一页内显示的Widget数量
var WidgetList_PageCount = 0;  // 总页数
var WidgetList_CurPage = 0;    // 当前页(0开始)

var WidgetCount = IGW.WidgetList.count, WidgetIndex = 0;
var PageCount = (WidgetCount%WidgetList_TotalNum==0)?(WidgetCount/WidgetList_TotalNum):(Math.floor(WidgetCount/WidgetList_TotalNum)+1);
var	WidgetList = IGW.WidgetList;

function ChangeListPage(PageIndex) {
	try
	{
			
		if (PageIndex >= PageCount) PageIndex = PageCount - 1;
		if (PageIndex < 0) PageIndex = 0;

		WidgetList_PageCount = PageCount;
		WidgetList_CurPage   = PageIndex;
		if (PageCount == 0)
		{
			PageInfo.caption     = "0/0页";
		}
		else
		PageInfo.caption     = (PageIndex + 1) + "/" + PageCount + "页";

		WidgetIndex = WidgetList_CurPage * WidgetList_TotalNum;
		//WidgetListTitleWWW.caption = "WidgetCount=" + WidgetCount + " WidgetIndex=" + WidgetIndex;
		for (Row = 1; Row <= WidgetList_RowCount; Row++) {
			for (Col = 1; Col <= WidgetList_ColCount; Col++) {
				if (WidgetIndex < WidgetCount) {
					wi= WidgetList.item(WidgetIndex);
					if (wi)
					{
						try	{
							eval("WidgetIcon_" + Row + "_" + Col + ".icon = wi.IconFile;");
						}
						catch(e){
						}
						try	{
							//eval("WidgetBG_" + Row + "_" + Col + ".caption = wi.name;");
							eval("lblWidgetCaption_" + Row + "_" + Col + ".caption = wi.name;");
						}
						catch(e){
						}
						try	{					
							eval("WidgetBG_" + Row + "_" + Col + ".visible = true;");
							eval("lblWidgetCaption_" + Row + "_" + Col + ".visible = true;");
						}
						catch(e){
						}
					}
				else
					{
					eval("WidgetBG_" + Row + "_" + Col + ".visible = false;");
					eval("lblWidgetCaption_" + Row + "_" + Col + ".visible = false;");
					//WidgetListTitleWWW.caption = "WidgetBG_" + Row + "_" + Col + ".visible = false;";
						
						}
					WidgetIndex++;
				}
				else {
					eval("WidgetBG_" + Row + "_" + Col + ".visible = false;");
					eval("lblWidgetCaption_" + Row + "_" + Col + ".visible = false;");
					//WidgetListTitleWWW.caption = "WidgetBG_" + Row + "_" + Col + ".visible = false;";
				}
			}
		}
	}
	catch(e) {
		WidgetName_1_1.caption=e;
	}
	
}

function PrePageClick() {	
	ChangeListPage(WidgetList_CurPage - 1);
}

function NextPageClick() {
	ChangeListPage(WidgetList_CurPage + 1);
}

function SelectWidget(Row, Col) {
	var WidgetIndex = WidgetList_CurPage * WidgetList_TotalNum + ((Row - 1) * WidgetList_ColCount + (Col - 1));

	if (WidgetIndex < WidgetList.count) {
		wi = WidgetList.item(WidgetIndex);
		WidgetDesc.caption = wi.name + "\n\n" + wi.description;
		
		btnauthorLogo.icon = wi.LogoFile;
		if (btnauthorLogo.icon == "")btnauthorLogo.icon = wi.IconFile;
		lblCopyright.caption = wi.Copyright;
		lblauthorName.caption = wi.authorName;
		lblauthorInfoURL.caption = wi.authorInfoURL;
		
	}
}

function OpenWidget(Row, Col) {
	var WidgetIndex = WidgetList_CurPage * WidgetList_TotalNum + ((Row - 1) * WidgetList_ColCount + (Col - 1));
	if (WidgetIndex < WidgetList.count) {
		SelectWidget(Row, Col);
		WidgetList.item(WidgetIndex).OpenWidget();
	}
}

function btnManagerFormCloseOnClick(Sender){
	igwmanagerdlg.close();
}

var HoverCount = 0;
function onItemHover(Sender)
{
	if (eventArgs.Hover)
	{
		SwitchVersionTitle(1);
		eval(Sender.onclick);
		HoverCount++;
		//WidgetListTitleWWW.caption = "鼠标旋停" + Sender.name + " " + HoverCount + IGW.Version;
	}
	else
	{
		SwitchVersionTitle(0);
		HoverCount--;
		//WidgetListTitleWWW.caption = "鼠标离开" + Sender.name + " " + HoverCount;
	}
}

function SwitchVersionTitle(vtID)
{
	// 用于切换版本信息显示
	if (vtID == 0)
	{// 显示IGW版本信息
		WidgetVersionTitle.caption = "圈圈版本信息";
		WidgetVersionTitle.TextColor = 0xFFFFFF00;
		btnauthorLogo.visible = false;
		lblauthorName.left = 307;
		lblauthorName.width = 145;
		lblauthorName.caption = "圈圈";
		lblCopyright.left = 307;
		lblCopyright.width = 145;
		lblCopyright.caption = "版本:" + IGW.Version;
		lblauthorInfoURL.left = 307;
		lblauthorInfoURL.width = 210;
		lblauthorInfoURL.caption = "SNDA Corporation保留所有权利";
		WidgetDescTitle.caption = "圈圈工具集";
		WidgetDescTitle.TextColor = 0xFFFFFF00;
		WidgetDesc.caption = "\n您可以通过圈圈工具集添加应用,成功添加的应用将直接显示在圈圈工具条上。";
	}
	else
	{// 显示Widget版本信息
		WidgetVersionTitle.caption = "Widget版本信息";
		WidgetVersionTitle.TextColor = 0xFFFFFFFF;
		btnauthorLogo.visible = true;
		lblauthorName.left = 370;
		lblauthorName.width = 145;
		//lblauthorName.captiion = "圈圈";
		lblCopyright.left = 370;
		lblCopyright.width = 145;
		//lblCopyright.caption = "版本:" + IGW.Version;
		lblauthorInfoURL.left = 370;
		lblauthorInfoURL.width = 145;
		//lblauthorInfoURL.caption = "SNDA Corporation保留所有权";
		WidgetDescTitle.caption = "描述信息";
		WidgetDescTitle.TextColor = 0xFFFFFFFF;
		
	}
}

ChangeListPage(0);
SwitchVersionTitle(0);

⌨️ 快捷键说明

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