MaiXinRong 6 rokov pred
rodič
commit
4e74055abd
3 zmenil súbory, kde vykonal 22 pridanie a 15 odobranie
  1. 13 13
      Forms/MainFrm.dfm
  2. 7 0
      Forms/MainFrm.pas
  3. 2 2
      Units/Connections.pas

+ 13 - 13
Forms/MainFrm.dfm

@@ -21,7 +21,7 @@ object MainForm: TMainForm
   object jtsProjects: TJimTabSet
     Left = 0
     Top = 49
-    Width = 734
+    Width = 742
     Height = 21
     Align = alTop
     BackgroundColor = clGradientInactiveCaption
@@ -45,8 +45,8 @@ object MainForm: TMainForm
   end
   object dxStatusBar: TdxStatusBar
     Left = 0
-    Top = 480
-    Width = 734
+    Top = 487
+    Width = 742
     Height = 20
     Panels = <
       item
@@ -78,12 +78,12 @@ object MainForm: TMainForm
     object dxStatusBarContainer2: TdxStatusBarContainerControl
       Left = 604
       Top = 2
-      Width = 128
+      Width = 136
       Height = 16
       object ProgressBar: TProgressBar
         Left = 0
         Top = 0
-        Width = 128
+        Width = 136
         Height = 16
         Align = alClient
         Max = 200
@@ -94,8 +94,8 @@ object MainForm: TMainForm
   object jpsMain: TJimPages
     Left = 0
     Top = 70
-    Width = 734
-    Height = 410
+    Width = 742
+    Height = 417
     ActivePage = jpsMainProjectsManager
     ActivePageIndex = 0
     Align = alClient
@@ -103,8 +103,8 @@ object MainForm: TMainForm
     object jpsMainProjectsManager: TJimPage
       Left = 0
       Top = 0
-      Width = 734
-      Height = 410
+      Width = 742
+      Height = 417
       TabName = 'ProjectsManager'
       Caption = 'ProjsMgr'
       object pnlUser: TPanel
@@ -201,8 +201,8 @@ object MainForm: TMainForm
     object jpsMainProjects: TJimPage
       Left = 0
       Top = 0
-      Width = 734
-      Height = 410
+      Width = 742
+      Height = 417
       TabName = 'Projects'
       Caption = 'Projects'
       object jpsProjects: TJimPages
@@ -220,7 +220,7 @@ object MainForm: TMainForm
     Font.Charset = DEFAULT_CHARSET
     Font.Color = clWindowText
     Font.Height = -12
-    Font.Name = #24494#36719#38597#40657
+    Font.Name = 'Microsoft YaHei UI'
     Font.Style = []
     Bars = <
       item
@@ -3396,7 +3396,7 @@ object MainForm: TMainForm
     object actnExportBillsJson: TAction
       Caption = #23548#20986#28165#21333'Json'#25968#25454
       OnExecute = actnExportBillsJsonExecute
-      OnUpdate = actnCloseProjectUpdate
+      OnUpdate = actnExportBillsJsonUpdate
     end
   end
   object dxpmTabSet: TdxBarPopupMenu

+ 7 - 0
Forms/MainFrm.pas

@@ -230,6 +230,7 @@ type
     procedure actnImportSubTenderGatherExecute(Sender: TObject);
     procedure actnImportSubTenderGatherUpdate(Sender: TObject);
     procedure actnExportBillsJsonExecute(Sender: TObject);
+    procedure actnExportBillsJsonUpdate(Sender: TObject);
   private
     FProjectManagerFrame: TProjectManagerFrame;
     FProjectFrames: TList;
@@ -963,4 +964,10 @@ begin
     CurProjectFrame.ProjectData.BillsCompileData.RecursiveExportBillsJson(sFileName);
 end;
 
+procedure TMainForm.actnExportBillsJsonUpdate(Sender: TObject);
+begin
+  TAction(Sender).Visible := _IsDebugView;
+  TAction(Sender).Enabled := jtsProjects.Tabs.Count > 1;
+end;
+
 end.

+ 2 - 2
Units/Connections.pas

@@ -229,6 +229,7 @@ begin
     sEncryptFile := GetTempFileName;
     CopyFileOrFolder(FFileName, sTempFile);
     try
+      CompactDatabase(sTempFile);
       AutoEncryptFile(sTempFile, sEncryptFile);
       RefreshFileHead;
       WriteAndAddHead(sEncryptFile);
@@ -522,8 +523,7 @@ end;
 
 procedure TEncryptConnection.UnEncryptSave;
 begin
-  RecoverFileHead(FFileName);
-  
+  RecoverFileHead(FFileName);  
 end;
 
 function TEncryptConnection.GetFileVersion: string;