Exemple #1
0
        /// <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();
            }
        }
Exemple #2
0
        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;
        }
Exemple #3
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     // Save stats
     StatSaver.save();
     Config.save();
 }