1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00
Files
winscp/source/forms/SynchronizeProgress.h
Martin Prikryl 3cd64f2a19 Issue 2020 – Synchronize two local directories
https://winscp.net/tracker/2020

Source commit: a0ab887a23e4362bb62824434893a97540b24e4a
2025-10-02 22:14:52 +02:00

82 lines
2.4 KiB
C++

//---------------------------------------------------------------------------
#ifndef SynchronizeProgressH
#define SynchronizeProgressH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "PathLabel.hpp"
#include <ExtCtrls.hpp>
#include "PngImageList.hpp"
#include "TB2Dock.hpp"
#include "TB2Item.hpp"
#include "TB2Toolbar.hpp"
#include "TBX.hpp"
#include <Vcl.ImgList.hpp>
#include <GUITools.h>
#include <Vcl.ComCtrls.hpp>
#include <System.ImageList.hpp>
//---------------------------------------------------------------------------
class TSynchronizeProgressForm : public TForm
{
__published:
TLabel *LeftLabel;
TLabel *RightLabel;
TPathLabel *RightDirectoryLabel;
TPathLabel *LeftDirectoryLabel;
TLabel *StartTimeLabel;
TLabel *StartTimeLabelLabel;
TLabel *Label3;
TLabel *TimeElapsedLabel;
TTimer *UpdateTimer;
TPngImageList *ImageList;
TPanel *ToolbarPanel;
TTBXDock *Dock;
TTBXToolbar *Toolbar;
TTBXItem *CancelItem;
TTBXItem *MinimizeItem;
TPaintBox *AnimationPaintBox;
TPanel *ComponentsPanel;
TPngImageList *ImageList120;
TPngImageList *ImageList144;
TPngImageList *ImageList192;
TProgressBar *OperationProgress;
TLabel *TimeLeftLabelLabel;
TLabel *TimeLeftLabel;
void __fastcall UpdateTimerTimer(TObject *Sender);
void __fastcall MinimizeItemClick(TObject *Sender);
void __fastcall CancelItemClick(TObject *Sender);
public:
__fastcall TSynchronizeProgressForm(TComponent * Owner, bool AllowMinimize, int Files, bool LocalLocal);
virtual __fastcall ~TSynchronizeProgressForm();
void __fastcall Start();
int __fastcall SetData(
const UnicodeString & Directory1, const UnicodeString & Directory2, int Progress, bool & Continue);
__property bool Started = { read = FStarted };
protected:
virtual void __fastcall Dispatch(void * Message);
int __fastcall CalculateProgress();
private:
TDateTime FStartTime;
bool FStarted;
bool FCanceled;
void * FShowAsModalStorage;
bool FMinimizedByMe;
TFrameAnimation FFrameAnimation;
void __fastcall UpdateControls();
void __fastcall GlobalMinimize(TObject * Sender);
void __fastcall CancelOperation();
void __fastcall CMDialogKey(TCMDialogKey & Message);
INTERFACE_HOOK
};
//---------------------------------------------------------------------------
#endif