Revision: 36
http://zerofile.svn.sourceforge.net/zerofile/?rev=36&view=rev
Author: karl-bengtsson
Date: 2007-11-07 06:04:37 -0800 (Wed, 07 Nov 2007)
Log Message:
-----------
Haxxored around with the properties/settings
Modified Paths:
--------------
trunk/src/ZeroFileSettings.java
Modified: trunk/src/ZeroFileSettings.java
===================================================================
--- trunk/src/ZeroFileSettings.java 2007-11-07 13:57:10 UTC (rev 35)
+++ trunk/src/ZeroFileSettings.java 2007-11-07 14:04:37 UTC (rev 36)
@@ -10,6 +10,7 @@
private static String _lastName;
private static String _email;
private static int _mainPort;
+ private static Properties _zeroFileProperties;
/*public static void saveSettings() throws IOException
{
@@ -33,12 +34,15 @@
public static String getNickName()
{
- return _nickName;
+ if (_zeroFileProperties.containsKey("NickName"))
+ return _zeroFileProperties.getProperty("NickName");
+ else
+ return "Anonymous";
}
public static void setNickName(String n)
{
- _nickName = n;
+ _zeroFileProperties.put("NickName", n);
}
public static String getFirstName()
@@ -83,11 +87,13 @@
public static void saveSettings() throws IOException {
- Properties applicationProps = new Properties();
+ //Properties applicationProps = new Properties();
FileOutputStream appStream = new FileOutputStream("appProperties");
- applicationProps.put("first", "balle");
- applicationProps.put("last", "ballesson");
- applicationProps.store(appStream, "settings");
+ _zeroFileProperties.put("first", "balle");
+ //applicationProps.put("first", "balle");
+ //applicationProps.put("last", "ballesson");
+ _zeroFileProperties.store(appStream, "sttings");
+ //applicationProps.store(appStream, "settings");
appStream.close();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|