///
///
WindowLoad = function () {
this.ApplicationPath = "";
this.ControlID = "Window_Load";
this.ParentElement = null; //要加入的父容器
this.Isbgiframe = false;
this.IsShowInit = false;
var My = this;
var txtTitle = "";
//#region 加载
this.Load = function () {
Init();
}
//#endregion
//#region 初始化
function Init() {
if (My.ParentElement == null) My.ParentElement = $(document.body);
if ($("#" + My.ControlID, My.ParentElement).length > 0) return;
txtTitle = My.ControlID + "_txtTitle";
var htmlString = new Sys.StringBuilder();
htmlString.append("
");
htmlString.append("
");
htmlString.append("");
htmlString.append(" 请稍候.... | ");
htmlString.append("
");
htmlString.append("
");
htmlString.append("
");
My.ParentElement.append(htmlString.toString());
$("#" + My.ControlID, My.ParentElement).window();
if (My.Isbgiframe == true) $("#" + My.ControlID, My.ParentElement).window("window").bgiframe();
}
//#endregion
//#region 设置提示消息
this.SetTitle2 = function (title, msg) {
$("#" + My.ControlID, My.ParentElement).window("setTitle", title);
$("#" + txtTitle, My.ParentElement).text(msg);
}
//#endregion
//#region 设置提示消息
this.SetTitle = function (msg) {
$("#" + txtTitle, My.ParentElement).text(msg);
}
//#endregion
//#region 设置提示内容
this.SetContent = function (content) {
$("#" + My.ControlID, My.ParentElement).html(content);
}
//#endregion
//#region 恢复
function Comeback() {
var htmlString = new Sys.StringBuilder();
htmlString.append("");
htmlString.append("");
htmlString.append(" 客官莫急,小的马上就出来,么么哒... | ");
htmlString.append("
");
htmlString.append("
");
$("#" + My.ControlID, My.ParentElement).html(htmlString.toString());
}
//#endregion
//#region 显示
this.Show = function () {
if (My.IsShowInit == true) { Comeback(); }
else { $("#" + txtTitle, My.ParentElement).text("客官莫急,小的马上就出来,么么哒..."); }
$("#" + My.ControlID, My.ParentElement).window("open");
}
//#endregion
//#region 隐藏
this.Hide = function () {
$("#" + My.ControlID, My.ParentElement).window("close");
}
//#endregion
}