📄 locksystem.pas
字号:
unit LockSystem;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls,Buttons;
type
TLockSystemF = class(TForm)
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
RadioButton5: TRadioButton;
RadioButton6: TRadioButton;
RadioButton7: TRadioButton;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
LockSystemF: TLockSystemF;
s_selcount: smallint;
implementation
uses main;
{$R *.DFM}
procedure TLockSystemF.BitBtn1Click(Sender: TObject);
var
i:smallint;
begin
if RadioButton1.Checked=true then //锁定师生电脑
begin
end;
if RadioButton2.Checked=true then //锁定教师电脑
begin
end;
if RadioButton3.Checked=true then //锁定学生电脑
begin
for i:=0 to s_selcount-1 do
begin
if form1.ListView1.Items[s_student[i]].imageindex=1 then
begin
form1.ListView1.Items[s_student[i]].imageindex:=2;
wsh_socket[s_student[i]].SendStr('/*wsh*/:' + #13 + #10 + '锁定学生');
end;
end;
close;
end;
if RadioButton4.Checked=true then //解锁学生电脑
begin
for i:=0 to s_selcount-1 do
begin
if form1.ListView1.Items[s_student[i]].imageindex=2 then
begin
form1.ListView1.Items[s_student[i]].imageindex:=1;
wsh_socket[s_student[i]].SendStr('/*wsh*/:' + #13 + #10 + '解锁学生');
end;
end;
close;
end;
if RadioButton5.Checked=true then //强制学生退出网络教室
begin
for i:=0 to s_selcount-1 do
begin
if form1.ListView1.Items[s_student[i]].imageindex=1 then
begin
form1.ListView1.Items[s_student[i]].imageindex:=0;
wsh_socket[s_student[i]].SendStr('/*wsh*/:' + #13 + #10 + '退出教室');
wsh_socket[s_student[i]].close;
end;
end;
close;
end;
if RadioButton6.Checked=true then //远程重新启动学生电脑
begin
for i:=0 to s_selcount-1 do
begin
if form1.ListView1.Items[s_student[i]].imageindex=1 then
begin
form1.ListView1.Items[s_student[i]].imageindex:=0;
wsh_socket[s_student[i]].SendStr('/*wsh*/:' + #13 + #10 + '重新启动');
wsh_socket[s_student[i]].close;
end;
end;
close;
end;
if RadioButton7.Checked=true then //远程关闭学生电脑
begin
for i:=0 to s_selcount-1 do
begin
if form1.ListView1.Items[s_student[i]].imageindex=1 then
begin
form1.ListView1.Items[s_student[i]].imageindex:=0;
wsh_socket[s_student[i]].SendStr('/*wsh*/:' + #13 + #10 + '关闭系统');
wsh_socket[s_student[i]].close;
end;
end;
close;
end;
end;
procedure TLockSystemF.FormShow(Sender: TObject);
begin
RadioButton1.Checked:=true;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -