$PBExportHeader$w_kms_messagebox.srw
forward
global type w_kms_messagebox from w_publ_base
end type
type st_2 from statictext within w_kms_messagebox
end type
type shl_1 from statichyperlink within w_kms_messagebox
end type
type p_1 from picture within w_kms_messagebox
end type
type st_3 from statictext within w_kms_messagebox
end type
type shl_2 from statichyperlink within w_kms_messagebox
end type
type cb_confirm from commandbutton within w_kms_messagebox
end type
type cb_cancle from commandbutton within w_kms_messagebox
end type
type mle_1 from multilineedit within w_kms_messagebox
end type
type st_1 from statictext within w_kms_messagebox
end type
end forward

global type w_kms_messagebox from w_publ_base
integer height = 1224
string title = "异常"
boolean minbox = false
windowtype windowtype = response!
long backcolor = 1073741824
st_2 st_2
shl_1 shl_1
p_1 p_1
st_3 st_3
shl_2 shl_2
cb_confirm cb_confirm
cb_cancle cb_cancle
mle_1 mle_1
st_1 st_1
end type
global w_kms_messagebox w_kms_messagebox

type variables
s_kms_msg s_open
int ins_rslt
end variables

on w_kms_messagebox.create
int iCurrent
call super::create
this.st_2=create st_2
this.shl_1=create shl_1
this.p_1=create p_1
this.st_3=create st_3
this.shl_2=create shl_2
this.cb_confirm=create cb_confirm
this.cb_cancle=create cb_cancle
this.mle_1=create mle_1
this.st_1=create st_1
iCurrent=UpperBound(this.Control)
this.Control[iCurrent+1]=this.st_2
this.Control[iCurrent+2]=this.shl_1
this.Control[iCurrent+3]=this.p_1
this.Control[iCurrent+4]=this.st_3
this.Control[iCurrent+5]=this.shl_2
this.Control[iCurrent+6]=this.cb_confirm
this.Control[iCurrent+7]=this.cb_cancle
this.Control[iCurrent+8]=this.mle_1
this.Control[iCurrent+9]=this.st_1
end on

on w_kms_messagebox.destroy
call super::destroy
destroy(this.st_2)
destroy(this.shl_1)
destroy(this.p_1)
destroy(this.st_3)
destroy(this.shl_2)
destroy(this.cb_confirm)
destroy(this.cb_cancle)
destroy(this.mle_1)
destroy(this.st_1)
end on

event open;call super::open;s_open = Message.Powerobjectparm
IF Not IsValid(s_open) THEN RETURN
IF IsNull(s_open) THEN RETURN

IF s_open.Msgtype = 0 THEN
	// 弹出警告界面, 如果 s_rslt.DocCode1/DocCode2(操作说明文章码/解决办法文章码) 有内容，分别提供连接转到文章
	This.icon = "Error!"
	This.Title = "错误信息"
	cb_cancle.Visible = false
	cb_confirm.x = (this.workspacewidth() - cb_confirm.width) / 2
	ins_rslt = 1
ELSEIF s_open.Msgtype = 1 THEN
	This.icon = "Question!"
	This.Title = "询问"
	
ELSE
	This.Title = "成功"
	cb_cancle.Visible = false
	cb_confirm.x = (this.workspacewidth() - cb_confirm.width) / 2
	ins_rslt = 1
END IF
//IF s_rslt.Msgtype = 0 THEN

//	fmessagebox(s_rslt.Msg)
//	return 0
//ELSEIF s_rslt.Msgtype = 1 THEN
//	// TODO: 弹出询问界面, 如果 s_rslt.DocCode1/DocCode2(操作说明文章码/解决办法文章码) 有内容，分别提供连接转到文章
//	RETURN MessageBox('', s_rslt.Msg, Question!, YesNo!, 1)
//ELSE
//	// 成功提示
//	return MessageBox('', s_rslt.Msg)
//END IF


mle_1.Text = s_open.Msg
st_1.Text = "提示代码:" + s_open.msgid
end event

event close;call super::close;closewithreturn(this, ins_rslt)
end event

type cb_func from w_publ_base`cb_func within w_kms_messagebox
boolean visible = false
end type

type cb_exit from w_publ_base`cb_exit within w_kms_messagebox
boolean visible = false
end type

type st_2 from statictext within w_kms_messagebox
integer x = 50
integer y = 784
integer width = 123
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
string text = "点击"
boolean focusrectangle = false
end type

type shl_1 from statichyperlink within w_kms_messagebox
integer x = 261
integer y = 784
integer width = 233
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
boolean underline = true
string pointer = "HyperLink!"
long textcolor = 134217856
string text = "操作说明"
boolean focusrectangle = false
end type

event clicked;IF Len(s_open.doccode1) > 0 THEN
	kms_showdoc(s_open.doccode1)
ELSE
	Messagebox('','知识库暂未收录该提示的操作说明"')
END IF
end event

type p_1 from picture within w_kms_messagebox
integer x = 169
integer y = 776
integer width = 73
integer height = 64
boolean bringtotop = true
boolean originalsize = true
string picturename = "Help!"
boolean focusrectangle = false
end type

type st_3 from statictext within w_kms_messagebox
integer x = 494
integer y = 784
integer width = 672
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
string text = "可以帮助您排除操作问题。"
boolean focusrectangle = false
end type

type shl_2 from statichyperlink within w_kms_messagebox
integer x = 50
integer y = 896
integer width = 672
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
boolean underline = true
string pointer = "HyperLink!"
long textcolor = 134217856
string text = "查找更多原因和解决方案。"
boolean focusrectangle = false
end type

event clicked;IF Len(s_open.doccode2) > 0 THEN
	kms_showdoc(s_open.doccode2)
ELSE
	Messagebox('','知识库暂未收录该提示的解决方案"')
END IF
end event

type cb_confirm from commandbutton within w_kms_messagebox
integer x = 626
integer y = 1028
integer width = 325
integer height = 84
integer taborder = 20
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string text = "确定"
end type

event clicked;ins_rslt = 1
close(parent)
end event

type cb_cancle from commandbutton within w_kms_messagebox
integer x = 1051
integer y = 1028
integer width = 325
integer height = 84
integer taborder = 30
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string text = "取消"
end type

event clicked;close(parent)
end event

type mle_1 from multilineedit within w_kms_messagebox
integer x = 50
integer y = 52
integer width = 1902
integer height = 472
integer taborder = 30
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
boolean vscrollbar = true
boolean autovscroll = true
boolean displayonly = true
borderstyle borderstyle = stylelowered!
end type

type st_1 from statictext within w_kms_messagebox
integer x = 50
integer y = 564
integer width = 1902
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
string text = "提示代码:"
boolean focusrectangle = false
end type

