Pārlūkot izejas kodu

Merge branch 'master' of http://192.168.1.41:3000/MaiXinRong/Measure

builder 6 gadi atpakaļ
vecāks
revīzija
029be11fd3

+ 2 - 0
DataModules/PhasePayDm.pas

@@ -282,10 +282,12 @@ procedure TPhasePayData.AfterBatchOperation;
 begin
   sddPhasePay.BeforeValueChange := sddPhasePayBeforeValueChange;
   sddPhasePay.AfterValueChanged := sddPhasePayAfterValueChanged;
+  sddPhasePay.EndUpdate;
 end;
 
 procedure TPhasePayData.BeforeBatchOperation;
 begin
+  sddPhasePay.BeginUpdate;
   sddPhasePay.BeforeValueChange := nil;
   sddPhasePay.AfterValueChanged := nil;
 end;

+ 2 - 0
DataModules/StageDm.pas

@@ -495,12 +495,14 @@ end;
 
 procedure TStageData.AfterBatchOperation;
 begin
+  sddStage.EndUpdate;
   sddStage.BeforeValueChange := sddStageBeforeValueChange;
   sddStage.AfterValueChanged := sddStageAfterValueChanged;
 end;
 
 procedure TStageData.BeforeBatchOperation;
 begin
+  sddStage.BeginUpdate;
   sddStage.BeforeValueChange := nil;
   sddStage.AfterValueChanged := nil;
 end;

+ 2 - 2
Dprs/CSL/Measure_Cloud.cfg

@@ -31,11 +31,11 @@
 -M
 -$M16384,1048576
 -K$00400000
--E"C:\Program Files (x86)\李뷘흡숭\셕좆連마 (데샙경+暾경) 1"
+-E"C:\Program Files (x86)\李뷘흡숭\李뷘써炬엄炬셕좆寧竟뺏흡숭(暾경)關嶠"
 -N"C:\DelphiTemp"
 -LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
 -LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
--D_mCloud;_mEncrypt1;_Test;_mLoginNoPW1
+-D_mCloud;_mLoginNoPW;
 -w-UNSAFE_TYPE
 -w-UNSAFE_CODE
 -w-UNSAFE_CAST

+ 21 - 22
Dprs/CSL/Measure_Cloud.dof

@@ -90,18 +90,18 @@ MaxStackSize=1048576
 ImageBase=4194304
 ExeDescription=
 [Directories]
-OutputDir=C:\Program Files (x86)\纵横软件\计量支付 (单机版+云版) 1
+OutputDir=C:\Program Files (x86)\纵横软件\纵横结算决算计量一体化软件(云版)渭武
 UnitOutputDir=C:\DelphiTemp
 PackageDLLOutputDir=
 PackageDCPOutputDir=
 SearchPath=
 Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;ZjGridD7;DPanel;ExTree;JimComboBoxs;JimTab;PrintComRep;XPMenu_tom;ZjGridFereD7;ZjCommon;SmartDataSet;ZjGridActns
-Conditionals=_mCloud;_mEncrypt1;_Test;_mLoginNoPW1
+Conditionals=_mCloud;_mLoginNoPW;
 DebugSourceDirs=
 UsePackages=0
 [Parameters]
-RunParams=
-HostApplication=
+RunParams=measure:ww21zq
+HostApplication=C:\Program Files (x86)\纵横软件\纵横结算决算计量一体化软件(云版)渭武\Measure_Cloud.exe
 Launcher=
 UseLauncher=0
 DebugCWD=
@@ -115,7 +115,7 @@ AutoIncBuild=0
 MajorVer=3
 MinorVer=1
 Release=7
-Build=2246
+Build=2369
 Debug=0
 PreRelease=0
 Special=0
@@ -126,31 +126,30 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化云版
-FileVersion=3.1.7.2246
+FileVersion=3.1.7.2369
 InternalName=
-LegalCopyright=
-LegalTrademarks=
+LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
+LegalTrademarks=Measure
 OriginalFilename=
-ProductName=
-ProductVersion=1.0.0.0
+ProductName=纵横公路工程结算决算一体化软件
+ProductVersion=3.1.7
 [Excluded Packages]
 c:\program files (x86)\borland\delphi7\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package
 [HistoryLists\hlConditionals]
-Count=2
-Item0=_mCloud;_mEncrypt1;_Test;_mLoginNoPW1
-Item1=_mCloud;_mEncrypt1;_Test;_mLoginNoPW
+Count=4
+Item0=_mCloud;_mLoginNoPW;
+Item1=_mCloud;
+Item2=_mCloud;_mLoginNoPW
+Item3=_mCloud;_mDebugView
 [HistoryLists\hlUnitAliases]
 Count=1
 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-[HistoryLists\hlSearchPath]
-Count=1
-Item0=E:\IFP3
 [HistoryLists\hlUnitOutputDirectory]
-Count=1
+Count=2
 Item0=C:\DelphiTemp
+Item1=..\..\Dcus
 [HistoryLists\hlOutputDirectorry]
-Count=1
-Item0=C:\Program Files (x86)\纵横软件\计量支付 (单机版+云版) 1
-[HistoryLists\hlBPLOutput]
-Count=1
-Item0=E:\SmartCost\Components\LIB
+Count=3
+Item0=C:\Program Files (x86)\纵横软件\纵横结算决算计量一体化软件(云版)渭武
+Item1=D:\SmartCostExe\Measure\PWFree
+Item2=D:\SmartCostExe\Measure

+ 37 - 34
Dprs/CSL/Measure_Cloud.dpr

@@ -1,11 +1,13 @@
 program Measure_Cloud;
 
+{$R '..\..\res\uac.res' '..\..\res\uac.rc'}
+
 uses
   Windows,
   ShareMem,
+  HttpApp,
   Forms,
   Controls,
-  HttpApp,
   MainFrm in '..\..\Forms\MainFrm.pas' {MainForm},
   ProjectManagerFme in '..\..\Frames\ProjectManagerFme.pas' {ProjectManagerFrame: TFrame},
   UtilMethods in '..\..\Units\UtilMethods.pas',
@@ -143,23 +145,23 @@ uses
   CalcDecimal in '..\..\Units\CalcDecimal.pas',
   BillsPasteSelectFrm in '..\..\Forms\BillsPasteSelectFrm.pas' {BillsPasteSelectForm},
   DetailExcelImport in '..\..\Units\DetailExcelImport.pas',
-  GclBillsGatherModel in '..\..\Units\GclBillsGatherModel.pas',
-  PriceMarginBillsDm in '..\..\DataModules\PriceMarginBillsDm.pas' {PriceMarginBillsData: TDataModule},
+  mProgressProFrm in '..\..\Forms\mProgressProFrm.pas' {ProgressProForm},
+  rmHaBaiCustomizedDm in '..\..\DataModules\ReportMemoryDm\rmHaBaiCustomizedDm.pas' {rmHaBaiCustomizedData: TDataModule},
   ProjectGLDm in '..\..\DataModules\ProjectGLDm.pas' {ProjectGLData: TDataModule},
-  PriceMarginBillsFme in '..\..\Frames\PriceMarginBillsFme.pas' {PriceMarginBillsFrame: TFrame},
+  PriceMarginBillsDm in '..\..\DataModules\PriceMarginBillsDm.pas' {PriceMarginBillsData: TDataModule},
+  GclBillsGatherModel in '..\..\Units\GclBillsGatherModel.pas',
+  DetailGLDm in '..\..\DataModules\DetailGLDm.pas' {DetailGLData: TDataModule},
   PriceMarginFme in '..\..\Frames\PriceMarginFme.pas' {PriceMarginFrame: TFrame},
   ProjectGLFme in '..\..\Frames\ProjectGLFme.pas' {ProjectGLFrame: TFrame},
-  DetailGLDm in '..\..\DataModules\DetailGLDm.pas' {DetailGLData: TDataModule},
-  rmHaBaiCustomizedDm in '..\..\DataModules\ReportMemoryDm\rmHaBaiCustomizedDm.pas' {rmHaBaiCustomizedData: TDataModule},
-  BaseClipboard in '..\..\Units\BaseClipboard.pas',
   SelectDetailGLsFrm in '..\..\Forms\SelectDetailGLsFrm.pas' {SelectDetailGLsForm},
   DealPayPlanFrm in '..\..\Forms\DealPayPlanFrm.pas' {DealPayPlanForm},
-  mProgressProFrm in '..\..\Forms\mProgressProFrm.pas' {ProgressProForm},
-  tpMainFrm in '..\..\TenderPartition\tpMainFrm.pas' {tpMainForm},
+  BaseClipboard in '..\..\Units\BaseClipboard.pas',
+  mPegFilter in '..\..\Units\mPegFilter.pas',
   tpBaseGatherData in '..\..\TenderPartition\tpBaseGatherData.pas',
   tpGatherGcl in '..\..\TenderPartition\tpGatherGcl.pas',
   tpGatherTree in '..\..\TenderPartition\tpGatherTree.pas',
   tpMainData in '..\..\TenderPartition\tpMainData.pas',
+  tpMainFrm in '..\..\TenderPartition\tpMainFrm.pas' {tpMainForm},
   tpNoPegDm in '..\..\TenderPartition\tpNoPegDm.pas' {tpNoPegData: TDataModule},
   tpPartTender in '..\..\TenderPartition\tpPartTender.pas',
   tpPartTenderFme in '..\..\TenderPartition\tpPartTenderFme.pas' {tpPartTenderFrame: TFrame},
@@ -177,16 +179,11 @@ uses
   tpSelectTenderNode in '..\..\TenderPartition\tpSelectTenderNode.pas',
   tpSelectTendersFrm in '..\..\TenderPartition\tpSelectTendersFrm.pas' {SelectTendersForm},
   tpTrialPegInputFrm in '..\..\TenderPartition\tpTrialPegInputFrm.pas' {TrialPegInputForm},
-  mPegFilter in '..\..\Units\mPegFilter.pas',
-  MScrollBox in '..\..\..\SmartCost\Components\MBaseControl\Source\MScrollBox.pas',
-  ClientService in '..\..\Encrypt\NetClient\ClientService.pas',
-  CfgPort in '..\..\Encrypt\NetClient\CfgPort.pas',
-  CorrespondClient in '..\..\Encrypt\NetClient\CorrespondClient.pas',
-  EnctyptClientData in '..\..\Encrypt\NetClient\EnctyptClientData.pas',
-  ColVisibleManager in '..\..\Units\ColVisibleManager.pas',
+  PriceMarginBillsFme in '..\..\Frames\PriceMarginBillsFme.pas' {PriceMarginBillsFrame: TFrame},
   ReportPrepare in '..\..\Report\ReportPrepare.pas',
   rdpBillsGatherDm in '..\..\Report\DataPrepare\rdpBillsGatherDm.pas' {rdpBillsGatherData: TDataModule},
   rdpTables in '..\..\Report\DataPrepare\rdpTables.pas',
+  ColVisibleManager in '..\..\Units\ColVisibleManager.pas',
   ReportConnection in '..\..\Report\ReportConnection.pas',
   rgpGatherControl in '..\..\Report\ProjGather\rgpGatherControl.pas',
   rpgBillsCalcDm in '..\..\Report\ProjGather\rpgBillsCalcDm.pas' {rpgBillsCalcData: TDataModule},
@@ -195,21 +192,18 @@ uses
   rpgGatherData in '..\..\Report\ProjGather\rpgGatherData.pas',
   rpgGatherProjDm in '..\..\Report\ProjGather\rpgGatherProjDm.pas' {rpgGatherProjData: TDataModule},
   rProjGatherTables in '..\..\Report\ProjGather\rProjGatherTables.pas',
+  ProjGatherTree in '..\..\ProjGather\ProjGatherTree.pas',
   ProjGather in '..\..\ProjGather\ProjGather.pas',
+  CalcData in '..\..\Units\CalcData.pas',
   GatherProjInfo in '..\..\ProjGather\GatherProjInfo.pas',
   ProjGatherCalcData in '..\..\ProjGather\ProjGatherCalcData.pas',
   ProjGatherSelectFrm in '..\..\ProjGather\ProjGatherSelectFrm.pas' {ProjGatherSelectForm},
-  ProjGatherTree in '..\..\ProjGather\ProjGatherTree.pas',
-  CalcData in '..\..\Units\CalcData.pas',
   DealBillsExcelImport in '..\..\Units\DealBillsExcelImport.pas',
   ExcelImport_Bills in '..\..\Units\ExcelImport_Bills.pas',
   ExcelImport_GclBills in '..\..\Units\ExcelImport_GclBills.pas',
-  UpFileSelectOnLineFrm in '..\..\Forms\UpFileSelectOnLineFrm.pas' {UpFileSelectOnLineForm},
-  FileDownLoadFrm in '..\..\Forms\FileDownLoadFrm.pas' {FileDownLoadForm},
-  DebugUsers in '..\..\Units\DebugUsers.pas',
-  ScReportHelperUnit in '..\..\..\SmartCost\Reports\UI\ScReportHelperUnit.pas',
   DbTreeImport in '..\..\Units\DbTreeImport.pas',
-  DbTreeDm in '..\..\DataModules\DbTreeDm.pas',
+  DbTreeDm in '..\..\DataModules\DbTreeDm.pas' {DbTreeData: TDataModule},
+  DebugUsers in '..\..\Units\DebugUsers.pas',
   OtherMeasurePhaseDm in '..\..\DataModules\OtherMeasurePhaseDm.pas' {OtherMeasurePhaseData: TDataModule},
   OtherMeasureOnceDm in '..\..\DataModules\OtherMeasureOnceDm.pas' {OtherMeasureOnceData: TDataModule},
   OMPhaseRecord in '..\..\Units\DataRecord\OMPhaseRecord.pas',
@@ -217,37 +211,44 @@ uses
   ProjGatherSelectFme in '..\..\ProjGather\ProjGatherSelectFme.pas' {ProjGatherSelectFrame: TFrame},
   rpgZoneGatherControl in '..\..\Report\ProjGather\Zone\rpgZoneGatherControl.pas',
   rpgZoneProjGatherSelectFrm in '..\..\Report\ProjGather\Zone\rpgZoneProjGatherSelectFrm.pas' {rpgZoneProjGatherSelectForm},
-  SetGuestFrm in '..\..\Forms\SetGuestFrm.pas' {SetGuestForm},
+  UpFileSelectOnLineFrm in '..\..\Forms\UpFileSelectOnLineFrm.pas' {UpFileSelectOnLineForm},
   LogUtils in '..\..\Units\LogUtils.pas',
   ReportPdfHelper in '..\..\Units\ReportPdfHelper.pas',
   SelectOnlineSignPhaseFrm in '..\..\Forms\SelectOnlineSignPhaseFrm.pas' {SelectOnlineSignPhaseForm},
   SignOnlineReportsFrm in '..\..\Forms\SignOnlineReportsFrm.pas' {SignOnlineReportsForm},
   SignReports in '..\..\Units\SignReports.pas',
+  VirtualTrees in '..\..\..\SmartCost\Components\virtualtree\VirtualTrees.pas',
   TemplateManagerHelper in '..\..\Units\TemplateManagerHelper.pas',
   RenameSignReportFrm in '..\..\Forms\RenameSignReportFrm.pas' {RenameSignReportForm},
   rmWeiWuZjjlGatherDm in '..\..\DataModules\ReportMemoryDm\rmWeiWuZjjlGatherDm.pas' {rmWeiWuZjjlGatherData: TDataModule},
-  ReportHistoryFrm in '..\..\Forms\ReportHistoryFrm.pas' {ReportHistoryForm},
-  ReportManagerFrm in '..\..\Forms\ReportManagerFrm.pas' {ReportManagerForm},
+  SetGuestFrm in '..\..\Forms\SetGuestFrm.pas' {SetGuestForm},
+  ReportManagerFrm in '..\..\Forms\ReportManagerFrm.pas',
   ReportManagerDM in '..\..\DataModules\ReportManagerDM.pas' {Reports: TDataModule},
+  ReportHistoryFrm in '..\..\Forms\ReportHistoryFrm.pas' {ReportHistoryForm},
   ProjGatherDealPay in '..\..\ProjGather\ProjGatherDealPay.pas',
   ProjGatherProperties in '..\..\ProjGather\ProjGatherProperties.pas',
   rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule},
   superobject in '..\..\Units\superobject\superobject.pas',
-  superxmlparser in '..\..\Units\superobject\superxmlparser.pas',
+  FileDownLoadFrm in '..\..\Forms\FileDownLoadFrm.pas' {FileDownLoadForm},
   MeasureGatherZJJL in '..\..\Units\MeasureGatherZJJL.pas',
-  stgExcelExport in '..\..\SubTenderGather\stgExcelExport.pas',
-  stgGather in '..\..\SubTenderGather\stgGather.pas',
-  stgGatherCacheData in '..\..\SubTenderGather\stgGatherCacheData.pas',
   stgGatherControl in '..\..\SubTenderGather\stgGatherControl.pas',
+  stgGatherCacheData in '..\..\SubTenderGather\stgGatherCacheData.pas',
   stgGatherDm in '..\..\SubTenderGather\stgGatherDm.pas' {stgGatherData: TDataModule},
   stgGatherUtils in '..\..\SubTenderGather\stgGatherUtils.pas',
   stgResultFrm in '..\..\SubTenderGather\stgResultFrm.pas' {stgResultForm},
-  stgSelectFileFrm in '..\..\SubTenderGather\stgSelectFileFrm.pas' {stgSelectFileForm},
+  stgExcelExport in '..\..\SubTenderGather\stgExcelExport.pas',
   stgSubGatherFile in '..\..\SubTenderGather\stgSubGatherFile.pas',
   stgSubGatherFileDm in '..\..\SubTenderGather\stgSubGatherFileDm.pas' {stgSubGatherData: TDataModule},
   stgTables in '..\..\SubTenderGather\stgTables.pas',
+  stgGather in '..\..\SubTenderGather\stgGather.pas',
+  stgSelectFileFrm in '..\..\SubTenderGather\stgSelectFileFrm.pas' {stgSelectFileForm},
   rmZhongKaiDm in '..\..\DataModules\ReportMemoryDm\rmZhongKaiDm.pas' {rmZhongKaiData: TDataModule},
-  BillsPosTree in '..\..\Units\BillsPosTree.pas';
+  uGetMacAddr in '..\..\Units\uGetMacAddr.pas',
+  BillsPosTree in '..\..\Units\BillsPosTree.pas',
+  AttachmentInfoDm in '..\..\DataModules\AttachmentInfoDm.pas' {AttachmentInfoData: TDataModule},
+  DealPayFinalDm in '..\..\DataModules\DealPayFinalDm.pas' {DealPayFinalData: TDataModule},
+  rmWuJiuZqzfGatherDm in '..\..\DataModules\ReportMemoryDm\rmWuJiuZqzfGatherDm.pas' {rmWuJiuZqzfGatherData: TDataModule},
+  MScrollBox in '..\..\..\SmartCost\Components\MBaseControl\Source\MScrollBox.pas';
 
 {$R *.res}
 
@@ -286,18 +287,20 @@ begin
       {$IFDEF _mLoginNoPW}
       sName := PHPWeb.GetNameFromURLProtocol(ParamStr(1));
 
+         
       if sName = '' then         // 表示手工运行的
       begin
         Application.MessageBox('请从 项目管理信息平台 打开软件。', '系统提示', MB_OK + MB_ICONINFORMATION);
         Application.Terminate;
       end
       else
+
       begin
         // For Test only!
 //        Application.MessageBox(PChar(ParamStr(1) + #10#13 + sName), '系统提示', MB_OK + MB_ICONINFORMATION);
 //        Application.Terminate;
-        if sName[1] = '%' then
-          sName := UTF8Decode(HttpDecode(sName));
+        if sName[1]= '%' then
+           sName:=UTF8Decode(HttpDecode(sName));
 
         case PHPWeb.Login(sName, '', 2, sInfo, sURL) of
           ltLoginFail:

BIN
Dprs/CSL/Measure_Cloud.res


+ 12 - 1
Units/Globals.pas

@@ -18,6 +18,8 @@ function MemoryReportManager: TMemoryReportManager;
 
 function MeasureLog: TLogUtils;
 
+function TimeLog: TTimeLogManager;
+
 implementation
 
 var
@@ -28,6 +30,7 @@ var
   _ReportConfig: TReportConfig;
   _MemoryReportManager: TMemoryReportManager;
   _MeasureLog: TLogUtils;
+  _TimeLog: TTimeLogManager;
 
 function OpenProjectManager: TOpenProjectManager;
 begin
@@ -78,6 +81,13 @@ begin
   Result := _MeasureLog;
 end;
 
+function TimeLog: TTimeLogManager;
+begin
+  if not Assigned(_TimeLog) then
+    _TimeLog := TTimeLogManager.Create;
+  Result := _TimeLog;
+end;
+
 initialization
 
 finalization
@@ -87,5 +97,6 @@ finalization
   _ReportTemplateManager.Free;
   _ReportConfig.Free;
   _MemoryReportManager.Free;
-  _MeasureLog.Free;
+  _MeasureLog.Free;         
+  _TimeLog.Free;
 end.

+ 144 - 0
Units/LogUtils.pas

@@ -18,10 +18,46 @@ type
     procedure AppendLogTo(const ALog: string);
   end;
 
+  TTimeLog = class
+  private
+    FEndTime: TDateTime;
+    FBeginTime: TDateTime;
+    FName: string;
+  public
+    constructor Create(const AName: string);
+    procedure EndLog;
+
+    property Name: string read FName;
+    property BeginTime: TDateTime read FBeginTime;
+    property EndTime: TDateTime read FEndTime;
+  end;
+
+  TTimeLogManager = class
+  private
+    FLogFolder: string;
+    FLogFile: string;
+    FLogList: TList;
+
+    function FindTimeLog(const AName: string): TTimeLog;
+    function AddTimeLog(const AName: string): TTimeLog;
+    function GetTimeLog(const AName: string): TTimeLog;
+
+    procedure AppendLogTo(const ALog: string);
+  public
+    constructor Create;
+    destructor Destroy; override;
+
+    procedure ClearTimeLog;
+
+    procedure BeginTime(const AName: string);
+    procedure EndTime(const AName: string);
+  end;
+
 implementation
 
 uses SysUtils, UtilMethods, Math, ZhAPI;
 
+
 { TLog }
 
 procedure TLogUtils.AppendLogTo(const ALog: string);
@@ -60,4 +96,112 @@ begin
   inherited;
 end;
 
+{ TTimeLog }
+
+constructor TTimeLog.Create(const AName: string);
+begin
+  FName := AName;
+  FBeginTime := TickCount;
+end;
+
+procedure TTimeLog.EndLog;
+begin
+  FEndTime := TickCount;
+end;
+
+{ TTimeLogManager }
+
+function TTimeLogManager.AddTimeLog(const AName: string): TTimeLog;
+begin
+  Result := TTimeLog.Create(AName);
+  FLogList.Add(Result);
+end;
+
+procedure TTimeLogManager.AppendLogTo(const ALog: string);
+var
+  f: TextFile;
+begin
+  try
+    AssignFile(f, FLogFile);
+    if FileExists(FLogFile) then
+      Append(f)
+    else
+      Rewrite(f);
+    Writeln(f, ALog);
+    Flush(f);
+  finally
+    CloseFile(f);
+  end;
+end;
+
+procedure TTimeLogManager.BeginTime(const AName: string);
+var
+  vLog: TTimeLog;
+begin
+  vLog := GetTimeLog(AName);
+end;
+
+procedure TTimeLogManager.ClearTimeLog;
+begin
+  ClearObjects(FLogList);
+end;
+
+constructor TTimeLogManager.Create;
+var
+  vFormatSetting: TFormatSettings;
+begin
+  vFormatSetting.ShortDateFormat := 'yyyy/MM/dd';
+  vFormatSetting.DateSeparator := '-';
+  FLogFolder := GetAppFilePath + 'log';
+  if not DirectoryExists(FLogFolder) then
+    CreateDirectoryInDeep(FLogFolder);
+  FLogFile := FLogFolder + '\' + DateToStr(Date, vFormatSetting) + '.log';
+  FLogList := TList.Create;
+end;
+
+destructor TTimeLogManager.Destroy;
+begin
+  ClearTimeLog;
+  FLogList.Free;
+  inherited;
+end;
+
+procedure TTimeLogManager.EndTime(const AName: string);
+var
+  vLog: TTimeLog;
+begin
+  vLog := FindTimeLog(AName);
+  if Assigned(vLog) then
+  begin
+    vLog.EndLog;
+    AppendLogTo(Format('%s: %fms', [vLog.Name, vLog.EndTime - vLog.BeginTime]));
+  end
+  else
+    AppendLogTo(Format('Time Log %s not Assigned', [AName]));
+end;
+
+function TTimeLogManager.FindTimeLog(const AName: string): TTimeLog;
+var
+  i: Integer;
+begin
+  Result := nil;
+  for i := 0 to FLogList.Count - 1 do
+  begin
+    if (TTimeLog(FLogList.Items[i])).Name = AName then
+    begin
+      Result := TTimeLog(FLogList.Items[i]);
+      Break;
+    end;
+  end;
+end;
+
+function TTimeLogManager.GetTimeLog(const AName: string): TTimeLog;
+var
+  vLog: TTimeLog;
+begin
+  vLog := FindTimeLog(AName);
+  if not Assigned(vLog) then
+    vLog := AddTimeLog(AName);
+end;
+
 end.