-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properties, Config.txt y Gitignore actualizado.
- Loading branch information
1 parent
b3d45d0
commit a1fdb09
Showing
9 changed files
with
75 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Collections; | ||
using System.IO; | ||
|
||
namespace GrouponDesktop.Core | ||
{ | ||
class Properties | ||
{ | ||
private static Dictionary<String, String> properties = new Dictionary<String, String>(); | ||
|
||
public Properties(String filePath) | ||
{ | ||
this.loadProperties(filePath); | ||
} | ||
|
||
public void loadProperties(String path) | ||
{ | ||
foreach(String line in File.ReadAllLines(path)){ | ||
if(line.StartsWith("#")) continue; | ||
properties.Add(line.Substring(0, line.IndexOf("=")).Trim(), line.Substring(line.IndexOf("=")+1).Trim()); | ||
} | ||
} | ||
|
||
public static String getProperty(String key) { | ||
return properties[key]; | ||
} | ||
|
||
public void setProperty(String key, String value) { | ||
properties.Add(key, value); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fecha=5/10/2011 | ||
dbuser=gd | ||
dbpasswd=gd2012 | ||
dburl=localhost\SQLSERVER2008 | ||
dbname=GD2C2012 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fecha=5/10/2011 | ||
dbuser=gd | ||
dbpasswd=gd2012 | ||
dburl=localhost\SQLSERVER2008 | ||
dbname=GD2C2012 |