-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathUFBackUp.pas
More file actions
71 lines (55 loc) · 1.66 KB
/
Copy pathUFBackUp.pas
File metadata and controls
71 lines (55 loc) · 1.66 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
unit UFBackUp;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls,
System.ImageList, Vcl.ImgList, FireDAC.Stan.Def, FireDAC.VCLUI.Wait,
FireDAC.Stan.Intf, FireDAC.Phys, FireDAC.Phys.SQLite, FireDAC.Stan.ExprFuncs,
FireDAC.Phys.SQLiteWrapper.Stat, FireDAC.Phys.SQLiteDef;
type
TFBackUp = class(TForm)
BEBackUpFile: TButtonedEdit;
Label1: TLabel;
ImageList1: TImageList;
Panel1: TPanel;
BOK: TButton;
Button1: TButton;
LStatus: TLabel;
FileOpenDialog: TFileOpenDialog;
FDSQLiteBackup: TFDSQLiteBackup;
FDPhysSQLiteDriverLink1: TFDPhysSQLiteDriverLink;
procedure BOKClick(Sender: TObject);
procedure BEBackUpFileRightButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FBackUp: TFBackUp;
implementation
uses
UFGetJars;
{$R *.dfm}
procedure TFBackUp.BEBackUpFileRightButtonClick(Sender: TObject);
begin
FileOpenDialog.DefaultFolder := ExtractFileDir(GetCurrentProjectFileName);
if FileOpenDialog.Execute
then
BEBackUpFile.Text := FileOpenDialog.FileName;
end;
procedure TFBackUp.BOKClick(Sender: TObject);
begin
try
FDSQLiteBackup.Database := FGetJars.FDCJobs.Params.Database;
FDSQLiteBackup.DestDatabase := BEBackUpFile.Text;
FDSQLiteBackup.Backup;
except on E: Exception do
begin
MessageDlg('Exception = ' + E.Message, mtInformation, [mbOK], 0);
Exit;
end;
end;
Self.Close;
end;
end.