📄 login.srw
字号:
$PBExportHeader$login.srw
forward
global type login from window
end type
type cb_2 from commandbutton within login
end type
type cb_1 from commandbutton within login
end type
type pass from singlelineedit within login
end type
type username from singlelineedit within login
end type
type st_2 from statictext within login
end type
type st_1 from statictext within login
end type
end forward
global type login from window
integer width = 2533
integer height = 1408
boolean titlebar = true
string title = "登陆窗口"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_2 cb_2
cb_1 cb_1
pass pass
username username
st_2 st_2
st_1 st_1
end type
global login login
on login.create
this.cb_2=create cb_2
this.cb_1=create cb_1
this.pass=create pass
this.username=create username
this.st_2=create st_2
this.st_1=create st_1
this.Control[]={this.cb_2,&
this.cb_1,&
this.pass,&
this.username,&
this.st_2,&
this.st_1}
end on
on login.destroy
destroy(this.cb_2)
destroy(this.cb_1)
destroy(this.pass)
destroy(this.username)
destroy(this.st_2)
destroy(this.st_1)
end on
event open;// Profile 1
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=1;UID=;PWD='"
connect;
end event
type cb_2 from commandbutton within login
integer x = 1070
integer y = 908
integer width = 457
integer height = 128
integer taborder = 40
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "取消"
end type
type cb_1 from commandbutton within login
integer x = 261
integer y = 904
integer width = 457
integer height = 128
integer taborder = 30
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "确定"
end type
event clicked;
string correct_password
string user
string pwd
If username.Text = "" and Pass.Text = "" Then
MessageBox("提示","你输入的用户名或密码不对")
Else
//MessageBox("提示","请输入")
user = username.text
pwd = pass.text
SELECT password INTO : correct_password FROM sys_user
WHERE user_name =: user;
IF pwd = correct_password THEN
//OPEN(main1)
//CLOSE(login)
ELSE
messagebox("PayAttention!","Your password or user name is wrong,please input again!")
pass.text = ""
pass.setfocus()
END IF
End If
end event
type pass from singlelineedit within login
integer x = 969
integer y = 404
integer width = 457
integer height = 128
integer taborder = 20
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
string text = "cc"
boolean password = true
borderstyle borderstyle = stylelowered!
end type
type username from singlelineedit within login
integer x = 974
integer y = 176
integer width = 457
integer height = 128
integer taborder = 10
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
string text = "dd"
borderstyle borderstyle = stylelowered!
end type
type st_2 from statictext within login
integer x = 238
integer y = 412
integer width = 462
integer height = 120
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "密码"
boolean focusrectangle = false
end type
type st_1 from statictext within login
integer x = 229
integer y = 168
integer width = 471
integer height = 124
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "用户名"
boolean focusrectangle = false
end type
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -