예제 #1
0
파일: popup.py 프로젝트: Gekk0r/Orion-scan
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
예제 #2
0
    def __handleGitHubConnectionError(self):

        eDlg = GenericMessageDialog(
            None,
            'GitHub connection error.  Try again later',
            "",
            agwStyle=ICON_ERROR | OK)
        eDlg.ShowModal()
        eDlg.Destroy()
예제 #3
0
파일: popup.py 프로젝트: Gekk0r/Orion-scan
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
예제 #4
0
파일: popup.py 프로젝트: Gekk0r/Orion-scan
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)
예제 #5
0
    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
예제 #6
0
 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()
예제 #7
0
 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()
예제 #8
0
    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
예제 #9
0
    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
예제 #10
0
    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")
예제 #11
0
    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
예제 #12
0
 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()