public void TearDown()
		{
			_CurrentPlayerTurn = null;
			foreach (LogSection ls in spArea.Children.OfType<LogSection>())
				ls.TearDown();

			this.PlayerBrushes.Clear();
			spArea.Children.Clear();
		}
		public void Clear()
		{
			_CurrentPlayerTurn = null;
			foreach (LogSection ls in spArea.Children.OfType<LogSection>())
				ls.Dispose();

			this.PlayerBrushes.Clear();
			spArea.Children.Clear();
			svArea.ScrollToTop();
			if (System.IO.File.Exists(this.LogFile))
				Utilities.LogClear(this.LogFile);
			GC.Collect();
			GC.WaitForPendingFinalizers();
			GC.Collect();
		}
		public void NewSection(String title)
		{
			Utilities.Log(this.LogFile, "-------------------------------------------------------");

			if (_CurrentPlayerTurn != null)
				_CurrentPlayerTurn.End();

			_CurrentPlayerTurn = new ucGameMessage();
			_CurrentPlayerTurn.LogFile = this.LogFile;
			_CurrentPlayerTurn.New(title);

			spArea.Children.Add(_CurrentPlayerTurn);
			svArea.ScrollToBottom();
			svArea.ScrollToLeftEnd();
		}
		public void NewTurn(DominionBase.Players.Player player, DominionBase.Cards.Card grantedBy)
		{
			Utilities.Log(this.LogFile, "-------------------------------------------------------");

			if (_CurrentPlayerTurn != null)
				_CurrentPlayerTurn.End();

			_CurrentPlayerTurn = new ucPlayerTurn();
			_CurrentPlayerTurn.LogFile = this.LogFile;
			if (player != null)
				_CurrentPlayerTurn.New(player, this.PlayerBrushes[player.Name], grantedBy);

			if (_CurrentGameTurn != null)
			{
				(_CurrentGameTurn as ucGameTurn).Add(_CurrentPlayerTurn as ucPlayerTurn);

				if (wMain.Settings.AutoCollapseOldTurns)
				{
					IEnumerable<ucGameTurn> gameTurns = spArea.Children.OfType<ucGameTurn>();
					if (gameTurns.Count() > 1)
					{
						ucGameTurn gtOld = gameTurns.ElementAt(gameTurns.Count() - 2);
						foreach (ucPlayerTurn pt in gtOld.GetChildren(player))
							pt.IsExpanded = false;
						if (!gtOld.IsAnyExpanded)
						{
							gtOld.IsAllExpanded = true;
							gtOld.IsExpanded = false;
						}
					}
				}
			}
			else
			{
				spArea.Children.Add(_CurrentPlayerTurn);
			}

			svArea.ScrollToBottom();
			svArea.ScrollToLeftEnd();
		}
		public void NewTurn(int turnNumber)
		{
			Utilities.Log(this.LogFile, String.Format("=======================================================", turnNumber));
			Utilities.Log(this.LogFile, String.Format("---------------------- Turn #{0} {1}---------------------", turnNumber, (new StringBuilder()).Insert(0, "-", 3 - (int)Math.Log10(turnNumber))));

			if (_CurrentGameTurn != null)
				_CurrentGameTurn.End();

			_CurrentGameTurn = new ucGameTurn();
			_CurrentGameTurn.LogFile = this.LogFile;
			(_CurrentGameTurn as ucGameTurn).New(turnNumber);

			spArea.Children.Add(_CurrentGameTurn);
			svArea.ScrollToBottom();
			svArea.ScrollToLeftEnd();
		}