Ejemplo n.º 1
0
        public override void Initialize()
        {
            base.Initialize();
            Settings = new PersistentObject<GrangerSettings>(new GrangerSettings());
            Settings.SetFilePathAndLoad(Path.Combine(base.ModuleDataDir, "settings.xml"));

            //init database
            DBSchema.SetConnectionString(Path.Combine(this.ModuleDataDir, "grangerDB.s3db"));

            SQLiteHelper.CreateTableIfNotExists(DBSchema.HorsesSchema, DBSchema.HorsesTableName, DBSchema.ConnectionString);
            SQLiteHelper.ValidateTable(DBSchema.HorsesSchema, DBSchema.HorsesTableName, DBSchema.ConnectionString);

            SQLiteHelper.CreateTableIfNotExists(DBSchema.TraitValuesSchema, DBSchema.TraitValuesTableName, DBSchema.ConnectionString);
            SQLiteHelper.ValidateTable(DBSchema.TraitValuesSchema, DBSchema.TraitValuesTableName, DBSchema.ConnectionString);

            SQLiteHelper.CreateTableIfNotExists(DBSchema.HerdsSchema, DBSchema.HerdsTableName, DBSchema.ConnectionString);
            SQLiteHelper.ValidateTable(DBSchema.HerdsSchema, DBSchema.HerdsTableName, DBSchema.ConnectionString);

            Context = new GrangerContext(new SQLiteConnection(DBSchema.ConnectionString));

            GrangerUI = new FormGrangerMain(this, Settings, Context);

            LogFeedMan = new LogFeedManager(this, Context);
            LogFeedMan.UpdatePlayers(Settings.Value.CaptureForPlayers);
            GrangerUI.Granger_PlayerListChanged += GrangerUI_Granger_PlayerListChanged;
        }
Ejemplo n.º 2
0
 public void SetAHCheckDate(LogFeedManager.CachedAHSkillID id, DateTime AHValue)
 {
     LastAHSkillCheck[id] = AHValue;
 }
Ejemplo n.º 3
0
 public void SetAHSkill(LogFeedManager.CachedAHSkillID id, float AHValue)
 {
     CachedAHSkillVals[id] = AHValue;
 }
Ejemplo n.º 4
0
 public bool TryGetAHCheckDate(LogFeedManager.CachedAHSkillID id, out DateTime result)
 {
     return LastAHSkillCheck.TryGetValue(id, out result);
 }
Ejemplo n.º 5
0
 public bool TryGetAHSkill(LogFeedManager.CachedAHSkillID id, out float result)
 {
     return CachedAHSkillVals.TryGetValue(id, out result);
 }