예제 #1
0
    def killAll(self, event):
        print 'shutting down...'
        UserSettings.screenposition = self.GetScreenPosition()
        UserSettings.writecfg()
        
        if UserSettings.opsys == 'Windows': #this doesn't work in Linux... speeds up appearance of shutdown
            LicenseDlg.Hide()
            KMLControl.Hide()
            AboutDlg.Hide()
            MsgDialog.Hide()
            SettingsDialog.Hide()
            self.Hide()

        if services.gps is not False:
            print 'closing serial port'
            services.gps.close()
            print 'gps closed'
        
        print 'closing httpd'
        Kml.myserver.close()
        
        print 'stopping recording if it\'s active'
        SettingsDialog.stopRec()
        
        if services.myvs is not False:
            print 'closing VSPE-L'
            try:
                services.myvs.close() #try because this will not be included in 64bit
            except NameError:
                pass
        
        print 'number of running threads'
        print threading.activeCount()
                
        print 'destroying objects'
        try:
            LicenseDlg.Destroy()
            KMLControl.Destroy()
            AboutDlg.Destroy()
            MsgDialog.Destroy()
            SettingsDialog.Destroy()
            self.Destroy()
        except:
            print 'error... exiting'
            exit()
예제 #2
0
 def settingsOK(self, event):
     UserSettings.writecfg()
     self.Hide()
     event.Skip()
예제 #3
0
 def doOK(self, event):
     self.Hide()
     UserSettings.termsAgreed = True
     UserSettings.writecfg()
     MainWindow.Show()