Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cleanup
  • Loading branch information
Philipp Spieß committed Mar 22, 2012
1 parent 3f600cd commit 4df0db6
Show file tree
Hide file tree
Showing 17 changed files with 10 additions and 643 deletions.
1 change: 0 additions & 1 deletion .gitignore
@@ -1,6 +1,5 @@
[Oo]bj
[Bb]in
*.config
*.user
*.suo
*.[Cc]ache
Expand Down
21 changes: 3 additions & 18 deletions ControlsLib/PersistenceCtrl.cs
Expand Up @@ -10,30 +10,15 @@ namespace ControlsLib
{
public static class PersistenceCtrl
{
private static IPersistenceMgr instance;
private static PersistenceMgr instance;

public static IPersistenceMgr Instance
public static PersistenceMgr Instance
{
get
{
if (instance == null)
{
/**
* Reflection
**/

AppSettingsReader config = new AppSettingsReader();

String persistence_mgr = (String)config.GetValue("PersistenceMgr", typeof(String));
String home_path = (String)config.GetValue("HomePath", typeof(String));

ObjectHandle h = Activator.CreateInstanceFrom(
home_path + persistence_mgr + @"\bin\Debug\" + persistence_mgr + @".dll",
persistence_mgr + @".GetInstance"
);
IGetInstence instence_getter = (IGetInstence)h.Unwrap();

instance = instence_getter.Instence();
instance = new PersistenceMgr();

}
return instance;
Expand Down
2 changes: 1 addition & 1 deletion ControlsLib/StartCtrl.cs
Expand Up @@ -10,7 +10,7 @@ namespace ControlsLib
{
public class StartCtrl
{
private static IPersistenceMgr Persistence = PersistenceCtrl.Instance;
private static PersistenceMgr Persistence = PersistenceCtrl.Instance;

public static void Start(Program p)
{
Expand Down
12 changes: 0 additions & 12 deletions PersistenceLib/IGetInstence.cs

This file was deleted.

18 changes: 0 additions & 18 deletions PersistenceLib/IPersistenceMgr.cs

This file was deleted.

3 changes: 1 addition & 2 deletions PersistenceLib/PersistenceLib.csproj
Expand Up @@ -40,8 +40,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="IGetInstence.cs" />
<Compile Include="IPersistenceMgr.cs" />
<Compile Include="PersistenceMgr.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
Expand Up @@ -2,21 +2,19 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PersistenceLib;

using ProgramLib;
using System.Data.Odbc;
using System.Runtime.Remoting;
using System.Configuration;
using System.Runtime.Remoting;

namespace PersistenceMgrWithoutDataSet
namespace PersistenceLib
{
public class PersistenceMgrWithoutDataSet : IPersistenceMgr
public class PersistenceMgr
{
private OdbcConnection con;
private String stdPath = null;

public PersistenceMgrWithoutDataSet()
public PersistenceMgr()
{
AppSettingsReader config = new AppSettingsReader();
stdPath = (String)config.GetValue("HomePath", typeof(String));
Expand Down
126 changes: 0 additions & 126 deletions PersistenceMgrWithDataSet/DBHelper.cs

This file was deleted.

19 changes: 0 additions & 19 deletions PersistenceMgrWithDataSet/GetInstance.cs

This file was deleted.

0 comments on commit 4df0db6

Please sign in to comment.