First commit 26/03/2001
This commit is contained in:
commit
a1ba7651d0
132
GDBackup.bpr
Normal file
132
GDBackup.bpr
Normal file
@ -0,0 +1,132 @@
|
||||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<!-- C++Builder XML Project -->
|
||||
<PROJECT>
|
||||
<MACROS>
|
||||
<VERSION value="BCB.05.03"/>
|
||||
<PROJECT value="GDBackup.exe"/>
|
||||
<OBJFILES value="GDBackup.obj backup_src.obj"/>
|
||||
<RESFILES value="GDBackup.res"/>
|
||||
<IDLFILES value=""/>
|
||||
<IDLGENFILES value=""/>
|
||||
<DEFFILE value=""/>
|
||||
<RESDEPEN value="$(RESFILES) backup_src.dfm"/>
|
||||
<LIBFILES value=""/>
|
||||
<LIBRARIES value="CabForCB.lib JDsoft.lib vclx50.lib QRPT50.lib VCLBDE50.lib VCLDB50.lib
|
||||
VCL50.lib"/>
|
||||
<SPARELIBS value="VCL50.lib VCLDB50.lib VCLBDE50.lib QRPT50.lib vclx50.lib JDsoft.lib
|
||||
CabForCB.lib"/>
|
||||
<PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi VCLDB50.bpi VCLADO50.bpi ibsmp50.bpi
|
||||
VCLBDE50.bpi VCLDBX50.bpi QRPT50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi
|
||||
DSS50.bpi TEEQR50.bpi VCLIB50.bpi VCLMID50.bpi VCLIE50.bpi INETDB50.bpi
|
||||
INET50.bpi NMFAST50.bpi WEBMID50.bpi bcbie50.bpi dclocx50.bpi
|
||||
bcb2kaxserver50.bpi CoolPack.bpi JDsoft.bpi"/>
|
||||
<PATHCPP value=".;"/>
|
||||
<PATHPAS value=".;"/>
|
||||
<PATHRC value=".;"/>
|
||||
<PATHASM value=".;"/>
|
||||
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||
<LINKER value="tlink32"/>
|
||||
<USERDEFINES value="_DEBUG"/>
|
||||
<SYSDEFINES value="NO_STRICT"/>
|
||||
<MAINSOURCE value="GDBackup.cpp"/>
|
||||
<INCLUDEPATH value="..\VCLs\include;$(BCB)\include;$(BCB)\include\vcl;"C:\program\cbuilder\CBuilder5\VCLs\include\""/>
|
||||
<LIBPATH value="..\VCLs\lib;..\VCLs\include;C:\VCLs\lib\;$(BCB)\lib\obj;$(BCB)\lib;"C:\program\cbuilder\CBuilder5\VCLs\lib\""/>
|
||||
<WARNINGS value="-w-par"/>
|
||||
</MACROS>
|
||||
<OPTIONS>
|
||||
<IDLCFLAGS value="-I..\VCLs\include -I$(BCB)\include -I$(BCB)\include\vcl
|
||||
-I"C:\program\cbuilder\CBuilder5\VCLs\include\." -src_suffix cpp -D_DEBUG
|
||||
-boa"/>
|
||||
<CFLAG1 value="-Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c
|
||||
-tW -tWM"/>
|
||||
<PFLAGS value="-$YD -$W -$O- -v -JPHNE -M"/>
|
||||
<RFLAGS value=""/>
|
||||
<AFLAGS value="/mx /w2 /zd"/>
|
||||
<LFLAGS value="-D"" -aa -Tpe -x -Gn -v"/>
|
||||
</OPTIONS>
|
||||
<LINKER>
|
||||
<ALLOBJ value="c0w32.obj sysinit.obj $(OBJFILES)"/>
|
||||
<ALLRES value="$(RESFILES)"/>
|
||||
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib"/>
|
||||
</LINKER>
|
||||
<IDEOPTIONS>
|
||||
[Version Info]
|
||||
IncludeVerInfo=1
|
||||
AutoIncBuild=1
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=2
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=3082
|
||||
CodePage=1252
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=JD Soft.
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.2
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=JD soft.
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
url=www.infdj.com
|
||||
e-mail=jd@infdj.com
|
||||
|
||||
[Excluded Packages]
|
||||
$(BCB)\Projects\Bpl\Dialup.bpl=RAS Tools
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=3
|
||||
Item0=..\VCLs\include;$(BCB)\include;$(BCB)\include\vcl;C:\program\cbuilder\CBuilder5\VCLs\include\
|
||||
Item1=$(BCB)\include;$(BCB)\include\vcl;..\VCLs\include
|
||||
Item2=$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=4
|
||||
Item0=..\VCLs\lib;..\VCLs\include;C:\VCLs\lib\;$(BCB)\lib\obj;$(BCB)\lib;C:\program\cbuilder\CBuilder5\VCLs\lib\
|
||||
Item1=C:\VCLs\lib\;$(BCB)\lib\obj;$(BCB)\lib;..\VCLs\lib
|
||||
Item2=..\..\..\..\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib;..\VCLs\lib
|
||||
Item3=..\..\..\..\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlDebugSourcePath]
|
||||
Count=1
|
||||
Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=_DEBUG
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
RemoteHost=
|
||||
RemotePath=
|
||||
RemoteDebug=0
|
||||
|
||||
[Compiler]
|
||||
ShowInfoMsgs=0
|
||||
LinkDebugVcl=0
|
||||
LinkCGLIB=0
|
||||
|
||||
[CORBA]
|
||||
AddServerUnit=1
|
||||
AddClientUnit=1
|
||||
PrecompiledHeaders=1
|
||||
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
22
GDBackup.cpp
Normal file
22
GDBackup.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
USERES("GDBackup.res");
|
||||
USEFORM("backup_src.cpp", Backup);
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TBackup), &Backup);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
GDBackup.exe
Normal file
BIN
GDBackup.exe
Normal file
Binary file not shown.
BIN
GDBackup.res
Normal file
BIN
GDBackup.res
Normal file
Binary file not shown.
9
README.md
Normal file
9
README.md
Normal file
@ -0,0 +1,9 @@
|
||||
#GenericDatosBackup
|
||||
|
||||
|
||||
*26/03/2001*
|
||||
|
||||
ToDo: wwtcf?
|
||||
|
||||
|
||||

|
170
backup_src.cpp
Normal file
170
backup_src.cpp
Normal file
@ -0,0 +1,170 @@
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "backup_src.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
#pragma link "CABArchiver"
|
||||
#pragma link "CABArchiver"
|
||||
#pragma resource "*.dfm"
|
||||
TBackup *Backup;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TBackup::TBackup(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TBackup::SpeedButton1Click(TObject *Sender)
|
||||
{
|
||||
if ( iswitch->Visible == true ) FCab->Text = "";
|
||||
iswitch->Visible = false;
|
||||
|
||||
BuscaDestino->Visible = true;
|
||||
FCab->Visible = true;
|
||||
|
||||
if ( !FCab->Text.IsEmpty() )
|
||||
{
|
||||
if ( FileExists( FCab->Text ) )
|
||||
{
|
||||
CABARchiver1->FileName = FCab->Text;
|
||||
CABARchiver1->ExtractDir = ExtractFileDir( Application->ExeName ) + "\\datos";
|
||||
CABARchiver1->FileDirExtraction = true;
|
||||
Panel2->Visible = true;
|
||||
Gauge1->Visible = true;
|
||||
Gauge2->Visible = true;
|
||||
CABARchiver1->ExtractAll();
|
||||
Panel2->Visible = false;
|
||||
Gauge1->Visible = false;
|
||||
Gauge2->Visible = false;
|
||||
}
|
||||
FCab->Text = "";
|
||||
Panel1->Caption = "www.infdj.com | JD soft.";
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TBackup::SpeedButton2Click(TObject *Sender)
|
||||
{
|
||||
if ( iswitch->Visible == false ) FCab->Text = "";
|
||||
iswitch->Visible = true;
|
||||
|
||||
BuscaDestino->Visible = true;
|
||||
FCab->Visible = true;
|
||||
|
||||
//-----------------------------------<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
if ( !FCab->Text.IsEmpty() )
|
||||
{
|
||||
TSearchRec sr;
|
||||
int iAttributes = faReadOnly | faHidden | faSysFile | faArchive;
|
||||
int i1 = 0;
|
||||
TCABItem *Item;
|
||||
iSalvar1->Visible = true;
|
||||
Panel2->Visible = true;
|
||||
CABARchiver1->FileDirExtraction = true;
|
||||
if (FindFirst(ExtractFileDir( Application->ExeName ) + "\\datos\\*.*", iAttributes, sr) == 0)
|
||||
{
|
||||
do
|
||||
{
|
||||
if ((sr.Attr & iAttributes) == sr.Attr)
|
||||
{
|
||||
Item = CABARchiver1->Contents->AddItem();
|
||||
Item->FileName = ExtractFileDir( Application->ExeName ) + "\\datos\\"+sr.Name;
|
||||
i1++;
|
||||
}
|
||||
} while (FindNext(sr) == 0);
|
||||
FindClose(sr);
|
||||
}
|
||||
|
||||
if ( i1 == 0 )
|
||||
{
|
||||
ShowMessage( "No se encontraron datos a comprimir" );
|
||||
} else {
|
||||
iSalvar2->Visible = true;
|
||||
Gauge1->Visible = true;
|
||||
Gauge2->Visible = true;
|
||||
CABARchiver1->FileName = FCab->Text;
|
||||
CABARchiver1->Compress();
|
||||
}
|
||||
iSalvar1->Visible = false;
|
||||
iSalvar2->Visible = false;
|
||||
iSalvar3->Visible = false;
|
||||
Gauge1->Visible = false;
|
||||
Gauge2->Visible = false;
|
||||
Panel2->Visible = false;
|
||||
FCab->Text = "";
|
||||
Panel1->Caption = "www.infdj.com | JD soft.";
|
||||
}
|
||||
//-----------------------------------<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TBackup::SpeedButton3Click(TObject *Sender)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TBackup::BuscaDestinoClick(TObject *Sender)
|
||||
{
|
||||
if ( iswitch->Visible )
|
||||
{
|
||||
if (SaveDialog1->Execute())
|
||||
FCab->Text = SaveDialog1->FileName;
|
||||
} else {
|
||||
if (OpenDialog1->Execute())
|
||||
FCab->Text = OpenDialog1->FileName;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TBackup::CABARchiver1CABMessage(TObject *sender, int position,
|
||||
int total, AnsiString message, TStat mode, AnsiString Lapse)
|
||||
{
|
||||
Panel2->Caption = Lapse; //(you will affiche the time from the begin to the end)
|
||||
|
||||
switch(mode){
|
||||
case cmMessage:
|
||||
Panel1->Caption = message; // ( you affiche the message of the progression...)
|
||||
break;
|
||||
case cmProgressFirst: // ( you will initialise the first gauge)
|
||||
Gauge1->Min = position;
|
||||
Gauge1->Max = total;
|
||||
Gauge1->Position = 0;
|
||||
break; //(this gauge will be use to see the all progress)
|
||||
case cmProgress: //(this will update the progress of gauge1)
|
||||
Gauge1->Position = position;
|
||||
break;
|
||||
case cmStatus: //(this will update the first gauge, and send a message )
|
||||
Gauge1->Position = position;
|
||||
Panel1->Caption = message+"-"+AnsiString(position) + "-"+AnsiString(total);
|
||||
break;
|
||||
case cmSecondFirst: //(this will initialise the gauge2 made for progress of a file)
|
||||
Gauge2->Min = position;
|
||||
Gauge2->Max = total;
|
||||
Gauge2->Position = 0;
|
||||
break;
|
||||
case cmSecond: //(this will update the progress of gauge2)
|
||||
Gauge2->Position = position;
|
||||
break;
|
||||
};
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TBackup::Image1MouseMove(TObject *Sender,
|
||||
TShiftState Shift, int X, int Y)
|
||||
{
|
||||
if (Shift.Contains(ssLeft)) // make sure button is down
|
||||
{
|
||||
Left += (X-StartX);
|
||||
Top += (Y-StartY);
|
||||
}
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TBackup::Image1MouseDown(TObject *Sender,
|
||||
TMouseButton Button, TShiftState Shift, int X, int Y)
|
||||
{
|
||||
StartX = X;
|
||||
StartY = Y;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
1144
backup_src.dfm
Normal file
1144
backup_src.dfm
Normal file
File diff suppressed because it is too large
Load Diff
59
backup_src.h
Normal file
59
backup_src.h
Normal file
@ -0,0 +1,59 @@
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#ifndef backup_srcH
|
||||
#define backup_srcH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include "Cabinet.hpp"
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <jpeg.hpp>
|
||||
#include "CABArchiver.h"
|
||||
#include <Dialogs.hpp>
|
||||
#include <ComCtrls.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TBackup : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TBevel *Bevel1;
|
||||
TImage *Image1;
|
||||
TLabel *Label1;
|
||||
TBevel *Bevel2;
|
||||
TCABArchiver *CABARchiver1;
|
||||
TImage *iswitch;
|
||||
TSpeedButton *SpeedButton1;
|
||||
TSpeedButton *SpeedButton2;
|
||||
TSpeedButton *SpeedButton3;
|
||||
TLabel *iSalvar1;
|
||||
TLabel *iSalvar2;
|
||||
TLabel *iSalvar3;
|
||||
TEdit *FCab;
|
||||
TSpeedButton *BuscaDestino;
|
||||
TSaveDialog *SaveDialog1;
|
||||
TLabel *Panel1;
|
||||
TProgressBar *Gauge1;
|
||||
TProgressBar *Gauge2;
|
||||
TLabel *Panel2;
|
||||
TOpenDialog *OpenDialog1;
|
||||
void __fastcall SpeedButton1Click(TObject *Sender);
|
||||
void __fastcall SpeedButton2Click(TObject *Sender);
|
||||
void __fastcall SpeedButton3Click(TObject *Sender);
|
||||
void __fastcall BuscaDestinoClick(TObject *Sender);
|
||||
void __fastcall CABARchiver1CABMessage(TObject *sender, int position,
|
||||
int total, AnsiString message, TStat mode, AnsiString Lapse);
|
||||
void __fastcall Image1MouseMove(TObject *Sender, TShiftState Shift,
|
||||
int X, int Y);
|
||||
void __fastcall Image1MouseDown(TObject *Sender,
|
||||
TMouseButton Button, TShiftState Shift, int X, int Y);
|
||||
private: // User declarations
|
||||
int StartX, StartY;
|
||||
public: // User declarations
|
||||
__fastcall TBackup(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TBackup *Backup;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
BIN
datos/Pictures/1679.jpg
Normal file
BIN
datos/Pictures/1679.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
BIN
datos/Pictures/Copia de iError.bmp
Normal file
BIN
datos/Pictures/Copia de iError.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
BIN
datos/Pictures/grande.jpg
Normal file
BIN
datos/Pictures/grande.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
datos/Pictures/iError.bmp
Normal file
BIN
datos/Pictures/iError.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
BIN
datos/Pictures/pequq.jpg
Normal file
BIN
datos/Pictures/pequq.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.4 KiB |
BIN
datos/carpetas.DB
Normal file
BIN
datos/carpetas.DB
Normal file
Binary file not shown.
BIN
datos/llamadas.DB
Normal file
BIN
datos/llamadas.DB
Normal file
Binary file not shown.
BIN
datos/llamadas.MB
Normal file
BIN
datos/llamadas.MB
Normal file
Binary file not shown.
BIN
datos/llamadas.PX
Normal file
BIN
datos/llamadas.PX
Normal file
Binary file not shown.
BIN
datos/llamadas.XG0
Normal file
BIN
datos/llamadas.XG0
Normal file
Binary file not shown.
BIN
datos/llamadas.YG0
Normal file
BIN
datos/llamadas.YG0
Normal file
Binary file not shown.
BIN
datos/misnotas.DB
Normal file
BIN
datos/misnotas.DB
Normal file
Binary file not shown.
BIN
datos/misnotas.MB
Normal file
BIN
datos/misnotas.MB
Normal file
Binary file not shown.
BIN
datos/misnotas.PX
Normal file
BIN
datos/misnotas.PX
Normal file
Binary file not shown.
BIN
datos/personas.DB
Normal file
BIN
datos/personas.DB
Normal file
Binary file not shown.
BIN
datos/personas.MB
Normal file
BIN
datos/personas.MB
Normal file
Binary file not shown.
BIN
datos/personas.PX
Normal file
BIN
datos/personas.PX
Normal file
Binary file not shown.
BIN
datos/personas.XG0
Normal file
BIN
datos/personas.XG0
Normal file
Binary file not shown.
BIN
datos/personas.XG1
Normal file
BIN
datos/personas.XG1
Normal file
Binary file not shown.
BIN
datos/personas.XG2
Normal file
BIN
datos/personas.XG2
Normal file
Binary file not shown.
BIN
datos/personas.XG3
Normal file
BIN
datos/personas.XG3
Normal file
Binary file not shown.
BIN
datos/personas.XG4
Normal file
BIN
datos/personas.XG4
Normal file
Binary file not shown.
BIN
datos/personas.XG5
Normal file
BIN
datos/personas.XG5
Normal file
Binary file not shown.
BIN
datos/personas.YG0
Normal file
BIN
datos/personas.YG0
Normal file
Binary file not shown.
BIN
datos/personas.YG1
Normal file
BIN
datos/personas.YG1
Normal file
Binary file not shown.
BIN
datos/personas.YG2
Normal file
BIN
datos/personas.YG2
Normal file
Binary file not shown.
BIN
datos/personas.YG3
Normal file
BIN
datos/personas.YG3
Normal file
Binary file not shown.
BIN
datos/personas.YG4
Normal file
BIN
datos/personas.YG4
Normal file
Binary file not shown.
BIN
datos/personas.YG5
Normal file
BIN
datos/personas.YG5
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user