peoplefbloginpage.luac.lua

来自「htc manila 2 sourcecode」· LUA 代码 · 共 110 行

LUA
110
字号
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;;;;;;;;0,7 7c44ab5e_manila.luac 

require("common")
require("transitions")
require("People\\FaceBookLogin")
require("people\\peopleprofilemessage")
PeopleLoginForm = class(PeopleLoginComponent)
PeopleLoginForm.__init = function(l_1_0)
   PeopleLoginComponent.__init(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

PeopleLoginForm.OnNavigateIn = function(l_2_0, l_2_1)
   objs3D = {}
   objs3D[1] = Camera2D
   setOffScreen()
   FBmgr = FacebookManager_Instance()
   Parameter_FromMe = l_2_0._request.URL.Parameters:GetParameter("FromMe")
   Parameter_FromFriend = _request.URL.Parameters:GetParameter("FromFriend")
   Parameter_FirstName = _request.URL.Parameters:GetParameter("FirstName")
   Parameter_LastName = _request.URL.Parameters:GetParameter("LastName")
   Parameter_Oid = _request.URL.Parameters:GetParameter("Oid")
   PasswordInputBox.Style = 32
   Transition(l_2_1, "In")
end

PeopleLoginForm.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

PeopleLoginForm.loginSuccessPath = function(l_4_0)
   if Parameter_FromMe == "1" then
      _LoginMessageBox = LoginMessageBox()
   elseif Parameter_FromFriend == "1" then
      _application.Navigation:Navigate(URL("Manila://people/facebooklogin/selectaccount.page?FirstName=" .. Parameter_FirstName .. "&FromFriend=" .. Parameter_FromFriend .. "&LastName=" .. Parameter_LastName .. "&Oid=" .. Parameter_Oid), false)
   else
      _application.Navigation:Navigate(URL("Manila://people/facebooklogin/selectaccount.page"), false)
   end
end

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

LoginMessageBox = class(PeopleUpdateProfileMessage)
LoginMessageBox.__init = function(l_6_0)
   PeopleUpdateProfileMessage.__init(l_6_0)
   FBmgr.OnUpdateMeComplete:connect(l_6_0.onUpdateComplete, l_6_0)
   local f = FBmgr:GetMyInformation()
   InitializeCheckbox(CheckComponent, f:GetAutoUpdate())
   FBmgr:UpdateMe()
   l_6_0:SetUI("", nil, "", true)
   l_6_0.IsUpdateComplete = false
   _application:SetLeftSoftkey(Softkey("", nil))
   _application:SetRightSoftkey(Softkey("", nil))
end

LoginMessageBox.onUpdateComplete = function(l_7_0, l_7_1)
   trace("11111234")
   FBmgr.OnUpdateMeComplete:disconnect(l_7_0.onUpdateComplete, l_7_0)
   local fg = FBmgr:GetMyInformation()   
   l_7_0.IsUpdateComplete = true
   if l_7_1 then
      trace("aaaaaa:" .. fg.PhotoPath)
      l_7_0:SetUI("", fg.Birthday, fg.PhotoPath, false)
      l_7_0:SetLeftButtonEvent()
   else
      trace("[Facebook]Update is failed")
      l_7_0:SetUI("", nil, "", false)
   end
end

LoginMessageBox.Destroy = function(l_8_0)
   PeopleUpdateProfileMessage.Destroy(l_8_0)
   if not l_8_0.IsUpdateComplete then
      FBmgr.OnUpdateMeComplete:disconnect(l_8_0.onUpdateComplete, l_8_0)
   else
      l_8_0:DisconnectLeftButtonEvent()
   end
   _application:SetLeftSoftkey(Softkey(Locale:GetString("IDS_BACK"), _PeopleLoginForm.OnLeftSoftKeyPress))
   _application:SetRightSoftkey(Softkey(Locale:GetString("IDS_MENU"), _PeopleLoginForm.OnRightSoftKeyPress))
end

LoginMessageBox.OnLeftButtonRelease = function(l_9_0)
   PeopleUpdateProfileMessage.OnLeftButtonRelease(l_9_0)
   local l_9_1 = FBmgr:GetMyInformation()
   FBmgr:CopyDataToMe(true, CheckComponent.Tag.Value)
   _application.Navigation:NavigateBack()
end


LoginMessageBox.OnRightButtonRelease = function(l_10_0, l_10_1, l_10_2)
   PeopleUpdateProfileMessage.OnRightButtonRelease(l_10_0)
   FBmgr:CopyDataToMe(false, false)
   _application.Navigation:NavigateBack()
end

_PeopleLoginForm = PeopleLoginForm()

⌨️ 快捷键说明

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