From: <sc...@us...> - 2002-07-31 17:50:50
|
Update of /cvsroot/ggc/ggc/src/util In directory usw-pr-cvs1:/tmp/cvs-serv6474/src/util Modified Files: GGCProperties.java GGCPropertiesHelper.java Log Message: lots of fixes Index: GGCProperties.java =================================================================== RCS file: /cvsroot/ggc/ggc/src/util/GGCProperties.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GGCProperties.java 26 Jul 2002 17:55:48 -0000 1.4 --- GGCProperties.java 31 Jul 2002 17:50:46 -0000 1.5 *************** *** 39,43 **** { super.read(); ! setDefault("DBName", "glucodb"); setDefault("UserName", "Unnamed User"); setDefault("Ins1Name", "Insulin 1"); --- 39,43 ---- { super.read(); ! //setDefault("DBName", "glucodb"); setDefault("UserName", "Unnamed User"); setDefault("Ins1Name", "Insulin 1"); *************** *** 49,58 **** setDefault("TargetHighBG", "120"); setDefault("TargetLowBG", "80"); ! setDefault("DataSource", "MySQL"); setDefault("MySQLHost", "localhost"); setDefault("MySQLPort", "3306"); ! setDefault("MySQLUser", "testapp"); setDefault("MySQLPass", "gluco"); setDefault("MySQLDBName", "glucodb"); setDefault("AutoConnect","false"); setDefault("Rendering", "0"); --- 49,61 ---- setDefault("TargetHighBG", "120"); setDefault("TargetLowBG", "80"); ! setDefault("DataSource", "Textfile"); setDefault("MySQLHost", "localhost"); setDefault("MySQLPort", "3306"); ! setDefault("MySQLUser", "ggc"); setDefault("MySQLPass", "gluco"); setDefault("MySQLDBName", "glucodb"); + setDefault("MySQLOpenDefaultDB","false"); + setDefault("TextFilePath", System.getProperty("user.home") + "/MyValues.gcv"); + setDefault("TextFileOpenDefaultFile","false"); setDefault("AutoConnect","false"); setDefault("Rendering", "0"); *************** *** 63,76 **** setDefault("Interpolation", "0"); setDefault("TextAntiAliasing", "0"); ! setDefault("ColorTargetBG","0"); ! setDefault("ColorBG", "0"); ! setDefault("ColorAvgBG", "0"); ! setDefault("ColorHighBG", "0"); ! setDefault("ColorLowBG", "0"); ! setDefault("ColorBE", "0"); ! setDefault("ColorIns1", "0"); ! setDefault("ColorIns2","0"); ! setDefault("ColorIns","0"); ! setDefault("ColorInsPerBU","0"); } --- 66,79 ---- setDefault("Interpolation", "0"); setDefault("TextAntiAliasing", "0"); ! setDefault("ColorTargetBG","-1184275"); ! setDefault("ColorBG", "-65485"); ! setDefault("ColorAvgBG", "-6750208"); ! setDefault("ColorHighBG", "-81409"); ! setDefault("ColorLowBG", "-163654"); ! setDefault("ColorBU", "-16724941"); ! setDefault("ColorIns1", "-6710785"); ! setDefault("ColorIns2","-16776961"); ! setDefault("ColorIns","-16724788"); ! setDefault("ColorInsPerBU","-6711040"); } *************** *** 180,183 **** --- 183,201 ---- { return get("MySQLDBName"); + } + + public boolean getMySQLOpenDefaultDB() + { + return getBoolean("MySQLOpenDefaultDB"); + } + + public String getTextFilePath() + { + return get("TextFilePath"); + } + + public boolean getTextFileOpenDefaultFile() + { + return getBoolean("TextFileOpenDefaultFile"); } Index: GGCPropertiesHelper.java =================================================================== RCS file: /cvsroot/ggc/ggc/src/util/GGCPropertiesHelper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GGCPropertiesHelper.java 18 Jul 2002 16:27:54 -0000 1.2 --- GGCPropertiesHelper.java 31 Jul 2002 17:50:46 -0000 1.3 *************** *** 42,46 **** public GGCPropertiesHelper() { ! propsFile = new File(System.getProperty("user.home") + "/.ggc.prefs"); } --- 42,53 ---- public GGCPropertiesHelper() { ! try { ! File tmpFile = new File(System.getProperty("user.home") + "/.ggc.prefs"); ! if (!tmpFile.exists()) ! tmpFile.createNewFile(); ! propsFile = tmpFile; ! } catch (IOException e) { ! System.out.println(e); ! } } |