📄 peopledetail.luac.lua
字号:
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;;4;1,2,6;;;10;2;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,92;;;;;;;;;;;;0,7;3,24;;3,16;0,11,15;;0,0,3,23;1,3,3;;0,15;;0,8;0,18;0,18;0,4,4,4,4,4,4,458,483;0,3,49;0,0,0,0,2,4;0,0,0,0,0,0,0,0,16,33;;;0,0,7,32;;;;0,0,0,0,0,0,0,11,15,19,21,22,23;0,0,0,3;0,0,0,2,3,6,9,12,15,18,86;0,0,4,8,12,27;0,0,4,8,12,27;;;0,10,15;0,6,9; 33e2d853_manila.luac
trace("people detail scripts")
require("machine_status_svc")
require("contacts_database_svc")
require("transitions")
require("ScrollPhysics")
require("messaging_svc")
require("theme")
require("MyFaves_manager_v1_5_svc")
objs3D = {}
objs3D[1] = Camera_3D
objs2D = {}
objs2D[1] = Group2D
setOffScreen()
ContactObj = nil
gbRequireLandscape = false
_peopleDetail_ScreenRotation = nil
screenWidth = 480
MyFavesUtilityObj = nil
g_IsMyFavesContact = false
ContactType = {Mobile = 1, Company = 2, Work = 3, Home = 4, Car = 5, Assistant = 6,SMS = 7,Email = 8,Map = 9,Address = 10,RingTone = 16,Birthday = 17,Anniversary = 18,Add = 19,More = 20,Pager = 21,Radio = 22 }
ContactType_MyFaves = {Mobile = 1, Company = 2, Work = 3, Home = 4,Car = 5,Assistant = 6,SMS = 7,Email = 8,IM = 9,Map = 10,Address = 11,RingTone = 16,Birthday = 17,Anniversary = 18,Add = 19,More = 20,Pager = 21,Radio = 22}
OnNavigateOut = function(l_1_0)
_request.NavigateOutTo:disconnect(OnNavigateOut)
_application.OnVisibilityChanged:disconnect(HandleVisibilityChanged)
if ContactObject ~= nil then
if ContactObject.ContactChangedConnected then
ContactObject.OnContactChanged:disconnect(ContactObject.Update)
ContactObject.ContactChangedConnected = false
end
ContactObject = nil
end
Transition(l_1_0, "Out")
end
OnNavigateIn = function(l_2_0)
_request.NavigateInFrom:disconnect(OnNavigateIn)
Transition(l_2_0, "In")
end
OnPostPageInit = function()
local l_3_0 = ContactObj.ContactInfo:GetContactType()
_request.PostPageInit:disconnect(OnPostPageInit)
_application:SetLeftSoftkey(Softkey(Locale:GetString("IDS_BACK"), LSKFunction_Callback))
if l_3_0 == -1 then
_application:SetRightSoftkey(Softkey("", nil))
else
_application:SetRightSoftkey(Softkey(Locale:GetString("IDS_MENU"), RSKFunction_Callback))
end
ContactObj:PreparePersonInfoData()
Transition("Arbitrary", "In")
end
RSKFunction_Callback = function()
local l_4_0 = true
local l_4_1 = ""
local l_4_2 = ContactObj.ContactInfo:GetContactType()
if l_4_2 == 1 then
l_4_1 = URL("Manila://PeopleDetail-SIM.dialog")
elseif g_IsMyFavesContact == false then
l_4_1 = URL("Manila://PeopleDetail.dialog")
else
l_4_1 = URL("Manila://PeopleDetail_MyFaves.dialog")
end
dialogThing = _application.DialogManager:GetDialog(l_4_1)
dialogThing.OnExit:connect(DialogMenu_Callback)
dialogThing:Show()
end
RSKFunction_Save = function()
end
LSKFunction_Callback = function()
BackToRreviousPage()
end
BackToRreviousPage = function()
_application.Navigation:NavigateBack()
local l_7_0 = _application.Store:GetIntValue(Lifetime_Application, "People.PeopleDetail.LaunchVia")
trace("++++launchFromManila=" .. tostring(l_7_0))
if l_7_0 ~= nil and l_7_0 ~= 0 then
Shell_GoBackToLaunchingApplication()
end
end
GotoSelectNumberPage = function()
local l_8_0 = CheckSIMCardReady()
if l_8_0 ~= true then
return
end
_application.Navigation:Navigate(URL("Manila://PeopleSelectNumber/selectNumber.page"), true)
end
FillDataToVcard = function()
trace("[FillDataToVcard]\n")
local id = ContactObj.ContactInfo:GetIDForLua()
trace("[FillDataToVcard] - value = " .. id)
if id then
local cdi = ContactDatabase_Instance()
if cdi then
local gid = cdi:GetContactByID(id)
if gid then
trace("[FillDataToVcard] - Query success!\n")
local name = VCName()
local org = VCOrg()
local tel = VCTel()
local fax = VCFax()
local url = VCUrl()
local email = VCEmail()
local address1 = VCAddress()
local address2 = VCAddress()
local r11 = nil
local title = nil
local note = nil
local role = nil
local r15 = nil
FillName(gid, name)
FillOrg(gid, org)
FillTel(gid, tel)
FillFax(gid, fax)
FillUrl(gid, url)
FillEmail(gid, email)
FillAddress(gid, VCAddress_Work, address1)
FillAddress(gid, VCAddress_Home, address2)
FillTitle(gid, title)
FillNote(gid, note)
FillRole(gid, role)
r15 = name.FirstName .. ".vcf"
CvCardWrapper_CreateVCard(name,org,tel,fax,url,email,address2,address1,title,note,role,r15)
_application.Navigation:Navigate(URL("Manila://people/peoplepickerAll/contactpickerAll.page?File=" .. r15 .. "&Oid=" .. id), false)
end
end
end
end
CheckContactValue = function(l_10_0)
if l_10_0:HasValue() then
return l_10_0:GetValue()
else
return ""
end
end
FillName = function(l_11_0, l_11_1)
l_11_1.FirstName = CheckContactValue(l_11_0:GetFirstName())
l_11_1.MidName = CheckContactValue(l_11_0:GetMiddleName())
l_11_1.LastName = CheckContactValue(l_11_0:GetLastName())
l_11_1.NickName = CheckContactValue(l_11_0:GetNickName())
l_11_1.Title = CheckContactValue(l_11_0:GetTitle())
l_11_1.Suf = CheckContactValue(l_11_0:GetSuffix())
end
FillOrg = function(l_12_0, l_12_1)
l_12_1.Comp = CheckContactValue(l_12_0:GetCompanyName())
l_12_1.Div = CheckContactValue(l_12_0:GetDepartment())
end
FillTel = function(l_13_0, l_13_1)
l_13_1.Work = CheckContactValue(l_13_0:GetBusinessTelephoneNumber())
l_13_1.Work2 = CheckContactValue(l_13_0:GetBusiness2TelephoneNumber())
l_13_1.Home = CheckContactValue(l_13_0:GetHomeTelephoneNumber())
l_13_1.Cell = CheckContactValue(l_13_0:GetMobileTelephoneNumber())
l_13_1.Car = CheckContactValue(l_13_0:GetCarTelephoneNumber())
l_13_1.Other = CheckContactValue(l_13_0:GetAssistantTelephoneNumber())
l_13_1.Pager = CheckContactValue(l_13_0:GetPagerNumber())
l_13_1.Home2 = CheckContactValue(l_13_0:GetHome2TelephoneNumber())
l_13_1.Isdn = CheckContactValue(l_13_0:GetRadioTelephoneNumber())
l_13_1.Pref = CheckContactValue(l_13_0:GetCompanyTelephoneNumber())
end
FillFax = function(l_14_0, l_14_1)
l_14_1.Work = CheckContactValue(l_14_0:GetBusinessFaxNumber())
l_14_1.Home = CheckContactValue(l_14_0:GetHomeFaxNumber())
end
FillUrl = function(l_15_0, l_15_1)
l_15_1.Work = CheckContactValue(l_15_0:GetWebPage())
l_15_1.Home = ""
end
FillEmail = function(l_16_0, l_16_1)
l_16_1.Pref = CheckContactValue(l_16_0:GetEmail1Address())
l_16_1.Tlx = CheckContactValue(l_16_0:GetEmail2Address())
end
FillAddress = function(l_17_0, l_17_1, l_17_2)
trace("[FillAddress] - nType = " .. l_17_1)
if l_17_1 == VCAddress_Work then
l_17_2.Location = CheckContactValue(l_17_0:GetBusinessAddress())
l_17_2.Street = CheckContactValue(l_17_0:GetBusinessAddressStreet())
l_17_2.City = CheckContactValue(l_17_0:GetBusinessAddressCity())
l_17_2.State = CheckContactValue(l_17_0:GetBusinessAddressState())
l_17_2.Zip = CheckContactValue(l_17_0:GetBusinessAddressPostalCode())
l_17_2.Country = CheckContactValue(l_17_0:GetBusinessAddressCountry())
else
if ntype == VCAddress_Home then
l_17_2.Location = CheckContactValue(l_17_0:GetHomeAddress())
l_17_2.Street = CheckContactValue(l_17_0:GetHomeAddressStreet())
l_17_2.City = CheckContactValue(l_17_0:GetHomeAddressCity())
l_17_2.State = CheckContactValue(l_17_0:GetHomeAddressState())
l_17_2.Zip = CheckContactValue(l_17_0:GetHomeAddressPostalCode())
l_17_2.Country = CheckContactValue(l_17_0:GetHomeAddressCountry())
end
end
end
FillTitle = function(l_18_0, l_18_1)
l_18_1 = CheckContactValue(l_18_0:GetJobTitle())
end
FillNote = function(l_19_0, l_19_1)
l_19_1 = ""
end
FillRole = function(l_20_0, l_20_1)
l_20_1 = ""
end
DialogMenu_Callback = function(l_21_0)
if l_21_0.Result.ExitType ~= DialogExitType_Cancel then
local l_21_1 = l_21_0.Result.UserValue
if l_21_1 == "Edit" then
if g_IsMyFavesContact == false then
ContactObj.ContactInfo:OpenContactEditor()
else
local x = MyFavesUtilityObj:GetUIPositionByOID(ContactObj.ContactInfo:GetIDForLua())
MyFavesUtilityObj:EditMy5Contact(x, ContactObj.ContactInfo:GetIDForLua())
_application.Navigation:Navigate(URL("Manila://myfaves.page"), false)
end
elseif l_21_1 == "Delete" then
ShowConfirmDeleteDialog()
elseif l_21_1 == "SpeedDial" then
elseif l_21_1 == "VideoCall" then
Shell_MakeAVTCall(ContactObj.ContactInfo:GetMobilePhoneNum())
elseif l_21_1 == "MMS" then
Shell_SendAMMS(ContactObj.ContactInfo:GetMobilePhoneNum())
elseif l_21_1 == "SendByMessage" then
FillDataToVcard()
elseif l_21_1 == "SaveSIM" then
GotoSelectNumberPage()
elseif l_21_1 == "SIM2Contact" then
ShowConfirmSave2ContactDialog()
elseif g_IsMyFavesContact == true then
if l_21_1 == "ReplaceContact" then
local url = URL("Manila://people/peoplepicker/contactpicker.page")
url.Parameters:AddParameter("MyFaves.CID", tostring(MyFavesUtilityObj:GetUIPositionByOID(ContactObj.ContactInfo:GetIDForLua())))
_application.Navigation:Navigate(url)
elseif l_21_1 == "SetAsFavorite" then
MyFavesUtilityObj:SetAsFavorite(ContactObj.ContactInfo:GetIDForLua())
_application.Navigation:Navigate(URL("Manila://myfaves.page"), false)
end
end
end
end
ShowConfirmDeleteDialog = function()
local l_22_0 = URL("Manila://Confirmation.dialog")
l_22_0.Parameters:AddParameter("Title", Locale:GetString("IDS_CONFIRM_CONTACT_TITLE"))
l_22_0.Parameters:AddParameter("ContentString", Locale:GetString("IDS_CONFIRM_CONTACT_STRING"))
local l_22_1 = _application.DialogManager:GetDialog(l_22_0)
l_22_1.OnExit:connect(OnConfirmationDeleteReturned)
l_22_1:Show()
end
OnConfirmationDeleteReturned = function(l_23_0)
l_23_0.OnExit:disconnect(OnConfirmationDeleteReturned)
if l_23_0.Result.ExitType ~= DialogExitType_Cancel then
ContactObj:DeleteContact()
BackToRreviousPage()
end
end
ShowConfirmSave2ContactDialog = function()
local l_24_0 = URL("Manila://Confirmation.dialog")
l_24_0.Parameters:AddParameter("Title", Locale:GetString("IDS_PEOPLEDETAILDIALOG_SIMTOCONTACT"))
local l_24_1 = _application.DialogManager:GetDialog(l_24_0)
l_24_1.OnExit:connect(OnConfirmationSaveReturned)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -