Skip to content

Commit

Permalink
Renomeada unit de constantes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesmarlos committed Aug 22, 2015
1 parent fb292d6 commit af2a6b1
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/AboutUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ TAboutForm = class(TForm)

implementation

uses ConstUnit;
uses UDFConst;

{$R *.DFM}

Expand Down
2 changes: 1 addition & 1 deletion src/BackupUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ TBackUp = class(TThread)

implementation

uses WinInet, ShellApi, Forms, StrUtils, DateUtils, ConstUnit, smtpsend, FunctionsUnit, EmailUnit;
uses WinInet, ShellApi, Forms, StrUtils, DateUtils, UDFConst, smtpsend, FunctionsUnit, EmailUnit;

//By Lance leonard
//http://www.techtricks.com/delphi/sendmail.php
Expand Down
2 changes: 1 addition & 1 deletion src/EditTaskUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ TEditTaskForm = class(TForm)
implementation

{$R *.dfm}
uses StrUtils, DateUtils, ConstUnit, FibsData, PresetsUnit, MesajUnit;
uses StrUtils, DateUtils, UDFConst, FibsData, PresetsUnit, MesajUnit;

procedure TEditTaskForm.ButtonOKClick(Sender: TObject);
var
Expand Down
2 changes: 1 addition & 1 deletion src/FibsData.pas
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ TdmFibs = class(TDataModule)

implementation

uses Variants, ConstUnit, IBDatabase, FunctionsUnit, StrUtils, DCPbase64;
uses Variants, UDFConst, IBDatabase, FunctionsUnit, StrUtils, DCPbase64;

{$R *.dfm}

Expand Down
28 changes: 14 additions & 14 deletions src/FibsForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ TfmFibs = class(TForm)

implementation

uses Registry, Variants, StrUtils, PrefForm, EditTaskUnit, ConstUnit, BackupUnit,
uses Registry, Variants, StrUtils, PrefForm, EditTaskUnit, UDFConst, BackupUnit,
MesajUnit, ManualBackupUnit, FunctionsUnit, PlanListUnit,
AboutUnit, LogUnit, PresetsUnit, DateUtils,
RetMonitorTools, BackupServiceUnit, DB, DCPbase64;
Expand Down Expand Up @@ -350,38 +350,38 @@ procedure TfmFibs.FormCreate(Sender: TObject);
Windows.SetThreadLocale(LOCALE_SYSTEM_DEFAULT);
SysUtils.GetFormatSettings;
Application.UpdateFormatSettings := False;
ConstUnit.SyncLog := TMultiReadExclusiveWriteSynchronizer.Create;
ConstUnit.AlarmTimeList := TStringList.Create;
ConstUnit.AlarmTimeList.Sorted := True;
ConstUnit.TimeList := TStringList.Create;
ConstUnit.TimeList.Sorted := True;
UDFConst.SyncLog := TMultiReadExclusiveWriteSynchronizer.Create;
UDFConst.AlarmTimeList := TStringList.Create;
UDFConst.AlarmTimeList.Sorted := True;
UDFConst.TimeList := TStringList.Create;
UDFConst.TimeList.Sorted := True;
Self.ttTimer.Enabled := True;
Self.caption := 'FIBS ' + PrgInfo + ' Ver. ' + ReleaseInfo;
Self.ActivateAllLeavedActive;
// Hide process messages when FIBS is minimised.
if BackupIsService then
begin
Self.Hide;
ConstUnit.MainFormHidden := True;
UDFConst.MainFormHidden := True;
end
else
begin
Application.ShowMainForm := False;
ConstUnit.MainFormHidden := True;
UDFConst.MainFormHidden := True;
end;
if ConstUnit.RunningAsService then
Self.tiTray.Hint := ConstUnit.PrgName + ' is running As a Service.'
if UDFConst.RunningAsService then
Self.tiTray.Hint := UDFConst.PrgName + ' is running As a Service.'
else
Self.tiTray.Hint := ConstUnit.PrgName + ' is running As a Application.';
Self.tiTray.Hint := UDFConst.PrgName + ' is running As a Application.';
Self.tiTray.Active := True;
Self.tiTray.HideApplication;
end;

procedure TfmFibs.FormDestroy(Sender: TObject);
begin
ConstUnit.AlarmTimeList.Free;
ConstUnit.TimeList.Free;
ConstUnit.SyncLog.Free;
UDFConst.AlarmTimeList.Free;
UDFConst.TimeList.Free;
UDFConst.SyncLog.Free;
end;

procedure TfmFibs.MenuNewClick(Sender: TObject);
Expand Down
2 changes: 1 addition & 1 deletion src/FunctionsUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function GetDatabaseSequence(AString: string): Integer;

implementation

uses SysUtils, StrUtils, ConstUnit, PresetsUnit; //, windows;
uses SysUtils, StrUtils, UDFConst, PresetsUnit; //, windows;

function IsValidDirectory(const ADir: string): Boolean;
begin
Expand Down
2 changes: 1 addition & 1 deletion src/LogUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ implementation

{$R *.dfm}

uses Printers, MesajUnit, ConstUnit;
uses Printers, MesajUnit, UDFConst;

type
THeaderFooterProc = procedure(aCanvas: TCanvas; aPageCount: Integer;
Expand Down
2 changes: 1 addition & 1 deletion src/ManualBackupUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ TManualBackupForm = class(TForm)
implementation

{$R *.dfm}
uses DateUtils, ConstUnit, FibsData, MesajUnit, PresetsUnit, FunctionsUnit;
uses DateUtils, UDFConst, FibsData, MesajUnit, PresetsUnit, FunctionsUnit;

procedure TManualBackupForm.BitBtn1Click(Sender: TObject);
var
Expand Down
2 changes: 1 addition & 1 deletion src/PrefForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ TfmPref = class(TForm)

implementation

uses Registry, FileCtrl, MesajUnit, ConstUnit, DCPbase64, UDFValidation;
uses Registry, FileCtrl, MesajUnit, UDFConst, DCPbase64, UDFValidation;

{$R *.dfm}

Expand Down
2 changes: 1 addition & 1 deletion src/PresetsUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function MakeFull(ADir, AExt: string): string;

implementation

uses Windows, SysUtils, Forms, Dialogs, StrUtils, ConstUnit, MesajUnit;
uses Windows, SysUtils, Forms, Dialogs, StrUtils, UDFConst, MesajUnit;

function DataFilesExists: Boolean;
begin
Expand Down
94 changes: 94 additions & 0 deletions src/UDFConst.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@

{****************************************************************************}
{ }
{ FIBS Firebird-Interbase Backup Scheduler }
{ }
{ Copyright (c) 2005-2006, Talat Dogan }
{ }
{ This program is free software; you can redistribute it and/or modify it }
{ under the terms of the GNU General Public License as published by the Free }
{ Software Foundation; either version 2 of the License, or (at your option) }
{ any later version. }
{ }
{ This program is distributed in the hope that it will be useful, but }
{ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY }
{ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for}
{ more details. }
{ }
{ You should have received a copy of the GNU General Public License along }
{ with this program; if not, write to the Free Software Foundation, Inc., }
{ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA }
{ }
{ Contact : [email protected]
{ }
{****************************************************************************}

{ This unit holds program globals }

unit UDFConst;

interface

uses Classes, SysUtils;

const
PrgName: string = 'FIBS 2.0.4';
PrgInfo: string = 'Firebird-Interbase Backup Scheduler';
PrgCopyright: string = '(c) 2005-2014, Talat Dogan';
PrgWebSite: string = 'www.talatdogan.com';

ReleaseInfo = '2.0.4';
ReleaseDate = '03.03.2014';
PrgRelease: string = 'Release : ' + ReleaseInfo + ' - ' + ReleaseDate;

// **************** See end of the unit for revision notes ******************//
const
TotalGBakOptions: Integer = 8;

DatabaseSequenceBeginToken: Char = '[';
DatabaseSequenceEndToken: Char = ']';

ActiveTaskValidMirrorDirectory: Boolean = False;

var
SyncLog: TMultiReadExclusiveWriteSynchronizer;

RunningAsService: Boolean = False; // True, when FIBS is running as a Windows service
DataFilesInvalid: Boolean = False; // True, if prefs.dat and tasks.dat are not corrupt or older version
MainFormHidden: Boolean = False; // True, if MainForm is minimised to the tray.
DataFilesPath: string; // Path to the Database files (prefs.dat and tasks.dat)

AlarmTimeList: TStringList;
TimeList: TStringList;
CurrentTime: TDateTime;
ThatDay: Integer;
CurrentDay: Integer;
CurrentAlarm: TDateTime;
CurrentOwner: string;
CurrentOwnerName: string;
CurrentItem: Integer;
ExecutedItem: Integer = -1; // Rev.2.0.1-1 ; this was "ExecutedItem : integer = 0;"
NoItemToExecute: Boolean = False;
LastItemExecuted: Boolean = False;
// Alarms count in the hour, day and month.
AlarmInHour, AlarmInDay, AlarmInMonth: Integer;
// Backups to be preserved in the hour, day and month.
PreservedInHour, PreservedInDay, PreservedInMonth: Integer;

implementation

// ********************* Rev.2.0.2 July 29, 2006 ***************************//
// ATTENTION !! THIS RELEASE MUST BE COMPILED WITH TDirectoryEditBtn Ver.1.1
// No code modification has been done.
// EditTaskUnit.dfm and PrefUnit.dfm files has been updated for compiling with
// TDirectoryEditBtn ver.1.1.
// See revisions.txt for full revision info about Rev.2.0.2

// ********************* Rev.2.0.1 July 24, 2006 ***************************//
// Julien Ferraro has fixed the weird scheduling bug which is troubled some users.
// Fixed task deleting probled reported by tJey on Jul 15, 2006.
// Modified/Added/deleted lines signed as Rev.2.0.1
// See revisions.txt for full revision info about Rev.2.0.1
// ***************************************************************************//

end.
2 changes: 1 addition & 1 deletion src/fibs.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ uses
DCPbase64,
FibsForm in 'FibsForm.pas' {fmFibs},
PrefForm in 'PrefForm.pas' {fmPref},
ConstUnit in 'ConstUnit.pas',
UDFConst in 'UDFConst.pas',
FibsData in 'FibsData.pas' {dmFibs: TDataModule},
EditTaskUnit in 'EditTaskUnit.pas' {EditTaskForm},
PresetsUnit in 'PresetsUnit.pas',
Expand Down

0 comments on commit af2a6b1

Please sign in to comment.