public CollectionSync(ScrollsPost.Mod mod) { this.mod = mod; this.config = mod.config; App.Communicator.addListener(this); }
//private ConfigManager config; public AccountVerifier(ConfigManager config) { //this.config = config; Start(); }
private void Init() { scrollPrices = new PriceManager(this); config = new ConfigManager(this); configGUI = new ConfigGUI(this); cardSync = new CollectionSync(this); replayLogger = new ReplayLogger(this); deckManager = new DeckManager(this); //replayGUI = new ReplayGUI(this); battleType = typeof(BattleMode); deckType = typeof(DeckBuilder2); if( !config.ContainsKey("replay") ) config.Add("replay", "ask"); if( !config.ContainsKey("sync-notif") ) config.Add("sync-notif", true); if( !config.ContainsKey("trade") ) config.Add("trade", true); // Old version migration + initial setup if( config.NewInstall() ) { new Thread(new ThreadStart(configGUI.ShowIntro)).Start(); } else { if( config.VersionBelow(9) ) { new Thread(new ParameterizedThreadStart(configGUI.ShowChanges)).Start((object)8); } else if( config.VersionBelow(10) ) { new Thread(new ParameterizedThreadStart(configGUI.ShowChanges)).Start((object)9); } else if( config.VersionBelow(11) ) { new Thread(new ParameterizedThreadStart(configGUI.ShowChanges)).Start((object)10); } else if( config.VersionBelow(12) ) { new Thread(new ParameterizedThreadStart(configGUI.ShowChanges)).Start((object)11); } } // Just updated if( !config.NewInstall() && (!config.ContainsKey("conf-version") || config.GetInt("conf-version") != CURRENT_VERSION) ) { config.Add("conf-version", CURRENT_VERSION); } else if( config.NewInstall() ) { config.QueueWrite(); } // Check if we need to resync cards cardSync.PushIfStale(); }
//private AccountVerifier verifier; public ConfigGUI(ScrollsPost.Mod mod) { this.mod = mod; this.config = mod.config; }