Changeset 743 for moxy/trunk/src
- Timestamp:
- Dec 26, 2011 1:21:12 AM (13 years ago)
- Location:
- moxy/trunk/src/moxy
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified moxy/trunk/src/moxy/vc_axis.py ¶
r742 r743 25 25 from m_pv import PvConnection 26 26 from m_axis import SingleAxis 27 from vc_axis_configure import AxisConfigure_Dialog 27 28 28 29 … … 58 59 59 60 def OnExit(self): 60 print "OnExit", self.axis61 #print "OnExit", self.axis 61 62 self.axis.disconnect() 62 63 … … 67 68 ''' 68 69 def __init__(self, parent, axis): #@ReservedAssignment 69 wx.Frame.__init__(self, parent, wx.ID_ANY, 'DemoView', size=(200,300)) 70 self.axis = axis 71 wx.Frame.__init__(self, parent, wx.ID_ANY, 'DemoView', size=(240,300)) 70 72 self.SetToolTipString(u'Single Axis DemoFrame') 71 73 self.panel = SingleAxisPanel(parent=self, axis=axis) … … 79 81 dlg.Destroy() 80 82 if result == wx.ID_OK: 81 # TODO: here is where to disconnect() the PVs, need "axis" above 82 # see: http://wiki.wxpython.org/wxPython%20by%20Example 83 # see: http://docs.wxwidgets.org/stable/wx_wxdialog.html 83 self.axis.disconnect() 84 84 self.Destroy() 85 85 … … 98 98 self.connected = False 99 99 self.show_buttons = show_buttons 100 self.parent = parent 100 101 101 102 wx.Panel.__init__(self, id=wx.ID_ANY, parent=parent) … … 229 230 def doConfigureButton(self, event): 230 231 '''run dialog to configure the EPICS PVs of this axis''' 231 print "Configure pressed - feature not enabled yet" # TODO: unfinished 232 modal = AxisConfigure_Dialog(self.parent, self.axis) 233 modal.ShowModal() 234 modal.Destroy() 232 235 233 236 def doConnnectButton(self, event): -
TabularUnified moxy/trunk/src/moxy/vc_pv.py ¶
r741 r743 63 63 64 64 self._init_widgets() 65 self.Bind(wx.EVT_CLOSE, self.OnClose) 65 66 66 67 def _init_widgets(self): … … 234 235 wx.CallAfter(self.w_value.SetBackgroundColour, color) 235 236 237 def OnClose(self, event): 238 dlg = wx.MessageDialog(self, 239 "Do you really want to close this application?", 240 "Confirm Exit", wx.OK|wx.CANCEL|wx.ICON_QUESTION) 241 result = dlg.ShowModal() 242 dlg.Destroy() 243 if result == wx.ID_OK: 244 if self.pv is not None: 245 self.pv.disconnect() 246 self.Destroy() 247 236 248 237 249
Note: See TracChangeset
for help on using the changeset viewer.