public SpawnGroupEditTabViewModel(MySqlConnection connection,QueryConfig config) { if (connection != null && connection.State == System.Data.ConnectionState.Open) { _manager = new SpawnGroupAggregatorDatabase(connection, config); _npcFinder = new NpcAggregatorDatabase(connection, config); } else { _manager = new SpawnGroupAggregatorLocal(config); _npcFinder = new NpcAggregatorLocal(config); } _manager.DataLoaded += new SpawnGroupDataLoadedHandler(_manager_DataLoaded); InitCommands(); }
public SpawnExtractorTabViewModel(MySqlConnection connection,EQEmu.Database.QueryConfig config,NpcPropertyTemplateManager templates) { _connection = connection; _config = config; _templates = templates; _startId = 0; Zone = ""; ZoneVersion = 0; if (connection != null && connection.State == System.Data.ConnectionState.Open) { _npcs = new NpcAggregatorDatabase(connection, config); } else { _npcs = new NpcAggregatorLocal(config); } _npcs.Created(); if (connection != null && connection.State == System.Data.ConnectionState.Open) { _spawngroups = new SpawnGroupAggregatorDatabase(connection, config); } else { _spawngroups = new SpawnGroupAggregatorLocal(config); } _spawngroups.Created(); }