Bladeren bron

编译紫光和全国云版,通过编译指令控制版本。

builder 8 jaren geleden
bovenliggende
commit
959a2ef06e
3 gewijzigde bestanden met toevoegingen van 54 en 3 verwijderingen
  1. 3 2
      Dprs/Pro/Measure_Cloud.dof
  2. 50 0
      Dprs/Pro/Measure_Cloud.dpr
  3. 1 1
      Forms/MainFrm.dfm

+ 3 - 2
Dprs/Pro/Measure_Cloud.dof

@@ -137,9 +137,10 @@ ProductVersion=3.1.6.2
 C:\Program Files (x86)\Borland\Delphi7\Lib\3F\Developer Express Inc\ExpressEditors Library 5\Delphi 7\Bin\dclcxEditorsVCLD7.bpl=ExpressEditors Library 5 (VCL Edition) by Developer Express Inc.
 C:\Program Files (x86)\Borland\Delphi7\Lib\3F\Developer Express Inc\ExpressEditors Library 5\Delphi 7\Bin\dclcxEditorsVCLD7.bpl=ExpressEditors Library 5 (VCL Edition) by Developer Express Inc.
 C:\Program Files (x86)\Borland\Delphi7\Lib\3F\Developer Express Inc\ExpressEditors Library 5\Delphi 7\Bin\dclcxExtEditorsVCLD7.bpl=ExpressExtendedEditors Library 5 (VCL Edition) by Developer Express Inc.
 C:\Program Files (x86)\Borland\Delphi7\Lib\3F\Developer Express Inc\ExpressEditors Library 5\Delphi 7\Bin\dclcxExtEditorsVCLD7.bpl=ExpressExtendedEditors Library 5 (VCL Edition) by Developer Express Inc.
 [HistoryLists\hlConditionals]
 [HistoryLists\hlConditionals]
-Count=2
+Count=3
 Item0=_mCloud;
 Item0=_mCloud;
-Item1=_mCloud;_mDebugView
+Item1=_mCloud;_mLoginNoPW;
+Item2=_mCloud;_mDebugView
 [HistoryLists\hlUnitAliases]
 [HistoryLists\hlUnitAliases]
 Count=1
 Count=1
 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;

+ 50 - 0
Dprs/Pro/Measure_Cloud.dpr

@@ -218,6 +218,8 @@ uses
 var
 var
   Mutex: THandle;
   Mutex: THandle;
   IPForm: TIPForm;
   IPForm: TIPForm;
+  vFDForm: TFileDownLoadForm;
+  sInfo, sURL, sName: string;
 
 
 begin
 begin
   Mutex := CreateMutex(nil, True, G_AppHandleName);
   Mutex := CreateMutex(nil, True, G_AppHandleName);
@@ -245,11 +247,59 @@ begin
         IPForm.Free;
         IPForm.Free;
       end;
       end;
 
 
+      {$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;
+
+        case PHPWeb.Login(sName, '', 2, sInfo, sURL) of
+          ltLoginFail:
+          begin
+            Application.MessageBox('该用户尚未注册不能登录!', '操作提醒', MB_OK + MB_ICONWARNING);
+            Application.Terminate;
+          end;
+
+          ltUpdate:  // 升级
+          begin
+            if Application.MessageBox(PChar(sInfo), '系统提示', MB_OKCANCEL + MB_ICONQUESTION) = ID_OK then
+            begin
+              vFDForm := TFileDownLoadForm.Create(nil);
+              try
+                vFDForm.URL := sURL;
+                vFDForm.ShowModal;
+              finally
+                vFDForm.Free;
+              end;
+            end;
+          end;
+
+          ltDisCon:
+          begin
+            Application.MessageBox('网络错误,请稍后重试!', '操作提醒', MB_OK + MB_ICONWARNING);
+            Application.Terminate;
+          end;
+
+        else
+          ;
+        end;  
+      end;
+
+      {$ELSE}
       if not LoginForm then
       if not LoginForm then
       begin
       begin
         Application.Terminate;
         Application.Terminate;
         Exit;
         Exit;
       end;
       end;
+      {$ENDIF}
+      
     {$ENDIF}
     {$ENDIF}
 
 
     if CheckDogExists then
     if CheckDogExists then

+ 1 - 1
Forms/MainFrm.dfm

@@ -1,5 +1,5 @@
 object MainForm: TMainForm
 object MainForm: TMainForm
-  Left = 539
+  Left = 540
   Top = 329
   Top = 329
   Width = 750
   Width = 750
   Height = 538
   Height = 538