Server.Engines.Reports.StaffHistory.ChartTotalPages C# (CSharp) Метод

ChartTotalPages() приватный Метод

private ChartTotalPages ( StaffInfo staff, System.TimeSpan ts, string title, string fname ) : Server.Engines.Reports.PieChart[]
staff StaffInfo
ts System.TimeSpan
title string
fname string
Результат Server.Engines.Reports.PieChart[]
		private PieChart[] ChartTotalPages( StaffInfo[] staff, TimeSpan ts, string title, string fname )
		{
			DateTime max = DateTime.Now;
			DateTime min = max - ts;

			PieChart staffChart = new PieChart( title + " Staff Chart", fname + "_staff", true );

			int other = 0;

			for ( int i = 0; i < staff.Length; ++i )
			{
				int count = GetPageCount( staff[i], min, max );

				if ( i < 12 && count > 0 )
					staffChart.Items.Add( staff[i].Display, count );
				else
					other += count;
			}

			if ( other > 0 )
				staffChart.Items.Add( "Other", other );

			PieChart resChart = new PieChart( title + " Resolutions", fname + "_resol", true );

			int countTotal = GetPageCount( m_Pages, PageResolution.None, min, max );
			int countHandled = GetPageCount( m_Pages, PageResolution.Handled, min, max );
			int countDeleted = GetPageCount( m_Pages, PageResolution.Deleted, min, max );
			int countCanceled = GetPageCount( m_Pages, PageResolution.Canceled, min, max );
			int countLogged = GetPageCount( m_Pages, PageResolution.Logged, min, max );
			int countUnres = countTotal - ( countHandled + countDeleted + countCanceled + countLogged );

			resChart.Items.Add( "Handled", countHandled );
			resChart.Items.Add( "Deleted", countDeleted );
			resChart.Items.Add( "Canceled", countCanceled );
			resChart.Items.Add( "Logged Out", countLogged );
			resChart.Items.Add( "Unresolved", countUnres );

			return new PieChart[]{ staffChart, resChart };
		}
	}