Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configui.py 1.2KB

12345678910111213141516171819202122232425262728293031323334
  1. import win32ui
  2. from pywin.mfc import dialog
  3. from . import dbgcon
  4. class DebuggerOptionsPropPage(dialog.PropertyPage):
  5. def __init__(self):
  6. dialog.PropertyPage.__init__(self, win32ui.IDD_PP_DEBUGGER)
  7. def OnInitDialog(self):
  8. options = self.options = dbgcon.LoadDebuggerOptions()
  9. self.AddDDX(win32ui.IDC_CHECK1, dbgcon.OPT_HIDE)
  10. self[dbgcon.OPT_STOP_EXCEPTIONS] = options[dbgcon.OPT_STOP_EXCEPTIONS]
  11. self.AddDDX(win32ui.IDC_CHECK2, dbgcon.OPT_STOP_EXCEPTIONS)
  12. self[dbgcon.OPT_HIDE] = options[dbgcon.OPT_HIDE]
  13. return dialog.PropertyPage.OnInitDialog(self)
  14. def OnOK(self):
  15. self.UpdateData()
  16. dirty = 0
  17. for key, val in list(self.items()):
  18. if key in self.options:
  19. if self.options[key] != val:
  20. self.options[key] = val
  21. dirty = 1
  22. if dirty:
  23. dbgcon.SaveDebuggerOptions(self.options)
  24. # If there is a debugger open, then set its options.
  25. import pywin.debugger
  26. if pywin.debugger.currentDebugger is not None:
  27. pywin.debugger.currentDebugger.options = self.options
  28. return 1