📄 guangbo.pas
字号:
unit Guangbo;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Spin, Buttons, ExtCtrls, inifiles,LZRW1, XPMenu, TFlatPanelUnit,
TFlatSpeedButtonUnit, XP_Button;
type
TGuangbof = class(TForm)
SpinEdit2: TSpinEdit;
Label2: TLabel;
Label4: TLabel;
Label10: TLabel;
SpinEdit4: TSpinEdit;
Label11: TLabel;
BitBtn4: TBitBtn;
Label12: TLabel;
CheckBox1: TCheckBox;
RadioGroup1: TRadioGroup;
XPMenu1: TXPMenu;
FlatPanel1: TFlatPanel;
FlatPanel2: TFlatPanel;
Label6: TLabel;
SpinEdit3: TSpinEdit;
Label3: TLabel;
Label7: TLabel;
SpinEdit1: TSpinEdit;
Label1: TLabel;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
RadioGroup2: TRadioGroup;
Bevel1: TBevel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
Bevel2: TBevel;
FlatSpeedButton1: TFlatSpeedButton;
XP_Button1: TXP_Button;
XP_Button2: TXP_Button;
XP_Button3: TXP_Button;
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Guangbof: TGuangbof;
implementation
uses main;
{$R *.DFM}
procedure TGuangbof.BitBtn2Click(Sender: TObject);
begin
//Bitbtn1.Enabled:=true;
FOrm1.PingmuTimer.Enabled := false;
close;
end;
procedure TGuangbof.BitBtn1Click(Sender: TObject);
begin
form1.LMDTrayIcon1.Active := true;
form1.LMDGlobalHotKey2.Active:=true;
if CheckBox1.Checked = true then HuanDeng := 1
else HuanDeng := 0; //是否幻灯状态
if CheckBox2.Checked = true then draw_mouse:=true
else draw_mouse:=false; //是否发送鼠标状态
if CheckBox3.Checked = true then send_voice:=true
else send_voice:=false; //是否发送语音状态
case RadioGroup1.ItemIndex of
0:compress_mode:=1;
1:compress_mode:=2;
2:compress_mode:=3;
3:compress_mode:=4;
4:compress_mode:=5;
5:compress_mode:=6;
6:compress_mode:=7;
7:compress_mode:=8;
8:compress_mode:=0;
end;
case RadioGroup2.ItemIndex of
0:xieyi:=0;
1:xieyi:=1;
end;
fabaotime := SpinEdit3.Value;
getime := SpinEdit1.Value;
s_guangbo := true;
close;
end;
procedure TGuangbof.BitBtn3Click(Sender: TObject);
var
inifile: Tinifile;
inifilename: string;
begin
inifilename := ExtractFilePath(Application.EXEName) + 'teacher.ini';
inifile := Tinifile.create(inifilename);
inifile.WriteInteger('Class', 'geSpeed', SpinEdit1.Value);
inifile.WriteInteger('Class', 'FaBaoSpeed', SpinEdit3.Value);
if CheckBox1.checked = false then //幻灯模式
inifile.WriteInteger('Class', 'HuanDeng', 0)
else
inifile.WriteInteger('Class', 'HuanDeng', 1);
if CheckBox2.checked = false then //鼠标状态
inifile.WriteInteger('Class', 'DrawMouse', 0)
else
inifile.WriteInteger('Class', 'DrawMouse', 1);
if CheckBox3.checked = false then //发送语音状态
inifile.WriteInteger('Class', 'Sendvoice', 0)
else
inifile.WriteInteger('Class', 'Sendvoice', 1);
case RadioGroup1.ItemIndex of
0:inifile.WriteInteger('Class', 'CompressMode', 0);
1:inifile.WriteInteger('Class', 'CompressMode', 1);
2:inifile.WriteInteger('Class', 'CompressMode', 2);
3:inifile.WriteInteger('Class', 'CompressMode', 3);
4:inifile.WriteInteger('Class', 'CompressMode', 4);
5:inifile.WriteInteger('Class', 'CompressMode', 5);
6:inifile.WriteInteger('Class', 'CompressMode', 6);
7:inifile.WriteInteger('Class', 'CompressMode', 7);
8:inifile.WriteInteger('Class', 'CompressMode', 8);
end;
case RadioGroup2.ItemIndex of
0:inifile.WriteInteger('Class','Protocol',0);
1:inifile.WriteInteger('Class','Protocol',1);
end;
Inifile.Free;
showmessage('广播设置保存成功!');
{if screen.Width=640 then
begin
SpinEdit1.Value:=200;
SpinEdit2.Value:=3000;
end;
if screen.Width=640 then
begin
SpinEdit1.Value:=100;
SpinEdit2.Value:=1000;
end; }
end;
procedure TGuangbof.FormActivate(Sender: TObject);
var
inifile: Tinifile;
inifilename: string;
yasuolv,mousetai,voicetai,protocol_s:integer; //压缩率
begin
inifilename := ExtractFilePath(Application.EXEName) + 'teacher.ini';
inifile := Tinifile.create(inifilename);
SpinEdit1.Value := inifile.ReadInteger('CLASS', 'geSpeed', 3);
SpinEdit3.Value := inifile.ReadInteger('CLASS', 'FaBaoSpeed', 1);
Huandeng := inifile.ReadInteger('CLASS', 'HuanDeng', 0);
if Huandeng = 1 then checkbox1.State := cbChecked //是否幻灯模式
else
checkbox1.State := cbUnchecked;
Mousetai := inifile.ReadInteger('CLASS', 'DrawMouse', 1);
if Mousetai = 1 then checkbox2.State := cbChecked //是否发送鼠标状态
else
checkbox2.State := cbUnchecked;
Voicetai := inifile.ReadInteger('CLASS', 'Sendvoice', 0);
if Voicetai = 1 then checkbox3.State := cbChecked //是否发送语音状态
else
checkbox3.State := cbUnchecked;
yasuolv := inifile.ReadInteger('CLASS', 'CompressMode', 0);
RadioGroup1.ItemIndex:=yasuolv;
protocol_s:=inifile.ReadInteger('CLASS','Protocol',0);
RadioGroup2.ItemIndex:=protocol_s;
Inifile.Free;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -