forked from simjunheng/Metro_emulator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the typo error and added status bar to display the test mode.
- Loading branch information
1 parent
15ea144
commit 35403e3
Showing
4 changed files
with
27 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
import railwayPanelMap as pnlMap | ||
import dataMgr as dm | ||
|
||
FRAME_SIZE = (1800, 1000) | ||
FRAME_SIZE = (1800, 1030) | ||
|
||
#----------------------------------------------------------------------------- | ||
#----------------------------------------------------------------------------- | ||
|
@@ -46,9 +46,11 @@ def __init__(self, parent, id, title): | |
|
||
# Build UI sizer | ||
self.SetSizer(self._buidUISizer()) | ||
|
||
self.statusbar = self.CreateStatusBar(1) | ||
self.statusbar.SetStatusText('Test mode: %s' %str(gv.gTestMD)) | ||
# Set the periodic call back | ||
self.updateLock = False | ||
|
||
# Define the data manager parallel thread. | ||
gv.iDataMgr = dm.DataManager(self) | ||
gv.iDataMgr.start() | ||
|
@@ -57,7 +59,6 @@ def __init__(self, parent, id, title): | |
self.timer = wx.Timer(self) | ||
self.Bind(wx.EVT_TIMER, self.periodic) | ||
self.timer.Start(gv.PERIODIC) | ||
|
||
self.Bind(wx.EVT_CLOSE, self.onClose) | ||
gv.gDebugPrint("Metro-System real world main frame inited.", logType=gv.LOG_INFO) | ||
|
||
|
@@ -197,7 +198,7 @@ def onLoadScenario(self, event): | |
#----------------------------------------------------------------------------- | ||
def onHelp(self, event): | ||
""" Pop-up the Help information window. """ | ||
wx.MessageBox(' If there is any bug, please contect: \n\n \ | ||
wx.MessageBox(' If there is any bug, please contact: \n\n \ | ||
Author: Yuancheng Liu \n \ | ||
Email: [email protected] \n \ | ||
Created: 2023/05/02 \n \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
import scadaDataMgr as dataMgr | ||
|
||
PERIODIC = 500 # update in every 500ms | ||
FRAME_SIZE = (1800, 1020) | ||
FRAME_SIZE = (1800, 1030) | ||
|
||
#----------------------------------------------------------------------------- | ||
#----------------------------------------------------------------------------- | ||
|
@@ -42,6 +42,10 @@ def __init__(self, parent, id, title): | |
self._buildMenuBar() | ||
# Build UI sizer | ||
self.SetSizer(self._buidUISizer()) | ||
|
||
self.statusbar = self.CreateStatusBar(1) | ||
self.statusbar.SetStatusText('Test mode: %s' %str(gv.TEST_MD)) | ||
|
||
self.updateLock = False | ||
if not gv.TEST_MD: | ||
gv.idataMgr = dataMgr.DataManager(self, gv.gPlcInfo) | ||
|
@@ -214,7 +218,7 @@ def periodic(self, event): | |
#----------------------------------------------------------------------------- | ||
def onHelp(self, event): | ||
""" Pop-up the Help information window. """ | ||
wx.MessageBox(' If there is any bug, please contect: \n\n \ | ||
wx.MessageBox(' If there is any bug, please contact: \n\n \ | ||
Author: Yuancheng Liu \n \ | ||
Email: [email protected] \n \ | ||
Created: 2023/05/02 \n \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters