[longomatch/redesign2: 88/140] Start templates service at startup
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/redesign2: 88/140] Start templates service at startup
- Date: Tue, 24 May 2011 22:03:30 +0000 (UTC)
commit aa42e65d59ed37d81302ad3d16a7820f1404d981
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sat Mar 26 20:00:40 2011 +0100
Start templates service at startup
LongoMatch/Main.cs | 19 ++++---------------
1 files changed, 4 insertions(+), 15 deletions(-)
---
diff --git a/LongoMatch/Main.cs b/LongoMatch/Main.cs
index 237ece1..ef4b786 100644
--- a/LongoMatch/Main.cs
+++ b/LongoMatch/Main.cs
@@ -27,6 +27,7 @@ using LongoMatch.DB;
using LongoMatch.Gui;
using LongoMatch.IO;
using LongoMatch.Store.Templates;
+using LongoMatch.Services;
using Mono.Unix;
namespace LongoMatch
@@ -36,6 +37,7 @@ namespace LongoMatch
class MainClass
{
private static DataBase db;
+ public static TemplatesService ts;
private static string baseDirectory;
private static string homeDirectory;
private static string configDirectory;
@@ -60,7 +62,8 @@ namespace LongoMatch
//Comprobamos los archivos de inicio
CheckDirs();
- CheckFiles();
+
+ ts = new TemplatesService(configDirectory);
//Iniciamos la base de datos
db = new DataBase(Path.Combine(DBDir(),Constants.DB_FILE));
@@ -130,20 +133,6 @@ namespace LongoMatch
System.IO.Directory.CreateDirectory(TempVideosDir());
}
- public static void CheckFiles() {
- string fConfig;
- fConfig = System.IO.Path.Combine(TemplatesDir(),"default.sct");
- if(!System.IO.File.Exists(fConfig)) {
- Categories cat = Categories.DefaultTemplate();
- cat.Save("default.sct");
- }
-
- fConfig = System.IO.Path.Combine(TemplatesDir(),"default.tem");
- if(!System.IO.File.Exists(fConfig)) {
- TeamTemplate tt = TeamTemplate.DefaultTemplate(20);
- tt.Save(fConfig);
- }
- }
public static void CheckOldFiles() {
string oldDBFile= System.IO.Path.Combine(homeDirectory, "db/db.yap");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]