[longomatch/redesign: 89/96] Start templates service at startup
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/redesign: 89/96] Start templates service at startup
- Date: Tue, 29 Mar 2011 18:23:14 +0000 (UTC)
commit 7f38ed57eee486cce9cc5b3a8b3cfd2de44dd19f
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 3ce9fb2..60396f8 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;
@@ -69,7 +71,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));
@@ -139,20 +142,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]