/// <summary> /// Add game to stats /// </summary> public static void addGameToStats(GameResult game, bool bSaveToDisk = true) { Dbg.assert(game != null); games.Add(game); // Save immediately if needed if (bSaveToDisk) { StatSaver.save(); } }
private void Form1_Load(object sender, EventArgs e) { Log.log("Startup"); Dbg.saveErrorImageToFile(); Config.init(); ScreenParser.initialize(); Dbg.initialDiagnostics(); Gfx.initialize(); initPlaySoundsConfig(); // Load stats StatSaver.load(); initActions(); // Load only after creating actions Config.load(); setGuiStateFromConfigSettings(); recalcStats(); if (!Dbg.bDebug) { tab1.TabPages.RemoveAt(2); } // Stats.addCurGameResult( new GameResult( PlayerIndex.Survivor1, EndgameSurvivorIcon.KilledSacrificed, //EndgameSurvivorIcon.KilledSacrificed, EndgameSurvivorIcon.KilledSacrificed, //EndgameSurvivorIcon.KilledSacrificed ) ); wndPreview = new Preview(this); //var i = Image.FromFile(@"C:\temp\DBD\survivor_prelobby.jpg"); //ScreenCapture.setScreenShot(new Bitmap(i)); //picBox.Size = new Size(picBox.Width, picBox.Height); //picBox.SizeMode = PictureBoxSizeMode.Zoom; }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { // Save stats StatSaver.save(); Config.save(); }