📄 3.lua
字号:
-- Decompiled using luadec 1.0 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l2 ;;1,3;65-67;;3,14,17;;35;;3,24;7,24-29;1;9;; 6c422ab4_manila_27A2.luac
require("contacts_database_svc")
LeftSoftKeyPressed = function()
_application.Navigation:Navigate(URL("Manila://people/browserlayer/peopleAll.page"), true)
end
ShowMenu = function()
local l_2_0 = nil
local l_2_1 = ThumbnailList:GetGenerator()
trace("################# ShowMenu ThumbnailList:GetGenerator().SelectedIndex = " .. ThumbnailList:GetGenerator().SelectedIndex)
if l_2_1.SelectedIndex == -1 or l_2_1.SelectedIndex == 0 and l_2_1.Collection:GetCount() == 0 then
l_2_0 = _application.DialogManager:GetDialog(URL("Manila://PeopleGizmoEmpty.dialog"))
else
if ThumbnailList:GetGenerator().Collection:GetCount() == MaxFavorites then
l_2_0 = _application.DialogManager:GetDialog(URL("Manila://PeopleGizmoFull.dialog"))
else
l_2_0 = _application.DialogManager:GetDialog(URL("Manila://PeopleGizmo.dialog"))
end
end
l_2_0.OnExit:connect(DialogCallback)
l_2_0:Show()
end
DialogCallback = function(l_3_0)
l_3_0.OnExit:disconnect(DialogCallback)
if l_3_0.Result.ExitType == DialogExitType_Cancel then
return
end
if l_3_0.Result.UserValue == "Open Contact" then
ViewContactCard()
elseif l_3_0.Result.UserValue == "Add Favorite" then
AddFavorite()
elseif l_3_0.Result.UserValue == "Remove Favorite" then
RemoveFavorite()
elseif l_3_0.Result.UserValue == "Change Picture" then
if ThumbnailList:GetGenerator().SelectedIndex > -1 and (ThumbnailList:GetGenerator().SelectedIndex >= 0 or ThumbnailList:GetGenerator().Collection:GetCount() == MaxFavorites) then
local l_3_1 = ThumbnailList:GetGenerator():GetData(ThumbnailList:GetGenerator().SelectedIndex)
PickPictureForContact()
end
end
ThumbnailList:FocusItems()
end
PickPictureForContact = function()
Shell_PickPicture(false, "")
end
OnPickPictureChanged = function()
local l_5_0 = g_MachineStatus.PhotoPickerStatus.Value
if l_5_0 == 1 then
local l_5_1 = ThumbnailList:GetGenerator():GetData(ThumbnailList:GetGenerator().SelectedIndex)
local l_5_2 = g_MachineStatus.PhotoPickerFilePath.Value
trace("The PhotoPath return = " .. l_5_2)
l_5_1:SetPictureByPath(l_5_2)
end
end
ChangeDefaultContactNumber = function(l_6_0)
l_6_0:PickDefaultContactMethod()
end
ViewContactCard = function()
local l_7_0 = nil
if ThumbnailList:GetGenerator().SelectedIndex == 0 and ThumbnailList:GetGenerator().Collection:GetCount() == 0 then
return AddFavorite()
else
if ThumbnailList:GetGenerator().SelectedIndex > -1 then
local data = ThumbnailList:GetGenerator():GetData(ThumbnailList:GetGenerator().SelectedIndex):GetIDForLua()
PeopleList_StoreOid2(data)
_application.Navigation:Navigate(URL("Manila://PeopleDetail/PeopleContact.page"), true)
end
end
end
AddFavorite = function()
_application.Navigation:Navigate(URL("Manila://people/peoplepicker/contactpicker.page"), true)
end
RemoveFavorite = function()
local l_9_0 = URL("Manila://Confirmation.dialog")
l_9_0.Parameters:AddParameter("Title", Locale:GetString("IDS_REMOVE_FAVORITE_TITLE"))
l_9_0.Parameters:AddParameter("ContentString", Locale:GetString("IDS_REMOVE_FAVORITE_STRING"))
local l_9_1 = _application.DialogManager:GetDialog(l_9_0)
l_9_1.OnExit:connect(OnConfirmationDialogReturned)
l_9_1:Show()
end
OnConfirmationDialogReturned = function(l_10_0)
l_10_0.OnExit:disconnect(OnConfirmationDialogReturned)
local l_10_1 = ThumbnailList:GetGenerator()
if l_10_0.Result.ExitType == DialogExitType_Cancel then
return
elseif l_10_1.SelectedIndex >= 0 and l_10_1.Collection:GetCount() > l_10_1.SelectedIndex then
local l_10_2 = nil
l_10_2 = l_10_1:GetData(l_10_1.SelectedIndex)
l_10_2.IsHTCFavorite = false
end
ThumbnailList:FocusItems()
end
DialNumber = function()
local l_11_0 = nil
trace("ThumbnailList:GetGenerator().Collection:GetCount()=" .. tostring(ThumbnailList:GetGenerator().Collection:GetCount()))
if ThumbnailList:GetGenerator().Collection:GetCount() == 0 then
return AddFavorite()
else
if ThumbnailList:GetGenerator().SelectedIndex > -1 then
l_11_0 = ThumbnailList:GetGenerator():GetData(ThumbnailList:GetGenerator().SelectedIndex)
end
end
if l_11_0 ~= nil then
l_11_0:ConnectVia(l_11_0.DefaultContactMethodID)
end
end
DelayKeyProcess = function()
trace("Delay process timer fired, calling function\n")
DelayKeyProcessTimer:Stop()
local l_12_0 = DelayKeyProcessTimer:GetContext()
if l_12_0 ~= nil then
l_12_0()
DelayKeyProcessTimer:SetContext(nil)
end
end
DelayKeyProcessTimer = timer(0.0099945068359375)
DelayKeyProcessTimer.OnElapsed:connect(DelayKeyProcess)
DelayKeyProcessTimer:Stop()
OnKeyDown = function(l_13_0, l_13_1, l_13_2)
if l_13_1.Code == KeyCode_Return then
l_13_2.value = true
DelayKeyProcessTimer:SetContext(ViewContactCard)
DelayKeyProcessTimer:Start()
end
if l_13_1.Code == KeyCode_Send and (ThumbnailList:GetGenerator().SelectedIndex >= 0 or ThumbnailList:GetGenerator().Collection:GetCount() == MaxFavorites) then
l_13_2.value = true
DelayKeyProcessTimer:SetContext(DialNumber)
DelayKeyProcessTimer:Start()
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -