
local templateMananger = XLGetObject("Xunlei.UIEngine.TemplateManager")
local frameHostWndTemplate = templateMananger:GetTemplate("BoltFox","HostWndTemplate")
if frameHostWndTemplate then  
	local frameHostWnd = frameHostWndTemplate:CreateInstance("BoltFox.MainFrame")
	if frameHostWnd then
		local objectTreeTemplate = templateMananger:GetTemplate("BoltFoxTree","ObjectTreeTemplate")
		if objectTreeTemplate then
			local uiObjectTree = objectTreeTemplate:CreateInstance("BoltFox.MainObjectTree")
			if uiObjectTree then
				local uiHelper = XLGetGlobal("BoltFox.UIHelper")
				uiHelper:Initialize(uiObjectTree)
				frameHostWnd:BindUIObjectTree(uiObjectTree)
				frameHostWnd:Create()
			end
		end
	end
end
