/// ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
/// ' Microsoft Content Management Server - Sample Code 
/// '
/// ' This sample code is provided "AS IS" with no warranties, and confers no rights. 
/// ' You assume all risk for your use. (c) 2001 Microsoft Corporation. All rights reserved.
/// '
/// ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

using System;
using System.Web;
//Add reference for localization
using System.EnterpriseServices;
using System.Globalization;
using System.Resources;
using System.Threading;
//Add reference for navigation tree control
using Microsoft.Web.UI.WebControls;
//Add reference to the CMS API
using Microsoft.ContentManagement.Publishing;
using Microsoft.ContentManagement.Web.Caching;
//Add reference to the Mcms control library
using McmsWebControlLibrary;

namespace WoodgroveNet.Templates
{
	/// <summary>
	/// Summary description for Intranet_Product.
	/// </summary>
	public class SummaryPage : System.Web.UI.Page
	{
		#region CMS Placeholders

		#endregion CMS Placeholders

		protected System.Web.UI.WebControls.Literal LTSummaryPageCurrentUser;
		protected System.Web.UI.WebControls.Literal LTSummaryPageUser;

		protected McmsWebControlLibrary.McmsBreadcrumbControl McmsBreadcrumbControlSummaryPage;
		protected McmsWebControlLibrary.McmsSummary McmssummarySummary;
		protected System.Web.UI.WebControls.Literal LTSummaryPageCurrUser;				

		//Resource Manager for localization
		protected ResourceManager LocalizationResourceManager;
		
		#region Private member variables
		private string channelDisplayName;
		#endregion Private member variables	

		#region Properties
		/// <summary>
		///		The Channel name that appears at the top of the page.
		/// </summary>
		/// 
		public string ChannelDisplayName
		{
			get { return channelDisplayName; }
			set { channelDisplayName = value; }
		}	
		#endregion Properties

		#region Child Controls
		/// <summary>
		/// Child controls
		/// </summary>
		protected override void CreateChildControls()
		{	
		}
		#endregion Child Controls

		/// <summary>
		/// Page_Load Function
		/// </summary>
		private void Page_Load(object sender, System.EventArgs e)
		{
			//If you want to display the username on the browser, uncomment this piece of code.
			/*
			if (CmsHttpContext.Current.IsLoggedInAsGuest)
			{
				LTSummaryPageUser.Text = LocalizationResourceManager.GetString("Guest");						
			}
			else
			{								
				LTSummaryPageUser.Text = Server.HtmlEncode(CmsHttpContext.Current.User.ClientAccountName);							
			}
			LTSummaryPageCurrentUser.Text = LocalizationResourceManager.GetString("CurrentUser");
			*/
			
			//This function implements the ValidationCallback mechanism
			CmsHttpCachePolicy.Current.AddValidationCallbackAllCmsContent();

			//Code for Tracing Functionality
			string TracingSeperator = " :: ";
			// Write a line to the Listener
			System.Diagnostics.Trace.WriteLine(System.DateTime.Now + TracingSeperator + "Template" + TracingSeperator + "SummaryPage" + TracingSeperator + "This is the Page Load for the SummaryPage Template.");
			// Record your output
			System.Diagnostics.Trace.Flush();
			//End of Code for Tracing Functionality
					
		
		} //End Page_Load Function

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
			LocalizationResourceManager = (ResourceManager) Application["WoodgroveNetResourceManager"];
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion
	}
}
