📄 unit1.~pas
字号:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, DB, ADODB;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
ComboBox3: TComboBox;
ComboBox2: TComboBox;
ComboBox1: TComboBox;
ComboBox4: TComboBox;
ComboBox5: TComboBox;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
ComboBox6: TComboBox;
ComboBox7: TComboBox;
ComboBox8: TComboBox;
ComboBox9: TComboBox;
ComboBox10: TComboBox;
Label7: TLabel;
ADOConnection1: TADOConnection;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
uses IniFiles;
procedure TForm1.Button1Click(Sender: TObject);
var MyIni: TIniFile;
begin
MyIni := TIniFile.Create('.\readme.INI');//调用的文件名
combobox6.Text:=MyIni.ReadString('COM', 'READER_HAND1', '');//取得字符
combobox7.Text:=MyIni.ReadString('COM', 'READER_HAND2', '');//取得字符
combobox8.Text:=MyIni.ReadString('COM', 'READER', '');//取得字符
combobox9.Text:=MyIni.ReadString('COM', 'JTJ1', '');//取得字符
combobox10.Text:=MyIni.ReadString('COM', 'JTJ2', '');//取得字符
end;
procedure TForm1.Button2Click(Sender: TObject);
var MyIni: TIniFile;
begin
MyIni := TIniFile.Create('.\readme.INI');//调用的文件名
myini.WriteString('COM', 'READER_HAND1', combobox1.Text);
myini.WriteString('COM', 'READER_HAND2', combobox2.Text);
myini.WriteString('COM', 'READER', combobox3.Text);
myini.WriteString('COM', 'JTJ1', combobox4.Text);
myini.WriteString('COM', 'JTJ2', combobox5.Text);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -