private void _updatePrefs() { try { s_prefs.setPref("WKSPFolder", m_txtWKSPFolder.getText()); s_prefs.setPref("StorageFile", m_txtStorageFile.getText()); s_prefs.save(); } catch (Exception ex) { } }
private void _initFields() throws Exception { m_tracer = new TabbedTracerImpl(m_debugTabItem, m_infoTabItem, m_warnTabItem, m_errorTabItem); Tracer.setTracer(m_tracer); m_monitor = new ProgressMonitor(); m_txtWKSPFolder.setText(s_prefs.getPref("WKSPFolder", "")); m_txtStorageFile.setText(s_prefs.getPref("StorageFile", "")); }
/** * Launch the application * * @param args */ public static void main(String[] args) { try { s_prefs.load(true); BKSCoverageAppWnd window = new BKSCoverageAppWnd(); window.open(); s_prefs.save(); } catch (Exception e) { e.printStackTrace(); } }
// ---------------------------------------------------------------------------------------------------- public static void saveToAppPrefs(AppPreferences prefs) { prefs.setPref("MinRoomCapacities", ParserSettings.minRoomCapacities_to_str()); double value = ParserSettings.NonCancelableIncrement; prefs.setPrefDouble("NonCancelableIncrement", 100 * value - 100); prefs.setPrefDouble("BreakfastCostPerDay", ParserSettings.FamilyBreakfastCostPerDay); prefs.setPrefDouble("MaxTotalPrice", ParserSettings.maxTotalPrice); }
// ---------------------------------------------------------------------------------------------------- public static void loadFromAppPrefs(AppPreferences prefs) { double value; ParserSettings.str_to_minRoomCapacities(prefs.getPref("MinRoomCapacities", "4")); value = prefs.getPrefDouble("NonCancelableIncrement", 20.0); ParserSettings.NonCancelableIncrement = (100.0 + value) / 100.0; value = prefs.getPrefDouble("BreakfastCostPerDay", 25.0); ParserSettings.FamilyBreakfastCostPerDay = value; value = prefs.getPrefDouble("MaxTotalPrice", 0.0); ParserSettings.maxTotalPrice = value; }
/** * Launch the application * * @param args */ public static void main(String[] args) { try { // En SWT hay que ajustar el tamaño de los fonts en Mac OS String OS_Name = System.getProperty("os.name"); if (OS_Name != null && OS_Name.toLowerCase().contains("mac os")) { System.setProperty("org.eclipse.swt.internal.carbon.smallFonts", "true"); } s_prefs.load(true); IPAToolAppWnd window = new IPAToolAppWnd(); window.open(); s_prefs.save(); } catch (Exception e) { e.printStackTrace(); } }
private void _updatePrefs() { try { s_prefs.setPref("updateBaseFolder", m_txtUpdFolder.getText()); s_prefs.setPref("existingBaseFolder", m_txtExistingFolder.getText()); s_prefs.setPref("iTunesBaseFolder", m_txtITunesFolder.getText()); s_prefs.setPref("iPhoneFolder", m_txtIPhoneFolder.getText()); s_prefs.setPref("iPadFolder", m_txtIPadFolder.getText()); s_prefs.setPref("mixedFolder", m_txtMixedFolder.getText()); s_prefs.save(); } catch (Exception ex) { } }
private void _initFields() throws Exception { m_monitor = new ProgressMonitor(); m_txtUpdFolder.setText(s_prefs.getPref("updateBaseFolder", "")); m_txtExistingFolder.setText(s_prefs.getPref("existingBaseFolder", "")); m_txtITunesFolder.setText(s_prefs.getPref("iTunesBaseFolder", "")); m_txtIPhoneFolder.setText(s_prefs.getPref("iPhoneFolder", "")); m_txtIPadFolder.setText(s_prefs.getPref("iPadFolder", "")); m_txtMixedFolder.setText(s_prefs.getPref("mixedFolder", "")); }