Пример #1
0
		public static void FillSnapshot( Snapshot ss )
		{
			ss.Children.Add( CompileGeneralStats() );
			ss.Children.Add( CompileStatChart() );

			PersistableObject[] obs = CompileSkillReports();

			for ( int i = 0; i < obs.Length; ++i )
				ss.Children.Add( obs[i] );
		}
Пример #2
0
		public static void Generate()
		{
			Snapshot ss = new Snapshot();

			ss.TimeStamp = DateTime.Now;

			FillSnapshot( ss );

			m_History.Snapshots.Add( ss );

			ThreadPool.QueueUserWorkItem( new WaitCallback( UpdateOutput ), ss );
		}
Пример #3
0
		public static void Generate()
		{
			Snapshot ss = new Snapshot();

			ss.TimeStamp = DateTime.Now;

			FillSnapshot( ss );

			m_StatsHistory.Snapshots.Add( ss );
			m_StaffHistory.QueueStats.Add( new QueueStatus( Engines.Help.PageQueue.List.Count ) );

			ThreadPool.QueueUserWorkItem( new WaitCallback( UpdateOutput ), ss );
		}
Пример #4
0
		public static void Generate()
		{
			var ss = new Snapshot();

			ss.TimeStamp = DateTime.UtcNow;

			FillSnapshot(ss);

			m_StatsHistory.Snapshots.Add(ss);
			m_StaffHistory.QueueStats.Add(new QueueStatus(PageQueue.List.Count));

			ThreadPool.QueueUserWorkItem(UpdateOutput, ss);
		}
Пример #5
0
		public HtmlRenderer( string outputDirectory, Snapshot ss, SnapshotHistory history ) : this( outputDirectory )
		{
			m_TimeStamp = ss.TimeStamp;

			m_Objects = new ObjectCollection();

			for ( int i = 0; i < ss.Children.Count; ++i )
				m_Objects.Add( ss.Children[i] );

			m_Objects.Add( BarGraph.OverTime( history, "General Stats", "Clients", 1, 100, 6 ) );
			m_Objects.Add( BarGraph.OverTime( history, "General Stats", "Items", 24, 9, 1  ) );
			m_Objects.Add( BarGraph.OverTime( history, "General Stats", "Players", 24, 9, 1 ) );
			m_Objects.Add( BarGraph.OverTime( history, "General Stats", "NPCs", 24, 9, 1 ) );
			m_Objects.Add( BarGraph.DailyAverage( history, "General Stats", "Clients" ) );
			m_Objects.Add( BarGraph.Growth( history, "General Stats", "Clients" ) );
		}
Пример #6
0
		public static void FillSnapshot( Snapshot ss )
		{
            ss.Children.Add(CompileGeneralStats());
            ss.Children.Add(CompilePCByDL());
            ss.Children.Add(CompileTop15());
            ss.Children.Add(CompileDislikedArenas());
            ss.Children.Add(CompileStatChart());

			PersistableObject[] obs = CompileSkillReports();

			for ( int i = 0; i < obs.Length; ++i )
				ss.Children.Add( obs[i] );

			obs = CompileFactionReports();

			for ( int i = 0; i < obs.Length; ++i )
				ss.Children.Add( obs[i] );
		}
Пример #7
0
		public static int LookupReportValue( Snapshot ss, string reportName, string valueName )
		{
			for ( int j = 0; j < ss.Children.Count; ++j )
			{
				Report report = ss.Children[j] as Report;

				if ( report == null || report.Name != reportName )
					continue;

				for ( int k = 0; k < report.Items.Count; ++k )
				{
					ReportItem item = report.Items[k];

					if ( item.Values[0].Value == valueName )
						return Utility.ToInt32( item.Values[1].Value );
				}

				break;
			}

			return -1;
		}
Пример #8
0
 /// <summary>
 /// Insert a Server.Engines.Reports.Snapshot instance into this collection at a specified index.
 /// </summary>
 /// <param name="index">Zero-based index.</param>
 /// <param name="value">The Server.Engines.Reports.Snapshot instance to insert.</param>
 public void Insert(int index, Snapshot value)
 {
     List.Insert(index, value);
 }
Пример #9
0
 /// <summary>
 /// Removes a specified Server.Engines.Reports.Snapshot instance from this collection.
 /// </summary>
 /// <param name="value">The Server.Engines.Reports.Snapshot instance to remove.</param>
 public void Remove(Snapshot value)
 {
     List.Remove(value);
 }
Пример #10
0
 /// <summary>
 /// Retrieve the index a specified Server.Engines.Reports.Snapshot instance is in this collection.
 /// </summary>
 /// <param name="value">Server.Engines.Reports.Snapshot instance to find.</param>
 /// <returns>The zero-based index of the specified Server.Engines.Reports.Snapshot instance. If the object is not found, the return value is -1.</returns>
 public int IndexOf(Snapshot value)
 {
     return List.IndexOf(value);
 }
Пример #11
0
 /// <summary>
 /// Determines whether a specified Server.Engines.Reports.Snapshot instance is in this collection.
 /// </summary>
 /// <param name="value">Server.Engines.Reports.Snapshot instance to search for.</param>
 /// <returns>True if the Server.Engines.Reports.Snapshot instance is in the collection; otherwise false.</returns>
 public bool Contains(Snapshot value)
 {
     return List.Contains(value);
 }
Пример #12
0
 /// <summary>
 /// Append a Server.Engines.Reports.Snapshot entry to this collection.
 /// </summary>
 /// <param name="value">Server.Engines.Reports.Snapshot instance.</param>
 /// <returns>The position into which the new element was inserted.</returns>
 public int Add(Snapshot value)
 {
     return List.Add(value);
 }
Пример #13
0
 /// <summary>
 /// Advances the enumerator to the next queue of the enumeration, if one is currently available.
 /// </summary>
 /// <returns>true, if the enumerator was succesfully advanced to the next queue; false, if the enumerator has reached the end of the enumeration.</returns>
 public bool MoveNext()
 {
     if ((_index 
                 < (_collection.Count - 1)))
     {
         _index = (_index + 1);
         _currentElement = _collection[_index];
         return true;
     }
     _index = _collection.Count;
     return false;
 }
Пример #14
0
 /// <summary>
 /// Reset the cursor, so it points to the beginning of the enumerator.
 /// </summary>
 public void Reset()
 {
     _index = -1;
     _currentElement = null;
 }