Wireup window with access methods + refaktor structure
This commit is contained in:
28
TrackerLibrary/GlobalConfig.cs
Normal file
28
TrackerLibrary/GlobalConfig.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using TrackerLibrary.DataAccess;
|
||||
|
||||
namespace TrackerLibrary
|
||||
{
|
||||
public static class GlobalConfig
|
||||
{
|
||||
public static List<IDataConnection> Connections { get; private set; } = new List<IDataConnection>();
|
||||
public static void InitializeConnections(bool database, bool textFiles)
|
||||
{
|
||||
if (database)
|
||||
{
|
||||
// TODO - Set up the sql connector properly !
|
||||
SqlConnector sql = new SqlConnector();
|
||||
Connections.Add(sql);
|
||||
}
|
||||
|
||||
if (textFiles)
|
||||
{
|
||||
// TODO - Create the text Connection
|
||||
TextConnector text = new TextConnector();
|
||||
Connections.Add(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user