ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/DBAdmin/dlg/BackupDlgUnit.pas
(Generate patch)

Comparing ibx/trunk/examples/DBAdmin/dlg/BackupDlgUnit.pas (file contents):
Revision 271 by tony, Wed Mar 14 12:48:51 2018 UTC vs.
Revision 272 by tony, Mon Feb 4 13:34:37 2019 UTC

# Line 39 | Line 39 | type
39      MetadataOnly: TCheckBox;
40      IgnoreLimboTransactions: TCheckBox;
41      IgnoreChecksums: TCheckBox;
42 +    ProgressBar1: TProgressBar;
43      ServerName: TEdit;
44      DBName: TEdit;
45      BackupFileName: TEdit;
# Line 55 | Line 56 | type
56      ReportTab: TTabSheet;
57      procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
58      procedure FormShow(Sender: TObject);
59 +    procedure IBXClientSideBackupService1GetNextLine(Sender: TObject;
60 +      var Line: string);
61      procedure ReportTabShow(Sender: TObject);
62      procedure SpeedButton1Click(Sender: TObject);
63    private
# Line 83 | Line 86 | end;
86   procedure TBackupDlg.DoClientBackup(Data: PtrInt);
87   var BackupCount: integer;
88   begin
89 +  ProgressBar1.Visible := true;
90    with IBXClientSideBackupService1 do
91    begin
92      Options := [];
# Line 101 | Line 105 | begin
105      BackupToFile(BackupFileName.Text, BackupCount);
106    end;
107    Report.Lines.Add(Format('Backup Completed - File Size = %d bytes',[BackupCount]));
108 +  ProgressBar1.Visible := false;
109    MessageDlg(Format('Backup Completed - File Size = %d bytes',[BackupCount]),mtInformation,[mbOK],0);
110   end;
111  
112   procedure TBackupDlg.DoServerBackup(Data: PtrInt);
113   begin
114 +  ProgressBar1.Visible := true;
115    with IBXServerSideBackupService1 do
116    begin
117      BackupFiles.Clear;
# Line 124 | Line 130 | begin
130      Report.Lines.Add('Starting Backup');
131      Execute(Report.Lines);
132      Report.Lines.Add('Backup Completed');
133 +    ProgressBar1.Visible := false;
134      MessageDlg('Backup Completed',mtInformation,[mbOK],0);
135    end;
136   end;
# Line 136 | Line 143 | begin
143    BackupFileName.Text := '';
144   end;
145  
146 + procedure TBackupDlg.IBXClientSideBackupService1GetNextLine(Sender: TObject;
147 +  var Line: string);
148 + begin
149 +  Application.ProcessMessages;
150 + end;
151 +
152   procedure TBackupDlg.ReportTabShow(Sender: TObject);
153   begin
154    Report.Lines.Clear;
# Line 151 | Line 164 | begin
164      if BackupFileName.Text = '' then
165        raise Exception.Create('A Backup File Name must be given');
166      PageControl1.ActivePage := ReportTab;
167 +    Application.ProcessMessages;
168      if ServerSideBtn.Checked then
169        Application.QueueAsyncCall(@DoServerBackup,0)
170      else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines