HANTE 4 сар өмнө
parent
commit
e2e988f10b

+ 1 - 1
RUN/Cfg/VMSCommServer.ini

@@ -54,7 +54,7 @@ TRAFFIC_CENTER =1
 3= ü
 
 [LOG]
-LOGDAY  =02
+LOGDAY  =03
 LOGLINE =1000
 INFO    =1
 DATA    =0

+ 23 - 8
SRC/FrmMainF.cpp

@@ -1948,23 +1948,20 @@ void __fastcall TVmsCommMain::RestartApplication(String AHangJobName)
 #if 0
     bool bRestart = false;
     String sRestart;
-    if (APP_ReadConfigInfo("APPLICATION", "RESTART", sRestart))
-    {
+    if (APP_ReadConfigInfo("APPLICATION", "RESTART", sRestart)) {
         if (sRestart.UpperCase() == "TRUE")
         {
             bRestart = true;
         }
     }
 
-    if (bRestart)
-    {
-        MERROR("DBMS Job Hang Error: Server Self Die.... By %s", AnsiString(AHangJobName).c_str());
+    if (bRestart) {
+        MERROR("Restart Application: Cause.... By %s", AnsiString(AHangJobName).c_str());
         String sRestartApp = g_sAppDir + "RestarterApp.exe";
         if (FileExists(sRestartApp))
         {
             try {
-                for (thrIterator it=G_Threads.FObjects.begin(); it != G_Threads.FObjects.end(); ++it)
-                {
+                for (thrIterator it=G_Threads.FObjects.begin(); it != G_Threads.FObjects.end(); ++it) {
                     TItsThread *pObj = (TItsThread*)it->second;
                     if (pObj->Name == AHangJobName)
                     {
@@ -1984,10 +1981,28 @@ void __fastcall TVmsCommMain::RestartApplication(String AHangJobName)
             Close();
         }
         else {
-            MERROR("DBMS Job Hang Error: Server Self Die....: Not Found RestarterApp.exe.");
+            MERROR("Restart Application: Not Found RestarterApp.exe.");
         }
     }
 #endif
 }
 //---------------------------------------------------------------------------
 
+void __fastcall TVmsCommMain::tobMenuDblClick(TObject *Sender)
+{
+    if (Splitter1->Visible) {
+        Splitter1->Visible = false;
+        pnlLog->Visible = false;
+        FrmSysLog->chkLogPause->Checked = true;
+        //pnlController->Align = alClient;
+        //pnlLog->Align = alClient;
+    }
+    else {
+        //pnlController->Align = alTop;
+        pnlLog->Visible = true;
+        Splitter1->Visible = true;
+        //pnlLog->Align = alClient;
+    }
+}
+//---------------------------------------------------------------------------
+

+ 111 - 65
SRC/FrmMainF.dfm

@@ -2,10 +2,10 @@ object VmsCommMain: TVmsCommMain
   Left = 0
   Top = 0
   Caption = 'VMS '#53685#49888' '#49436#48260
-  ClientHeight = 694
-  ClientWidth = 911
+  ClientHeight = 541
+  ClientWidth = 855
   Color = clWhite
-  Constraints.MinHeight = 600
+  Constraints.MinHeight = 500
   Constraints.MinWidth = 800
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
@@ -158,23 +158,25 @@ object VmsCommMain: TVmsCommMain
   TextHeight = 13
   object Splitter1: TSplitter
     Left = 0
-    Top = 367
-    Width = 911
+    Top = 368
+    Width = 855
     Height = 5
     Cursor = crVSplit
-    Align = alTop
+    Align = alBottom
     Beveled = True
     Color = clBackground
     MinSize = 60
     ParentColor = False
     ResizeStyle = rsLine
-    ExplicitTop = 271
-    ExplicitWidth = 726
+    Visible = False
+    ExplicitLeft = 8
+    ExplicitTop = 364
+    ExplicitWidth = 842
   end
   object tobMenu: TToolBar
     Left = 0
     Top = 0
-    Width = 911
+    Width = 855
     Height = 58
     AutoSize = True
     ButtonHeight = 52
@@ -190,6 +192,10 @@ object VmsCommMain: TVmsCommMain
     ParentFont = False
     ShowCaptions = True
     TabOrder = 0
+    OnDblClick = tobMenuDblClick
+    ExplicitLeft = 8
+    ExplicitTop = -6
+    ExplicitWidth = 842
     object tbConnect: TToolButton
       Left = 0
       Top = 0
@@ -244,15 +250,15 @@ object VmsCommMain: TVmsCommMain
   end
   object plBottom: TPanel
     Left = 0
-    Top = 664
-    Width = 911
-    Height = 30
+    Top = 508
+    Width = 855
+    Height = 33
     Margins.Left = 0
     Margins.Top = 0
     Margins.Right = 0
     Margins.Bottom = 0
     Align = alBottom
-    BevelOuter = bvNone
+    BevelInner = bvLowered
     Font.Charset = DEFAULT_CHARSET
     Font.Color = clWindowText
     Font.Height = -11
@@ -262,10 +268,10 @@ object VmsCommMain: TVmsCommMain
     TabOrder = 1
     object plStateAction: TPanel
       AlignWithMargins = True
-      Left = 3
-      Top = 2
+      Left = 5
+      Top = 4
       Width = 50
-      Height = 26
+      Height = 25
       Hint = #53685#49888#49436#48260' '#49345#53468
       Margins.Top = 2
       Margins.Right = 0
@@ -284,13 +290,16 @@ object VmsCommMain: TVmsCommMain
       ParentFont = False
       TabOrder = 0
       OnDblClick = plStateActionDblClick
+      ExplicitLeft = 3
+      ExplicitTop = 2
+      ExplicitHeight = 26
     end
     object plStateComm: TPanel
       AlignWithMargins = True
-      Left = 53
-      Top = 2
+      Left = 55
+      Top = 4
       Width = 50
-      Height = 26
+      Height = 25
       Hint = #51204#52404' '#51228#50612#44592' '#53685#49888' '#49345#53468
       Margins.Left = 0
       Margins.Top = 2
@@ -310,13 +319,16 @@ object VmsCommMain: TVmsCommMain
       ParentFont = False
       TabOrder = 1
       OnDblClick = plStateCommDblClick
+      ExplicitLeft = 53
+      ExplicitTop = 2
+      ExplicitHeight = 26
     end
     object plStateDb: TPanel
       AlignWithMargins = True
-      Left = 103
-      Top = 2
+      Left = 105
+      Top = 4
       Width = 50
-      Height = 26
+      Height = 25
       Hint = #45936#51060#53552#48288#51060#49828' '#49345#53468
       Margins.Left = 0
       Margins.Top = 2
@@ -336,13 +348,16 @@ object VmsCommMain: TVmsCommMain
       ParentFont = False
       TabOrder = 2
       OnDblClick = plStateDbDblClick
+      ExplicitLeft = 103
+      ExplicitTop = 2
+      ExplicitHeight = 26
     end
     object plTime: TPanel
       AlignWithMargins = True
-      Left = 683
-      Top = 2
+      Left = 625
+      Top = 4
       Width = 170
-      Height = 26
+      Height = 25
       Margins.Top = 2
       Margins.Bottom = 2
       Align = alRight
@@ -363,13 +378,16 @@ object VmsCommMain: TVmsCommMain
       ParentFont = False
       TabOrder = 3
       OnDblClick = plTimeDblClick
+      ExplicitLeft = 683
+      ExplicitTop = 2
+      ExplicitHeight = 26
     end
     object Panel1: TPanel
       AlignWithMargins = True
-      Left = 640
-      Top = 2
+      Left = 582
+      Top = 4
       Width = 37
-      Height = 26
+      Height = 25
       Margins.Top = 2
       Margins.Bottom = 2
       Align = alRight
@@ -379,12 +397,15 @@ object VmsCommMain: TVmsCommMain
       ParentColor = True
       TabOrder = 4
       Visible = False
+      ExplicitLeft = 640
+      ExplicitTop = 2
+      ExplicitHeight = 26
       object Panel16: TPanel
         AlignWithMargins = True
         Left = 3
         Top = 1
         Width = 0
-        Height = 20
+        Height = 19
         Cursor = crHandPoint
         Margins.Top = 1
         Margins.Bottom = 1
@@ -394,13 +415,14 @@ object VmsCommMain: TVmsCommMain
         ParentBackground = False
         TabOrder = 0
         OnDblClick = Panel16DblClick
+        ExplicitHeight = 20
       end
       object plThread: TPanel
         AlignWithMargins = True
         Left = -227
         Top = 0
         Width = 65
-        Height = 22
+        Height = 21
         Hint = 'Thread(EA)'
         Margins.Left = 0
         Margins.Top = 0
@@ -419,13 +441,14 @@ object VmsCommMain: TVmsCommMain
         ParentBackground = False
         ParentFont = False
         TabOrder = 1
+        ExplicitHeight = 22
       end
       object plMemory: TPanel
         AlignWithMargins = True
         Left = -162
         Top = 0
         Width = 65
-        Height = 22
+        Height = 21
         Hint = 'Memory(KB)'
         Margins.Left = 0
         Margins.Top = 0
@@ -444,13 +467,14 @@ object VmsCommMain: TVmsCommMain
         ParentBackground = False
         ParentFont = False
         TabOrder = 2
+        ExplicitHeight = 22
       end
       object plGdi: TPanel
         AlignWithMargins = True
         Left = -97
         Top = 0
         Width = 65
-        Height = 22
+        Height = 21
         Hint = 'GDI Object(EA)'
         Margins.Left = 0
         Margins.Top = 0
@@ -469,13 +493,14 @@ object VmsCommMain: TVmsCommMain
         ParentBackground = False
         ParentFont = False
         TabOrder = 3
+        ExplicitHeight = 22
       end
       object plHandle: TPanel
         AlignWithMargins = True
         Left = -32
         Top = 0
         Width = 65
-        Height = 22
+        Height = 21
         Hint = 'Handle(EA)'
         Margins.Left = 0
         Margins.Top = 0
@@ -494,26 +519,31 @@ object VmsCommMain: TVmsCommMain
         ParentBackground = False
         ParentFont = False
         TabOrder = 4
+        ExplicitHeight = 22
       end
     end
     object Panel2: TPanel
       AlignWithMargins = True
-      Left = 156
-      Top = 1
-      Width = 378
-      Height = 28
+      Left = 158
+      Top = 3
+      Width = 298
+      Height = 27
       Margins.Top = 1
       Margins.Bottom = 1
       Align = alClient
       BevelOuter = bvNone
       ParentBackground = False
       TabOrder = 5
+      ExplicitLeft = 156
+      ExplicitTop = 1
+      ExplicitWidth = 378
+      ExplicitHeight = 28
       object pnlTraf: TPanel
         AlignWithMargins = True
-        Left = 184
+        Left = 104
         Top = 2
         Width = 191
-        Height = 24
+        Height = 23
         Hint = 'VMS '#47700#49884#51648' '#51228#44277' '#49884#44033
         Margins.Top = 2
         Margins.Bottom = 2
@@ -535,14 +565,16 @@ object VmsCommMain: TVmsCommMain
         ParentFont = False
         TabOrder = 0
         OnDblClick = pnlTrafDblClick
+        ExplicitLeft = 184
+        ExplicitHeight = 24
       end
     end
     object plStateLog: TPanel
       AlignWithMargins = True
-      Left = 537
-      Top = 2
-      Width = 25
-      Height = 26
+      Left = 459
+      Top = 4
+      Width = 30
+      Height = 25
       Hint = 'Log Thread'
       Margins.Left = 0
       Margins.Top = 2
@@ -561,13 +593,15 @@ object VmsCommMain: TVmsCommMain
       ParentBackground = False
       ParentFont = False
       TabOrder = 6
+      ExplicitLeft = 479
+      ExplicitHeight = 27
     end
     object plStateDbm: TPanel
       AlignWithMargins = True
-      Left = 562
-      Top = 2
-      Width = 25
-      Height = 26
+      Left = 489
+      Top = 4
+      Width = 30
+      Height = 25
       Hint = 'DB Thread'
       Margins.Left = 0
       Margins.Top = 2
@@ -586,13 +620,15 @@ object VmsCommMain: TVmsCommMain
       ParentBackground = False
       ParentFont = False
       TabOrder = 7
+      ExplicitLeft = 504
+      ExplicitHeight = 27
     end
     object plStateJob: TPanel
       AlignWithMargins = True
-      Left = 612
-      Top = 2
-      Width = 25
-      Height = 26
+      Left = 549
+      Top = 4
+      Width = 30
+      Height = 25
       Hint = 'Job Thread'
       Margins.Left = 0
       Margins.Top = 2
@@ -611,13 +647,15 @@ object VmsCommMain: TVmsCommMain
       ParentBackground = False
       ParentFont = False
       TabOrder = 8
+      ExplicitLeft = 554
+      ExplicitHeight = 27
     end
     object plRemain: TPanel
       AlignWithMargins = True
-      Left = 859
-      Top = 2
+      Left = 801
+      Top = 4
       Width = 49
-      Height = 26
+      Height = 25
       Margins.Top = 2
       Margins.Bottom = 2
       Align = alRight
@@ -638,13 +676,16 @@ object VmsCommMain: TVmsCommMain
       ParentFont = False
       TabOrder = 9
       OnDblClick = plRemainDblClick
+      ExplicitLeft = 859
+      ExplicitTop = 2
+      ExplicitHeight = 26
     end
     object plStateDbmRead: TPanel
       AlignWithMargins = True
-      Left = 587
-      Top = 2
-      Width = 25
-      Height = 26
+      Left = 519
+      Top = 4
+      Width = 30
+      Height = 25
       Hint = 'DB Thread'
       Margins.Left = 0
       Margins.Top = 2
@@ -663,35 +704,40 @@ object VmsCommMain: TVmsCommMain
       ParentBackground = False
       ParentFont = False
       TabOrder = 10
+      ExplicitLeft = 529
+      ExplicitHeight = 27
     end
   end
   object pnlLog: TPanel
     AlignWithMargins = True
     Left = 0
-    Top = 372
-    Width = 911
-    Height = 292
+    Top = 373
+    Width = 855
+    Height = 135
     Margins.Left = 0
     Margins.Top = 0
     Margins.Right = 0
     Margins.Bottom = 0
-    Align = alClient
+    Align = alBottom
     BevelOuter = bvNone
     TabOrder = 2
+    Visible = False
+    ExplicitTop = 376
   end
   object pnlController: TPanel
     AlignWithMargins = True
     Left = 0
     Top = 58
-    Width = 911
-    Height = 309
+    Width = 855
+    Height = 310
     Margins.Left = 0
     Margins.Top = 0
     Margins.Right = 0
     Margins.Bottom = 0
-    Align = alTop
+    Align = alClient
     BevelOuter = bvNone
     TabOrder = 3
+    ExplicitHeight = 311
   end
   object tmrAppState: TTimer
     OnTimer = tmrAppStateTimer

+ 1 - 0
SRC/FrmMainF.h

@@ -87,6 +87,7 @@ __published:	// IDE-managed Components
     void __fastcall tmrDbReadTimer(TObject *Sender);
     void __fastcall pnlTrafDblClick(TObject *Sender);
     void __fastcall tmrDbWriteTimer(TObject *Sender);
+    void __fastcall tobMenuDblClick(TObject *Sender);
 
 private:	// User declarations
     bool            FServerRun;     //¼­¹ö ±âµ¿/Á¤Áö

+ 3 - 4
SRC/LIB/FrmSysLogF.dfm

@@ -68,9 +68,12 @@ object FrmSysLog: TFrmSysLog
         Hint = 'Log Message Display pause/start'
         Align = alRight
         Caption = 'Pause'
+        Checked = True
         ParentShowHint = False
         ShowHint = True
+        State = cbChecked
         TabOrder = 1
+        OnClick = chkLogPauseClick
       end
       object btnClear: TButton
         Left = 704
@@ -136,10 +139,6 @@ object FrmSysLog: TFrmSysLog
       ShowHint = False
       TabOrder = 1
       WordWrap = False
-      ExplicitLeft = 152
-      ExplicitTop = 128
-      ExplicitWidth = 646
-      ExplicitHeight = 169
     end
   end
 end

+ 2 - 0
SRC/LIB/FrmSysLogF.h

@@ -28,9 +28,11 @@ __published:	// IDE-managed Components
     void __fastcall btnClearClick(TObject *Sender);
     void __fastcall btnCopyClick(TObject *Sender);
     void __fastcall FormShow(TObject *Sender);
+    void __fastcall chkLogPauseClick(TObject *Sender);
 
 private:	// User declarations
 public:
+    bool FPause;
 
 public:		// User declarations
     __fastcall TFrmSysLog(TComponent* Owner);

+ 1 - 0
SRC/LIB/JobThreadF.h

@@ -24,6 +24,7 @@ public:
 
     int __fastcall SendVmsFormDownload();
     int __fastcall SendVmsStatusReq();
+    void __fastcall updateLedColor(TColor AColor);
 };
 //---------------------------------------------------------------------------
 extern PACKAGE TJobThread *JobThread;

+ 1 - 0
SRC/LIB/LogThreadF.h

@@ -20,6 +20,7 @@ public:
     virtual void __fastcall Cancel()
     {
     };
+    void __fastcall updateLedColor(TColor AColor);
 };
 //---------------------------------------------------------------------------
 extern PACKAGE TLogThread *LogThread;

+ 10 - 1
SRC/VMSCommLib/FRM/FrmSysLogF.cpp

@@ -14,6 +14,8 @@ __fastcall TFrmSysLog::TFrmSysLog(TComponent* Owner)
     : TForm(Owner)
 {
     reMsg->Lines->Clear();
+    FPause = true;
+    chkLogPause->Checked = FPause;
 }
 //---------------------------------------------------------------------------
 
@@ -46,6 +48,7 @@ void __fastcall TFrmSysLog::btnCopyClick(TObject *Sender)
 
 void __fastcall TFrmSysLog::OnWMLogDisplayMessage(TMessage &Msg)
 {
+    if (!Showing) return;
     if (chkLogPause->Checked) return;
 
     IPC_LOG_MESSAGE *pLog = (IPC_LOG_MESSAGE *)Msg.WParam;
@@ -61,7 +64,7 @@ void __fastcall TFrmSysLog::OnWMLogDisplayMessage(TMessage &Msg)
         //ReplyMessage(0);
         LogWrite(&Log);
 #else
-        ReplyMessage(0);
+        //ReplyMessage(0);
         LogWrite(pLog);
 #endif
     }
@@ -142,3 +145,9 @@ void TFrmSysLog::DisplayMsg(String& AMsg)
 //---------------------------------------------------------------------------
 
 
+void __fastcall TFrmSysLog::chkLogPauseClick(TObject *Sender)
+{
+    FPause = chkLogPause->Checked;
+}
+//---------------------------------------------------------------------------
+

+ 3 - 4
SRC/VMSCommLib/FRM/FrmSysLogF.dfm

@@ -68,9 +68,12 @@ object FrmSysLog: TFrmSysLog
         Hint = 'Log Message Display pause/start'
         Align = alRight
         Caption = 'Pause'
+        Checked = True
         ParentShowHint = False
         ShowHint = True
+        State = cbChecked
         TabOrder = 1
+        OnClick = chkLogPauseClick
       end
       object btnClear: TButton
         Left = 704
@@ -136,10 +139,6 @@ object FrmSysLog: TFrmSysLog
       ShowHint = False
       TabOrder = 1
       WordWrap = False
-      ExplicitLeft = 152
-      ExplicitTop = 128
-      ExplicitWidth = 646
-      ExplicitHeight = 169
     end
   end
 end

+ 2 - 0
SRC/VMSCommLib/FRM/FrmSysLogF.h

@@ -28,9 +28,11 @@ __published:	// IDE-managed Components
     void __fastcall btnClearClick(TObject *Sender);
     void __fastcall btnCopyClick(TObject *Sender);
     void __fastcall FormShow(TObject *Sender);
+    void __fastcall chkLogPauseClick(TObject *Sender);
 
 private:	// User declarations
 public:
+    bool FPause;
 
 public:		// User declarations
     __fastcall TFrmSysLog(TComponent* Owner);

+ 0 - 2
SRC/VMSCommLib/THREAD/DbmReadThreadF.cpp

@@ -47,8 +47,6 @@ void __fastcall TDbmReadThread::updateLedColor(TColor AColor)
     try {
         if (FPnlState) {
             PostMessage((HWND)g_AppCfg.lMainWinHandle, WM_PANEL_REFRESH, 1, (LPARAM)AColor);
-            //FPnlState->Color = AColor;
-            //FPnlState->Refresh();
         }
     } catch(Exception &e) {}
 }

+ 0 - 4
SRC/VMSCommLib/THREAD/DbmThreadF.cpp

@@ -47,8 +47,6 @@ void __fastcall TDbmThread::updateLedColor(TColor AColor)
     try {
         if (FPnlState) {
             PostMessage((HWND)g_AppCfg.lMainWinHandle, WM_PANEL_REFRESH, 2, (LPARAM)AColor);
-            //FPnlState->Color = AColor;
-            //FPnlState->Refresh();
         }
     } catch(Exception &e) {}
 }
@@ -63,8 +61,6 @@ DWORD __fastcall TDbmThread::Process(LPVOID AParam)
 
 	CoInitialize(NULL);
 
-    TPanel *pState = FPnlState;
-
     FDb = new TDMAdoDb(NULL);
     if (g_AppCfg.IsDbConnectPerJob == false)
     {

+ 14 - 8
SRC/VMSCommLib/THREAD/JobThreadF.cpp

@@ -27,6 +27,16 @@ TJobThread::~TJobThread()
 }
 //---------------------------------------------------------------------------
 
+void __fastcall TJobThread::updateLedColor(TColor AColor)
+{
+    try {
+        if (FPnlState) {
+            PostMessage((HWND)g_AppCfg.lMainWinHandle, WM_PANEL_REFRESH, 3, (LPARAM)AColor);
+        }
+    } catch(Exception &e) {}
+}
+//---------------------------------------------------------------------------
+
 DWORD __fastcall TJobThread::Process(LPVOID AParam)
 {
     TClientSession  *pSession;
@@ -36,13 +46,9 @@ DWORD __fastcall TJobThread::Process(LPVOID AParam)
     char            *pRcvBuff;
     OverlappedIO     overlappedIO;
 
-    TPanel *pState = FPnlState;
-
     while(!IsTerm() && !g_AppCfg.bThrExit)
     {
-        try {
-            if (pState) pState->Color = pState->Color == clLime ? clGreen : clRed;
-        }catch(Exception &e) {}
+        updateLedColor(clGreen);
 
         if (!g_jobQ.PopBlocking(dwJob))
         {
@@ -55,7 +61,7 @@ DWORD __fastcall TJobThread::Process(LPVOID AParam)
         else
         if (dwJob == Q_TICK)
         {
-            if (pState) pState->Color = clLime;
+            updateLedColor(clRed);
 
             ClientSessionManager->SendFlushAllClient();
             ClientSessionManager->CheckCommandTimeoutSessions();
@@ -68,7 +74,7 @@ DWORD __fastcall TJobThread::Process(LPVOID AParam)
         else
         if (dwJob == eTcpCloseAll)
         {
-            if (pState) pState->Color = clLime;
+            updateLedColor(clLime);
 
             ClientSessionManager->CloseAll();
             continue;
@@ -88,7 +94,7 @@ DWORD __fastcall TJobThread::Process(LPVOID AParam)
             continue;
         }
 
-        if (pState) pState->Color = clLime;
+        updateLedColor(clLime);
 
         pMsg = (IPC_JOB_MESSAGE*)dwJob;
 

+ 1 - 0
SRC/VMSCommLib/THREAD/JobThreadF.h

@@ -24,6 +24,7 @@ public:
 
     int __fastcall SendVmsFormDownload();
     int __fastcall SendVmsStatusReq();
+    void __fastcall updateLedColor(TColor AColor);
 };
 //---------------------------------------------------------------------------
 extern PACKAGE TJobThread *JobThread;

+ 14 - 10
SRC/VMSCommLib/THREAD/LogThreadF.cpp

@@ -23,6 +23,16 @@ TLogThread::~TLogThread()
 }
 //---------------------------------------------------------------------------
 
+void __fastcall TLogThread::updateLedColor(TColor AColor)
+{
+    try {
+        if (FPnlState) {
+            PostMessage((HWND)g_AppCfg.lMainWinHandle, WM_PANEL_REFRESH, 0, (LPARAM)AColor);
+        }
+    } catch(Exception &e) {}
+}
+//---------------------------------------------------------------------------
+
 DWORD __fastcall TLogThread::Process(LPVOID AParam)
 {
     IPC_LOG_MESSAGE *pLog;
@@ -33,13 +43,9 @@ DWORD __fastcall TLogThread::Process(LPVOID AParam)
     TITSLog  *pLogObj;
     TCDSCtlr *pCDSCtlr;
 
-    TPanel *pState = FPnlState;
-
     while(!IsTerm() && !g_AppCfg.bThrExit)
     {
-        try {
-            if (pState) pState->Color = pState->Color == clLime ? clGreen : clRed;
-        }catch(Exception &e) {}
+        updateLedColor(clGreen);
 
         if (!g_logQ.PopBlocking(dwJob))
         {
@@ -52,13 +58,11 @@ DWORD __fastcall TLogThread::Process(LPVOID AParam)
         else
         if (dwJob == Q_TICK)
         {
-            try {
-                if (pState) pState->Color = pState->Color == clRed ? clGreen : clRed;
-            }catch(Exception &e) {}
+            updateLedColor(clRed);
             continue;
         }
 
-        if (pState) pState->Color = clLime;
+        updateLedColor(clLime);
 
         pLog = (IPC_LOG_MESSAGE*)dwJob;
         Msg.WParam = (int)pLog;
@@ -71,7 +75,7 @@ DWORD __fastcall TLogThread::Process(LPVOID AParam)
         try {
             if (pLog->Target == log_sys)
             {
-                if (FrmSysLog)
+                if (FrmSysLog && !FrmSysLog->FPause)
                 {
                     FrmSysLog->OnWMLogDisplayMessage(Msg);
                 }

+ 1 - 0
SRC/VMSCommLib/THREAD/LogThreadF.h

@@ -20,6 +20,7 @@ public:
     virtual void __fastcall Cancel()
     {
     };
+    void __fastcall updateLedColor(TColor AColor);
 };
 //---------------------------------------------------------------------------
 extern PACKAGE TLogThread *LogThread;