⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 peopleselectaccountpage.luac.lua

📁 htc manila 2 sourcecode
💻 LUA
字号:
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;;;0,0,25,31,37,38,38;;;;;;;0,8;;;0,0,0,0,0,4;0,0,14;;;0,0,0,18;;;;;;;;;; 698c762a_manila.luac 

require("transitions")
require("scrollphysics")
require("facebook_svc")
require("CheckboxControl")
SelectAccountForm = class()
SelectAccountForm.__init = function(l_1_0)
   l_1_0._application = _application
   l_1_0._application:SetLeftSoftkey(Softkey("", nil))
   l_1_0._application:SetRightSoftkey(Softkey(Locale:GetString("IDS_CANCEL"), l_1_0.OnRightSoftKeyPress, l_1_0))
   l_1_0._request = _request
   l_1_0._request.NavigateInFrom:connect(l_1_0.OnNavigateIn, l_1_0)
   l_1_0._request.NavigateOutTo:connect(l_1_0.OnNavigateOut, l_1_0)
end

SelectAccountForm.OnNavigateIn = function(l_2_0, l_2_1)
   objs3D = {}
   objs3D[1] = Camera2D
   setOffScreen()
   FBmgr = FacebookManager_Instance()
   FBmgr.OnUpdateFriendListComplete:connect(l_2_0.onUpdateFriendListComplete, l_2_0)
   FBmgr:UpdateFriendList()
   Transition(l_2_1, "In")
end

SelectAccountForm.OnNavigateOut = function(l_3_0, l_3_1)
   l_3_0._request.NavigateInFrom:disconnect(l_3_0.OnNavigateIn, l_3_0)
   l_3_0._request.NavigateOutTo:disconnect(l_3_0.OnNavigateOut, l_3_0)
   Transition(l_3_1, "Out")
end

SelectAccountForm.onUpdateFriendListComplete = function(l_4_0, l_4_1)
   if l_4_1 then
      FBmgr.OnUpdateFriendListComplete:disconnect(l_4_0.onUpdateFriendListComplete, l_4_0)
      AccountCompoment._visible = true
      DownloadText._visible = false
      Parameter_FromFriend = _request.URL.Parameters:GetParameter("FromFriend")
      local l_4_2 = _request.URL.Parameters:GetParameter("FirstName")
      local l_4_3 = _request.URL.Parameters:GetParameter("LastName")
      local l_4_4 = _request.URL.Parameters:GetParameter("Oid")
      local l_4_5, l_4_6 = nil, nil
      if Parameter_FromFriend == "1" then
         _Oid = l_4_4
         l_4_5 = l_4_2
         l_4_6 = l_4_3
      else
         _Oid = FBmgr:GetOidFromStore()
         local gln = FBmgr:GetFirstLastName(_Oid)
         l_4_5 = gln:GetItem(0)
         l_4_6 = gln:GetItem(1)
      end
      if l_4_5 == nil then
         l_4_5 = ""
      end
      if l_4_6 == nil then
         l_4_6 = ""
      end
      FriendCollection = FBmgr:GetLinkCandidates(l_4_5, l_4_6)
      SearchCount = _application.Store:GetIntValue(Lifetime_Application, "People.Facebook.HitCandidates")
      local count = FriendCollection:GetCount()
      _Collection = VectorNotifyint()
      if count == 0 then
         _Collection:push_back(-1)
      else
         for i = 0, count - 1 do
            _Collection:push_back(i)
         end
      end
      _AccountList = AccountList(_Collection)
   else
      DownloadText.String = Locale:GetString("IDS_DOWNLOADFAILED")
   end
end

SelectAccountForm.OnRightSoftKeyPress = function(l_5_0)
   l_5_0._application.Navigation:NavigateBack()
   if Parameter_FromFriend == "1" then
     FBmgr:CopyDataToFriend(2, "", false)
   end
end

AccountList = class()
AccountList.__init = function(l_6_0, l_6_1)
   l_6_0._request = _request
   l_6_0._request.NavigateOutTo:connect(l_6_0.Destroy, l_6_0)
   l_6_0.Layout = SequentialLayout()
   l_6_0.Layout:SetItemSize(480, 80, 0)
   l_6_0.Layout:SetHeaderSize(480, 40, 0)
   l_6_0.ListView = AccountListView
   l_6_0.ListView:SetLayout(l_6_0.Layout)
   l_6_0.Collection = l_6_1
   l_6_0.Generator = SequentialLibraryGeneratorint(l_6_0.Collection, l_6_0.ListView:GetMovie(), l_6_0.ListView.ComponentLibraryName, l_6_0.ListView.ComponentLibraryID)
   l_6_0.Generator:SetHeaderComponent(l_6_0.ListView:GetMovie(), l_6_0.ListView.ComponentLibraryName, "AccountHeader")
   l_6_0.Generator.HeaderCreated:connect(l_6_0.OnHeaderCreated, l_6_0)
   l_6_0.Generator.ItemCreated:connect(l_6_0.OnItemCreated, l_6_0)
   l_6_0.Generator.GroupFunction:connect(l_6_0.OnHeaderGroup, l_6_0)
   l_6_0.ListView:SetGenerator(l_6_0.Generator)
   l_6_0.ListPhysics = ScrollPhysics(l_6_0.ListView, l_6_0.ListView, HandleSelection)
   l_6_0.ListPhysics:ConnectMouseEvents()
end

AccountList.Destroy = function(l_7_0)
   l_7_0._request.NavigateOutTo:disconnect(l_7_0.Destroy, l_7_0)
   l_7_0.ListPhysics:DisconnectMouseEvents()
end

AccountList.OnItemCreated = function(l_8_0, l_8_1, l_8_2)
   local aid = l_8_2.Namespace:FindName("AccountID")
   if l_8_1 == -1 then
      aid.String = Locale:GetString("IDS_NOACCOUNTDATA")
   else
      aid.String = FriendCollection:GetItem(l_8_1).Name
      if l_8_1 < SearchCount then
         aid.Color = Color(125, 0, 0, 255)
      end
   end
end

AccountList.OnHeaderCreated = function(l_9_0, l_9_1, l_9_2)
   local aht = l_9_2.Namespace:FindName("AccountHeaderText")
   if l_9_1 == -1 then
      aht.String = aht.String .. "(0)"
   else
      aht.String = aht.String .. "(" .. _Collection:GetCount() .. ")"
   end
end

AccountList.OnHeaderGroup = function(l_10_0, l_10_1, l_10_2)
end

HandleSelection = function(l_11_0)
   if l_11_0 == 0 then
      return 
   end
   local l_11_1 = _AccountList.Generator:GetDataByRealizedIndex(l_11_0)
   if l_11_1 == -1 then
      return 
   end
   _MassageBox = UpdateInfo(FriendCollection:GetItem(l_11_1))
end

UpdateInfo = class()
UpdateInfo.__init = function(l_12_0, l_12_1)
   l_12_0.IsUpdateComplete = false
   l_12_0._request = _request
   l_12_0._request.NavigateOutTo:connect(l_12_0.Destroy, l_12_0)
   l_12_0._application = _application
   BackGround.onPress:connect(l_12_0.PageHandle, l_12_0)
   BackGround.onRelease:connect(l_12_0.PageHandle, l_12_0)
   ButtonThree.onPress:connect(l_12_0.OnButtonThreePress, l_12_0)
   ButtonThree.onRelease:connect(l_12_0.OnButtonThreeRelease, l_12_0)
   ButtonThree.onReleaseOutside:connect(l_12_0.OnButtonThreeReleaseOutside, l_12_0)
   CheckHitArea.onRelease:connect(l_12_0.OnCheckBoxRelease, l_12_0)
   ButtonOne.Opacity.value = 30
   ButtonTwo.Opacity.value = 30
   UpdateInfoGroup._visible = true
   InitializeCheckbox(CheckComponent, false)
   _application.TouchFlo.HorizontalEnabled = false
   _application.TouchFlo.VerticalEnabled = false
   FBmgr.OnUpdateComplete:connect(l_12_0.onUpdateComplete, l_12_0)
   l_12_0.Fid = l_12_1.Fid
   _AccountList.ListPhysics:DisconnectMouseEvents()
   InitializeCheckbox(CheckComponent, l_12_1.AutoUpdate)
   l_12_0:SetUI(l_12_1.Name, "", true, false)
   FBmgr:UpdateByEditor(l_12_0.Fid)
end

UpdateInfo.SetButtonEvent = function(l_13_0)
   ButtonOne.Opacity.value = 100
   ButtonOne.onPress:connect(l_13_0.OnButtonOnePress, l_13_0)
   ButtonOne.onRelease:connect(l_13_0.OnButtonOneRelease, l_13_0)
   ButtonOne.onReleaseOutside:connect(l_13_0.OnButtonOneReleaseOutside, l_13_0)
   ButtonTwo.Opacity.value = 100
   ButtonTwo.onPress:connect(l_13_0.OnButtonTwoPress, l_13_0)
   ButtonTwo.onRelease:connect(l_13_0.OnButtonTwoRelease, l_13_0)
   ButtonTwo.onReleaseOutside:connect(l_13_0.OnButtonTwoReleaseOutside, l_13_0)
end

UpdateInfo.SetUI = function(l_14_0, l_14_1, l_14_2, l_14_3, l_14_4)
   local l_14_5 = FBmgr:CropPic(l_14_2)
   TitleText.String = l_14_1
   if l_14_3 then
      PersonPic._visible = false
      UpdatingText.String = Locale:GetString("IDS_UPDATING")
      UpdatingText._visible = true
   elseif l_14_4 then
      UpdatingText.String = Locale:GetString("IDS_DOWNLOADFAILED")
      UpdatingText._visible = true
   else
      if not l_14_5:HasValue() then
         UpdatingText._visible = false
         PersonPic._visible = true
         PersonPic:SetTexture("\\Windows\\HTC\\Assets\\Images\\People\\VGA\\PeoplePlaceholder.qtc")
         PersonPic.TextureCoords:set(0, 0, 0.92578125, 0.92578125)
      else
         UpdatingText._visible = false
         PersonPic._visible = true
         PersonPic:SetTexture(l_14_5:GetValue().Texture)
         PersonPic.TextureCoords.value = l_14_5:GetValue().UV
      end
   end
end

UpdateInfo.onUpdateComplete = function(l_15_0, l_15_1)
   trace("[Facebook]Update complete")
   FBmgr.OnUpdateComplete:disconnect(l_15_0.onUpdateComplete, l_15_0)
   l_15_0.IsUpdateComplete = true
   local l_15_2 = FBmgr:GetFBDataByFid(l_15_0.Fid)
   if l_15_1 then
      l_15_0.IsUpdateComplete = true
      l_15_0:SetUI(l_15_2.Name, l_15_2.PhotoPath, false, false)
      ButtonOne.onPress:connect(l_15_0.OnButtonOnePress, l_15_0)
      ButtonOne.onRelease:connect(l_15_0.OnButtonOneRelease, l_15_0)
      ButtonOne.onReleaseOutside:connect(l_15_0.OnButtonOneReleaseOutside, l_15_0)
      ButtonOne.Opacity.value = 100
      ButtonTwo.onPress:connect(l_15_0.OnButtonTwoPress, l_15_0)
      ButtonTwo.onRelease:connect(l_15_0.OnButtonTwoRelease, l_15_0)
      ButtonTwo.onReleaseOutside:connect(l_15_0.OnButtonTwoReleaseOutside, l_15_0)
      ButtonTwo.Opacity.value = 100
   else
      trace("[Facebook]Update is failed")
      l_15_0:SetUI(l_15_2.Name, "", false, true)
   end
end

UpdateInfo.Destroy = function(l_16_0)
   l_16_0._request.NavigateOutTo:disconnect(l_16_0.Destroy, l_16_0)
   if ButtonOne.Opacity.value == 100 then
      ButtonOne.onPress:disconnect(l_16_0.OnButtonOnePress, l_16_0)
      ButtonOne.onRelease:disconnect(l_16_0.OnButtonOneRelease, l_16_0)
      ButtonOne.onReleaseOutside:disconnect(l_16_0.OnButtonOneReleaseOutside, l_16_0)
      ButtonTwo.onPress:disconnect(l_16_0.OnButtonTwoPress, l_16_0)
      ButtonTwo.onRelease:disconnect(l_16_0.OnButtonTwoRelease, l_16_0)
      ButtonTwo.onReleaseOutside:disconnect(l_16_0.OnButtonTwoReleaseOutside, l_16_0)
   end
   BackGround.onPress:disconnect(l_16_0.AccountPageHandle, l_16_0)
   BackGround.onRelease:disconnect(l_16_0.PageHandle, l_16_0)
   ButtonThree.onPress:disconnect(l_16_0.OnButtonThreePress, l_16_0)
   ButtonThree.onRelease:disconnect(l_16_0.OnButtonThreeRelease, l_16_0)
   ButtonThree.onReleaseOutside:disconnect(l_16_0.OnButtonThreeReleaseOutside, l_16_0)
   CheckHitArea.onRelease:disconnect(l_16_0.OnCheckBoxRelease, l_16_0)
   UpdateInfoGroup._visible = false
   _application.TouchFlo.HorizontalEnabled = true
   _application.TouchFlo.VerticalEnabled = true
   _AccountList.ListPhysics:ConnectMouseEvents()
   if not l_16_0.IsUpdateComplete then
      FBmgr.OnUpdateComplete:disconnect(l_16_0.onUpdateComplete, l_16_0)
   end
end

UpdateInfo.OnCheckBoxRelease = function(l_17_0)
   ToggleCheckbox(CheckComponent)
end

UpdateInfo.OnButtonOneRelease = function(l_18_0, l_18_1, l_18_2)
   ButtonOneText.Color = Color(0, 0, 0, 255)
   ButtonOne:SetTexture("\\Windows\\HTC\\Assets\\Images\\People\\VGA\\Topaz_DialogBox_bt_rest.qtc")
   l_18_0:Destroy()
   local l_18_3 = FBmgr:GetFBDataByFid(l_18_0.Fid)
   if Parameter_FromFriend == "1" then
      FBmgr:CopyDataToFriend(0, l_18_0.Fid, CheckComponent.Tag.Value)
   elseif _Oid ~= "" then
      FBmgr:SetLink(_Oid, l_18_0.Fid)
      FBmgr:Load(_Oid)
      FBmgr:SetAutoUpdate(_Oid, CheckComponent.Tag.Value)
      FBmgr:SetPic(_Oid, l_18_3.PhotoPath)
      FBmgr:SetBirthday(_Oid, l_18_3.FBBirthday)
   end
   _application.Navigation:NavigateBack()
end

UpdateInfo.OnButtonOnePress = function(l_19_0, l_19_1, l_19_2)
   ButtonOneText.Color = Color(255, 255, 255, 255)
   ButtonOne:SetTexture("\\Windows\\HTC\\Assets\\Images\\People\\VGA\\Topaz_DialogBox_bt_press.qtc")
end

UpdateInfo.OnButtonOneReleaseOutside = function(l_20_0, l_20_1, l_20_2)
   ButtonOneText.Color = Color(0, 0, 0, 255)
   ButtonOne:SetTexture("\\Windows\\HTC\\Assets\\Images\\People\\VGA\\Topaz_DialogBox_bt_rest.qtc")
end

UpdateInfo.OnButtonTwoReleaseOutside = function(l_21_0, l_21_1, l_21_2)
   ButtonTwoText.Color = Color(0, 0, 0, 255)
   ButtonTwo:SetTexture("\\Windows\\HTC\\Assets\\Images\\People\\VGA\\Topaz_DialogBox_bt_rest.qtc")
end

UpdateInfo.OnButtonTwoPress = function(l_22_0, l_22_1, l_22_2)
   ButtonTwoText.Color = Color(255, 255, 255, 255)
   ButtonTwo:SetTexture("\\Windows\\HTC\\Assets\\Images\\People\\VGA\\Topaz_DialogBox_bt_press.qtc")
end

UpdateInfo.OnButtonTwoRelease = function(l_23_0, l_23_1, l_23_2)
   ButtonTwoText.Color = Color(0, 0, 0, 255)
   ButtonTwo:SetTexture("\\Windows\\HTC\\Assets\\Images\\People\\VGA\\Topaz_DialogBox_bt_rest.qtc")
   l_23_0:Destroy()
   if Parameter_FromFriend == "1" then
      FBmgr:CopyDataToFriend(1, l_23_0.Fid, CheckComponent.Tag.Value)
   elseif _Oid ~= "" then
      FBmgr:SetLink(_Oid, l_23_0.Fid)
      FBmgr:Load(_Oid)
      FBmgr:SetAutoUpdate(_Oid, CheckComponent.Tag.Value)
   end
   _application.Navigation:NavigateBack()
end

UpdateInfo.OnButtonThreeReleaseOutside = function(l_24_0, l_24_1, l_24_2)
   ButtonThreeText.Color = Color(0, 0, 0, 255)
   ButtonThree:SetTexture("\\Windows\\HTC\\Assets\\Images\\People\\VGA\\Topaz_DialogBox_bt_rest.qtc")
end

UpdateInfo.OnButtonThreePress = function(l_25_0, l_25_1, l_25_2)
   ButtonThreeText.Color = Color(255, 255, 255, 255)
   ButtonThree:SetTexture("\\Windows\\HTC\\Assets\\Images\\People\\VGA\\Topaz_DialogBox_bt_press.qtc")
end

UpdateInfo.OnButtonThreeRelease = function(l_26_0, l_26_1, l_26_2)
   ButtonThreeText.Color = Color(0, 0, 0, 255)
   ButtonThree:SetTexture("\\Windows\\HTC\\Assets\\Images\\People\\VGA\\Topaz_DialogBox_bt_rest.qtc")
   l_26_0:Destroy()
end

UpdateInfo.PageHandle = function(l_27_0, l_27_1, l_27_2)
   l_27_2.value = true
end

_SelectAccountForm = SelectAccountForm()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -