mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-09 13:30:08 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
15 lines
434 B
Python
15 lines
434 B
Python
|
|
def OnInit(self):
|
|
|
|
self.name = "SingleApp-%s" % wx.GetUserId()
|
|
self.instance = wx.SingleInstanceChecker(self.name)
|
|
|
|
if self.instance.IsAnotherRunning():
|
|
wx.MessageBox("Another instance is running", "ERROR")
|
|
return False
|
|
|
|
frame = SingleAppFrame(None, "SingleApp")
|
|
frame.Show()
|
|
return True
|
|
|