示例#1
0
文件: main.py 项目: rp3d/ciclop
 def onSaveProfile(self, event):
     """ """
     dlg=wx.FileDialog(self, _("Select profile file to save"), os.path.split(profile.getPreference('last_profile'))[0], style=wx.FD_SAVE)
     dlg.SetWildcard("ini files (*.ini)|*.ini")
     if dlg.ShowModal() == wx.ID_OK:
         profileFile = dlg.GetPath()
         if not profileFile.endswith('.ini'):
             if platform.system() == 'Linux': #hack for linux, as for some reason the .ini is not appended.
                 profileFile += '.ini'
         profile.saveProfile(profileFile)
     dlg.Destroy()
示例#2
0
文件: main.py 项目: rp3d/ciclop
 def onScanningPageNextClicked(self):
     self.driver.board.setLeftLaserOff()
     self.driver.board.setRightLaserOff()
     profile.saveProfile(os.path.join(profile.getBasePath(), 'current-profile.ini'))
     dlg = wx.MessageDialog(self, _("You have finished the wizard.\nPress Play button to start scanning."), _("Ready to scan!"), wx.OK | wx.ICON_INFORMATION)
     result = dlg.ShowModal() == wx.ID_OK
     dlg.Destroy()
     if result:
         self.connectionPage.videoView.stop()
         self.calibrationPage.videoView.stop()
         self.scanningPage.videoView.stop()
         profile.putPreference('workbench', 'Scanning workbench')
         self.parent.updatePCGProfile()
         self.parent.updateCalibrationProfile()
         self.parent.workbenchUpdate()
         self.Destroy()
示例#3
0
 def onScanningPageNextClicked(self):
     self.driver.board.setLeftLaserOff()
     self.driver.board.setRightLaserOff()
     profile.saveProfile(
         os.path.join(profile.getBasePath(), 'current-profile.ini'))
     dlg = wx.MessageDialog(
         self,
         _("You have finished the wizard.\nPress Play button to start scanning."
           ), _("Ready to scan!"), wx.OK | wx.ICON_INFORMATION)
     result = dlg.ShowModal() == wx.ID_OK
     dlg.Destroy()
     if result:
         self.connectionPage.videoView.stop()
         self.calibrationPage.videoView.stop()
         self.scanningPage.videoView.stop()
         profile.putPreference('workbench', 'Scanning workbench')
         self.parent.updatePCGProfile()
         self.parent.updateCalibrationProfile()
         self.parent.workbenchUpdate()
         self.Destroy()
示例#4
0
 def __del__(self):
     #-- Save Profile and Preferences
     profile.savePreferences(os.path.join(self.basePath, 'preferences.ini'))
     profile.saveProfile(os.path.join(self.basePath, 'current-profile.ini'))
示例#5
0
 def onComboBoxWorkbenchSelected(self, event):
     """ """
     if _(profile.getPreference('workbench')) != event.GetEventObject().GetValue():
         profile.putPreference('workbench', self.workbenchDict[event.GetEventObject().GetValue()])
         profile.saveProfile(os.path.join(profile.getBasePath(), 'current-profile.ini'))
         self.workbenchUpdate()
示例#6
0
文件: app.py 项目: DeeibyCoper/horus
	def __del__(self):
		#-- Save Profile and Preferences
		profile.savePreferences(os.path.join(self.basePath, 'preferences.ini'))
		profile.saveProfile(os.path.join(self.basePath, 'current-profile.ini'))
示例#7
0
文件: main.py 项目: rp3d/ciclop
 def onComboBoxWorkbenchSelected(self, event):
     """ """
     if _(profile.getPreference('workbench')) != event.GetEventObject().GetValue():
         profile.putPreference('workbench', self.workbenchDict[event.GetEventObject().GetValue()])
         profile.saveProfile(os.path.join(profile.getBasePath(), 'current-profile.ini'))
         self.workbenchUpdate()