Example #1
0
        private MineStatistics GetPercentageInterval(IEnumerable <SearchCristalResult> data, int startPerc, int endPerc)
        {
            var result = new MineStatistics(data.Where(e => e.Percentage >= startPerc && e.Percentage <= endPerc).ToArray());

            result.Interval = startPerc + " - " + endPerc;
            return(result);
        }
Example #2
0
        private MineStatistics GetTimeInterval(IEnumerable <SearchCristalResult> data, int start, int end)
        {
            var startTime = minValue.AddMinutes(start).ToTime(TimePrecision.WithMinutes);
            var endTime   = minValue.AddMinutes(end).ToTime(TimePrecision.WithMinutes);

            var range  = new TimeRange(startTime, endTime);
            var result = new MineStatistics(data.Where(e => range.IsInRange(e.Date)).ToArray());

            result.Interval = range.ToString();
            return(result);
        }
Example #3
0
        /// <summary>
        /// Shows the statistics.
        /// </summary>
        private void ShowStatistics()
        {
            var range      = dateRangeControl1.Value;
            var data       = _data.Where(e => range.IsInRange(e.Date)).ToArray();
            var statistics = new MineStatistics(data);

            grid.Clear();
            grid.AddRow("Походов", statistics.Count);
            grid.AddRow("Попыток", statistics.CountAttempt);
            grid.AddRow("Успешных", statistics.CountSuccess);
            grid.AddRow("Ср. успехов", statistics.AvgSuccess);
            grid.AddRow("Ср. %", statistics.AvgPercentage);
            grid.AddRow("Кристалов", statistics.CountCristals);
            grid.AddRow("М. билетов", statistics.CountSmallTicket);
            grid.AddRow("Б. билетов", statistics.CountBigTicket);
            grid.ShowData();
        }