  
<% 

'*****************************************************************************
' Copyright (C) 2001 Microsoft Corporation.  All rights reserved.
'
' File:  /SCA/ConfigGeneral/CNCASPPAGEUI_GeneralConfig.inc
' Author: Microsoft Corporation.  
'
' Purpose:
'   Provide functions which creates UI for General Tab and Configuring Diolag for General Tab
'
'Public Methods and Properties Exposed:
'	Sub InitClass(pASPManager)
'	Property URLFormat[ReadOnly, String]
'   	Property ResServerIndex [ReadOnly, Number]      
'	Property IsHostNameToChannelMappingEnabled (ReadOnly, Boolean)
'	Property URLFormatSelected  (ReadOnly, String)
'	Property GUIDSelected  (ReadOnly, String)
'	Property IsHostNameToChannelMappingEnabledSelected (ReadOnly, String)
'	Property IsHostNameToChannelMappingEnabledNotSelected (ReadOnly, String)
'       Property AspCompatibilityMode (ReadOnly, String)
'	Property Error [ReadOnly, String]
'	Property ErrorDetails [ReadOnly, String]
'*****************************************************************************

Class CNCASPPAGEUI_GeneralConfig

	'Public property
	Public URLFormat
	Public URLFormatSelected 
	Public GUIDSelected 

	Public ResServerIndex
   	Public IsHostNameToChannelMappingEnabled

	Public IsHostNameToChannelMappingEnabledSelected
	Public IsHostNameToChannelMappingEnabledNotSelected
	
	Public AspCompatibilityMode
	
	Public Error
	Public ErrorDetails
	
	Private m_pASPPageManager
	
	' ---- [Private] Standard Class_Initialize
	Private Sub Class_Initialize()

		'-- init all member with value
		URLFormat = "None"

		ResServerIndex = -1
		IsHostNameToChannelMappingEnabled = False

		IsHostNameToChannelMappingEnabledSelected = False
		IsHostNameToChannelMappingEnabledNotSelected = False

		Error = IDS_OK_NO_ERROR
		ErrorDetails = ""

	End Sub
			
	'*************************************************
	'Purpose: Get ASPPgeManager object to process UI
	'         
	'Input:	  m_pASPPageManager
	'
	'Output:  none
	'************************************************* 
	Public  Sub InitClass(pASPManager)
	
		' -- Get ASPPageManger
		Set m_pASPPageManager = pASPManager
		' -- Check IsURLFormat boolean and return Hierarchical or Guid
		Call GetURLFormat
		' -- Convert HostNameToChannelMappingEnabled boolean to string 
		Call GetHostNameToChannelMappingEnabled	
		' -- Convert AspEnabled and AspWbcEnabled to string
		Call GetAspCompatibilityMode
		
		' -- transfer error or error details
		Error = m_pASPPageManager.Error
		ErrorDetails = m_pASPPageManager.ErrorDetail
			
	End Sub

	' -- [Private] Get URL Format for UI  
	Private  Sub GetURLFormat()

		'-- Convert URL Format boolean to string in UI	
		If m_pASPPageManager.IsURLFormatHierarchical  Then
			URLFormat = IDS_UI_URLFORMAT_HIERARCHICAL
		Else
			URLFormat = IDS_UI_URLFORMAT_GUID
		End If
		'-- Get default Selected		
		URLFormatSelected = GetSelectedStated(m_pASPPageManager.IsURLFormatHierarchical, False)
		GUIDSelected = GetSelectedStated(m_pASPPageManager.IsURLFormatGUID, True)

		
	End Sub


	' -- [Private] Get Host name to Channel Map
	Private Sub GetHostNameToChannelMappingEnabled()	
		
		On Error Resume next
		' -- Convert  HostNameToChannelMappingEnabled boolean to string
		If m_pASPPageManager.IsHostNameToChannelMappingEnabled Then
			IsHostNameToChannelMappingEnabled = IDS_UI_YES
		Else
			IsHostNameToChannelMappingEnabled = IDS_UI_NO
		End If
		
		'-- Set default selected value for UI
		IsHostNameToChannelMappingEnabledSelected= GetSelectedStated(m_pASPPageManager.IsHostNameToChannelMappingEnabled, True)
		IsHostNameToChannelMappingEnabledNotSelected= GetSelectedStated(m_pASPPageManager.IsHostNameToChannelMappingEnabled, False)								
	
	End Sub
	
	' -- [Private] Get ASP Compatibility Mode
	Private Sub GetAspCompatibilityMode()
		On Error Resume Next
		
		'-- Convert IsAspEnabled and IsAspWbcEnabled to string
		If m_pASPPageManager.IsAspEnabled Or m_pASPPageManager.IsAspWbcEnabled Then
			AspCompatibilityMode = IDS_UI_ASP_MODE_MIXED
		Else
			AspCompatibilityMode = IDS_UI_ASP_MODE_ASPNET_ONLY
		End If
	End Sub
	

	
	
End Class

%>
