| 2263 |
kivins |
1 |
//---------------------------------------------------------------------------
|
|
|
2 |
|
|
|
3 |
#ifndef UdTransferHistoryH
|
|
|
4 |
#define UdTransferHistoryH
|
|
|
5 |
//---------------------------------------------------------------------------
|
|
|
6 |
#include <Classes.hpp>
|
|
|
7 |
#include <Controls.hpp>
|
|
|
8 |
#include <StdCtrls.hpp>
|
|
|
9 |
#include <Forms.hpp>
|
|
|
10 |
#include <Buttons.hpp>
|
|
|
11 |
#include <DBGrids.hpp>
|
|
|
12 |
#include <Grids.hpp>
|
|
|
13 |
#include <ExtCtrls.hpp>
|
|
|
14 |
#include <DB.hpp>
|
|
|
15 |
#include "Grids_ts.hpp"
|
|
|
16 |
#include "TSDBGrid.hpp"
|
|
|
17 |
#include "TSGrid.hpp"
|
|
|
18 |
#include <ADODB.hpp>
|
|
|
19 |
#include <ComCtrls.hpp>
|
|
|
20 |
#include "PERFGRAP.h"
|
|
|
21 |
#include "UdTransferManager.h"
|
|
|
22 |
#include "AdvPageControl.hpp"
|
|
|
23 |
#include "AdvGrid.hpp"
|
|
|
24 |
#include "BaseGrid.hpp"
|
|
|
25 |
#include <Chart.hpp>
|
|
|
26 |
#include <Series.hpp>
|
|
|
27 |
#include <TeEngine.hpp>
|
|
|
28 |
#include <TeeProcs.hpp>
|
|
|
29 |
|
|
|
30 |
//---------------------------------------------------------------------------
|
|
|
31 |
class TUdTransferHistoryForm : public TForm
|
|
|
32 |
{
|
|
|
33 |
__published: // IDE-managed Components
|
|
|
34 |
TDataSource *dsTransferHistory;
|
|
|
35 |
TADOQuery *qryTransferHistory;
|
|
|
36 |
TPanel *pnlRight;
|
|
|
37 |
TBitBtn *btAdd;
|
|
|
38 |
TBitBtn *btnAbort;
|
|
|
39 |
TBitBtn *btnClose;
|
|
|
40 |
TPanel *pnlLeft;
|
|
|
41 |
TPanel *pnlTop;
|
|
|
42 |
TPanel *pnlBottom;
|
|
|
43 |
TSplitter *Splitter1;
|
|
|
44 |
TtsDBGrid *gridHistory;
|
|
|
45 |
TLabel *Label1;
|
|
|
46 |
TLabel *Label2;
|
|
|
47 |
TAdvPageControl *tabDetails;
|
|
|
48 |
TAdvTabSheet *tabSettings;
|
|
|
49 |
TPanel *Panel1;
|
|
|
50 |
TPanel *Panel2;
|
|
|
51 |
TPanel *Panel3;
|
|
|
52 |
TAdvTabSheet *tabResults;
|
|
|
53 |
TAdvStringGrid *gridDetails;
|
|
|
54 |
TGroupBox *gbStatistics;
|
|
|
55 |
TLabel *Label3;
|
|
|
56 |
TLabel *Label4;
|
|
|
57 |
TLabel *Label5;
|
|
|
58 |
TLabel *Label6;
|
|
|
59 |
TLabel *Label7;
|
|
|
60 |
TProgressBar *pbCompleted;
|
|
|
61 |
TLabel *lblPercent;
|
|
|
62 |
TLabel *lblNumFiles;
|
|
|
63 |
TLabel *lblBytes;
|
|
|
64 |
TLabel *lblTransferTime;
|
|
|
65 |
TLabel *lblFilesPerSec;
|
|
|
66 |
TLabel *lblBytesPerSec;
|
|
|
67 |
TLabel *lblProgress;
|
|
|
68 |
TBitBtn *btnRefresh;
|
|
|
69 |
TTimer *Timer;
|
|
|
70 |
TChart *chartBatchSize;
|
|
|
71 |
TLineSeries *seriesBatches;
|
|
|
72 |
void __fastcall btAddClick(TObject *Sender);
|
|
|
73 |
void __fastcall gridHistoryCellLoaded(TObject *Sender, int DataCol,
|
|
|
74 |
Variant &DataRow, Variant &Value);
|
|
|
75 |
void __fastcall gridHistoryRowChanged(TObject *Sender, Variant &OldRow,
|
|
|
76 |
Variant &NewRow);
|
|
|
77 |
void __fastcall ShowForm(TObject *Sender);
|
|
|
78 |
void __fastcall gridRowResized(TObject *Sender, int RowColnr);
|
|
|
79 |
void __fastcall btnAbortClick(TObject *Sender);
|
|
|
80 |
void __fastcall btnCloseClick(TObject *Sender);
|
|
|
81 |
void __fastcall btnRefreshClick(TObject *Sender);
|
|
|
82 |
void __fastcall TimerTick(TObject *Sender);
|
|
|
83 |
private: // User declarations
|
|
|
84 |
void __fastcall ResetTransferDetails();
|
|
|
85 |
void __fastcall LoadTransferDetails();
|
|
|
86 |
void __fastcall SetTransferDetails( const UdTransferTask & task,
|
|
|
87 |
const TDateTime & endTime,
|
|
|
88 |
const AnsiString & comments = "" );
|
|
|
89 |
void __fastcall ResetTransferStatistics();
|
|
|
90 |
void __fastcall LoadTransferStatistics();
|
|
|
91 |
void __fastcall UpdateTransferStatistics();
|
|
|
92 |
|
|
|
93 |
|
|
|
94 |
int m_curTransferNum;
|
|
|
95 |
|
|
|
96 |
public: // User declarations
|
|
|
97 |
__fastcall TUdTransferHistoryForm(TComponent* Owner);
|
|
|
98 |
|
|
|
99 |
void __fastcall RefreshHistory();
|
|
|
100 |
void __fastcall SetTransferManager( UdTransferManager * manager ) { m_manager = manager; }
|
|
|
101 |
|
|
|
102 |
private:
|
|
|
103 |
UdTransferManager * m_manager;
|
|
|
104 |
};
|
|
|
105 |
//---------------------------------------------------------------------------
|
|
|
106 |
extern PACKAGE TUdTransferHistoryForm *UdTransferHistoryForm;
|
|
|
107 |
//---------------------------------------------------------------------------
|
|
|
108 |
#endif
|