-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathudlgbingapiinfo.pas
54 lines (40 loc) · 932 Bytes
/
udlgbingapiinfo.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
unit udlgBingApiInfo;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TFormBingInfo }
TFormBingInfo = class(TForm)
ButtonOk: TButton;
ButtonCancel: TButton;
EditBingAppName: TEdit;
EditBingAppSecret: TEdit;
Label1: TLabel;
Label2: TLabel;
procedure ButtonOkClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
FormBingInfo: TFormBingInfo;
implementation
uses pocomposer_main;
{$R *.lfm}
{ TFormBingInfo }
procedure TFormBingInfo.ButtonOkClick(Sender: TObject);
var
infile : TStringList;
begin
infile := TStringList.Create;
try
infile.Add('bingclientid='+EditBingAppName.Text);
infile.Add('bingclientsecret='+EditBingAppSecret.Text);
infile.SaveToFile(ExtractFilePath(ParamStr(0))+ConfigFile);
finally
infile.Free;
end;
end;
end.