Example #1
0
        private void DetailLog()
        {
            if (!textBoxDetails.Visible || Size.Width <= MinimumSize.Width)
            {
                return;
            }

            var lines = new List <string>();

            lines.Add(string.Format("Tick: HFreq:{0}, snap:{1}, process:{2} {3}",
                                    numHighFreqTicks, numScanSnapshotDelayTicks, numScanProcessDelayTicks,
                                    (numScanProcessDelayTicks <= 0 && numScanSnapshotDelayTicks <= 0) ? " (scan now)" : ""));
            lines.Add(string.Format("Screenshot:{0} ({1})",
                                    cachedSourceScreen != null ? string.Format("{0}x{1}", cachedSourceScreen.Width, cachedSourceScreen.Height) : "n/a",
                                    screenReader.GetState()));

            foreach (var scanner in scanners)
            {
                lines.Add(string.Format("  {0} = {1}", scanner.ScannerName, scanner.GetState()));
            }

            gameLogic.AppendDetails(lines);
            textBoxDetails.Lines = lines.ToArray();
        }