def check_devices_response_dialog(main_window): dialog = GenericMessageDialog(main_window, 'Did all devices work?', 'Test', wx.YES | wx.NO | wx.ICON_QUESTION) answer = dialog.ShowModal() dialog.Destroy() return answer == wx.ID_YES
def __handleGitHubConnectionError(self): eDlg = GenericMessageDialog( None, 'GitHub connection error. Try again later', "", agwStyle=ICON_ERROR | OK) eDlg.ShowModal() eDlg.Destroy()
def check_devices_dialog(main_window): dialog = GenericMessageDialog(main_window, 'Do you want test the devices?', 'Test', wx.YES | wx.NO | wx.ICON_QUESTION) answer = dialog.ShowModal() dialog.Destroy() return answer == wx.ID_YES
def start_shoot_at_dialog(main_window): dialog = GenericMessageDialog(main_window, 'Do you want shoot extra photos?', 'Extra', wx.YES | wx.NO | wx.ICON_QUESTION) answer = dialog.ShowModal() dialog.Destroy() if answer == wx.ID_YES: shoot_at_window(main_window)
def initModules(self): dialog = GenericMessageDialog( self, 'Choose the modules that you want use in the next windows', 'Modules initialization', wx.OK | wx.ICON_INFORMATION) dialog.ShowModal() dialog.Destroy() self.initTable() self.initCameras() print self.arduinoBoards.port_camera
def show(self): '''show the dialog as a child process''' mp_util.child_close_fds() from wx.lib.agw.genericmessagedialog import GenericMessageDialog app = wx.PySimpleApp() # note! font size change is not working. I don't know why yet font = wx.Font(self.font_size, wx.MODERN, wx.NORMAL, wx.NORMAL) dlg = GenericMessageDialog(None, self.message, self.title, wx.ICON_INFORMATION | wx.OK) dlg.SetFont(font) dlg.ShowModal() app.MainLoop()
def call(self): '''show the dialog as a child process''' mp_util.child_close_fds() from MAVProxy.modules.lib import wx_processguard from MAVProxy.modules.lib.wx_loader import wx from wx.lib.agw.genericmessagedialog import GenericMessageDialog app = wx.App(False) # note! font size change is not working. I don't know why yet font = wx.Font(self.font_size, wx.MODERN, wx.NORMAL, wx.NORMAL) dlg = GenericMessageDialog(None, self.message, self.title, wx.ICON_INFORMATION|wx.OK) dlg.SetFont(font) dlg.ShowModal() app.MainLoop()
def __handleAuthenticationError(self, event: CommandEvent): eDlg = GenericMessageDialog(self, 'The supplied todoist token is invalid', "", agwStyle=ICON_ERROR | OK) eDlg.ShowModal() eDlg.Destroy() with DlgConfigure(self) as aDlg: cDlg: DlgConfigure = cast(DlgConfigure, aDlg) if cDlg.ShowModal() == OK: # The following 2 already defined in init self._apiToken = Preferences().todoistApiToken self._todoistAdapter = TodoistAdapter(self._apiToken) self._onCreateTaskClicked(event) # Dang I hate recursion
def initCameras(self): dialog = GenericMessageDialog( self, 'Plug in ONLY the camera module and press OK, or CANCEL to skip', 'Table camera module', wx.OK | wx.CANCEL | wx.ICON_QUESTION) answer = dialog.ShowModal() dialog.Destroy() if answer == wx.ID_OK: self.arduinoBoards.connect_camera() # self.cameraPan.nameLabel.SetLabel("Name : " + str(self.arduinoBoards.port_camera)) else: # self.cameraPan.nameLabel.SetLabel("Name : No module camera attached") pass
def initTable(self): dialog = GenericMessageDialog( self, 'Plug in ONLY the table rotation module and press OK, or CANCEL to skip', 'Table rotation module', wx.OK | wx.CANCEL | wx.ICON_QUESTION) answer = dialog.ShowModal() dialog.Destroy() if answer == wx.ID_OK: self.arduinoBoards.connect_table() self.tablePan.nameLabel.SetLabel( "Name : " + str(self.arduinoBoards.port_table)) else: self.tablePan.nameLabel.SetLabel( "Name : No module rotation table attached")
def __handleAuthenticationError(self): eDlg = GenericMessageDialog(None, 'GitHub authentication error', "", agwStyle=ICON_ERROR | OK) eDlg.ShowModal() eDlg.Destroy() with DlgConfigure(self) as dlg: dlg: DlgConfigure = cast(DlgConfigure, dlg) if dlg.ShowModal() == OK: githubToken: str = self._preferences.githubApiToken userName: str = self._preferences.githubUserName self._githubAdapter = GithubAdapter( userName=userName, authenticationToken=githubToken) self.__populateRepositories() # I hate recursion
def kshow(self): dlg = GenericMessageDialog( self.parent, self.m_msg, self.h_msg, self.k_ico | self.k_but | GMD_USE_GRADIENTBUTTONS) dlg.ShowModal() dlg.Destroy()