Ejemplo n.º 1
0
    public void CloseLoggingFiles()
    {
        if (loggerHRM != null)
        {
            loggerHRM.Close();
        }
        if (loggerEvents != null)
        {
            loggerEvents.Close();
        }

        /*
         * if (loggerSummary != null)
         * {
         *  logTimeSeconds = (DateTime.Now - initialTimeLog).TotalSeconds;
         *
         *  loggerSummary.WriteLine("User: "******"Number of shot bullets: " + numberOfBullets);
         *  loggerSummary.WriteLine("Number of hits: " + numberOfHits);
         *  loggerSummary.WriteLine("Number of destroyed targets: " + numberOfDestroyedTargets);
         *  loggerSummary.WriteLine("Number of targets destroyed by head shot: " + numberOfDestroyedByHeadshots);
         *  loggerSummary.WriteLine("-----------------------------");
         *  loggerSummary.WriteLine("Effectivity ratio (Hits/Shot bullets): " + (float)numberOfHits/ (float)numberOfBullets);
         *  loggerSummary.WriteLine("Headshot ratio: " + (float)numberOfDestroyedByHeadshots / (float)numberOfDestroyedTargets);
         *  loggerSummary.WriteLine("Seconds per destroyed target: " + (logTimeSeconds/numberOfDestroyedTargets).ToString("F3"));
         *  loggerSummary.WriteLine("TOTAL TIME: " + logTimeSeconds);
         *  loggerSummary.Close();
         * }
         */
    }
Ejemplo n.º 2
0
        protected override void OnExiting(object sender, EventArgs args)
        {
            if (collectingData)
            {
                DataLogger.Close();
                for (int i = 0; i < fcrList.Count; i++)
                {
                    Console.Out.WriteLine("Saving as srender" + i);
                    fcrList[i].SaveAsPng(File.OpenWrite(accessDirectory + "/srender" + i + ".png"), fcrList[i].Width, fcrList[i].Height);
                }
            }

            base.OnExiting(sender, args);
        }