📄 3.lua
字号:
-- Decompiled using luadec 1.0 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l2 ;2,14;;7;12;4,8;4,8;17,21,25,29,40-164,42-164,44-164,45-164,70-110;;5,6;; 53dcdccd_manila_39B8.luac
require("call_log_database_svc")
require("machine_status_svc")
require("contacts_database_svc")
require("theme")
if _config_os == "windowsmobile" then
Database = CallLogDatabase()
Database.LastNumberOfCalls = 25
CallLogQuery = nil
machineStatus = MachineStatus()
else
CallLogQuery = VectorNotifyint()
for i = 0, 48 do
CallLogQuery:push_back(i)
end
end
OpenContact = function(l_1_0)
local l_1_1 = l_1_0:GetPoomContact()
trace("Checking to see if the contact has a PoomContact object\n")
if l_1_1:HasValue() then
trace("Contact has PoomContact\n")
local l_1_2 = l_1_1:GetValue()
l_1_2:ShowDetails()
end
end
CallContact = function(l_2_0)
if l_2_0:GetName():HasValue() then
PhoneMakeCall(l_2_0:GetNumber():GetValue(), l_2_0:GetName():GetValue())
else
PhoneMakeCall(l_2_0:GetNumber():GetValue())
end
end
HandleIndexSelection = function(l_3_0)
if _config_os == "windowsmobile" then
local l_3_1 = CallLogGenerator:GetData(l_3_0)
CallContact(l_3_1)
end
end
HandleCallLogItemKeyDown = function(l_4_0, l_4_1, l_4_2)
if l_4_1.Code == KeyCode_Return or l_4_1.Code == KeyCode_Space then
local l_4_3 = CallLogGenerator:GetDataForItem(l_4_0)
CallContact(l_4_3)
l_4_2.value = true
end
end
HandleSelected = function(l_5_0)
local l_5_1 = l_5_0.Namespace:FindName("NameText")
local l_5_2 = l_5_0.Namespace:FindName("DescriptionText")
l_5_1.Color = GetMainTextSelectedColor()
l_5_2.Color = GetSubTextSelectedColor()
end
HandleDeselected = function(l_6_0)
local l_6_1 = l_6_0.Namespace:FindName("NameText")
local l_6_2 = l_6_0.Namespace:FindName("DescriptionText")
l_6_1.Color = GetMainTextUnselectedColor()
l_6_2.Color = GetSubTextUnselectedColor()
end
HandleCallLogItemCreated = function(l_7_0, l_7_1)
l_7_1.Focusable = true
l_7_1.OnSelected:connect(HandleSelected)
l_7_1.OnDeselected:connect(HandleDeselected)
l_7_1.onKeyDown:connect(HandleCallLogItemKeyDown)
local l_7_2 = l_7_1.Namespace:FindName("NameText")
local l_7_3 = l_7_1.Namespace:FindName("DescriptionText")
local l_7_4 = l_7_1.Namespace:FindName("IconHolder")
local l_7_5 = l_7_1.Namespace:FindName("CellImage")
l_7_2.Color = GetMainTextUnselectedColor()
l_7_3.Color = GetSubTextUnselectedColor()
if _config_os == "windowsmobile" then
local l_7_6 = l_7_0:GetName()
local l_7_7 = l_7_0:GetNumber()
local l_7_8 = l_7_0:GetStartTime()
local l_7_9 = ""
if l_7_6:HasValue() then
l_7_2.String = l_7_6:GetValue()
else
if l_7_7:HasValue() then
l_7_2.String = l_7_7:GetValue()
else
l_7_2.String = Locale:GetString("IDS_BLOCKED")
end
end
if l_7_8.IsValid then
local l_7_10 = nil
if l_7_8:IsToday() then
l_7_10 = Locale:GetString("IDS_TODAY")
else
if l_7_8:IsYesterday() then
l_7_10 = Locale:GetString("IDS_YESTERDAY")
else
if l_7_8:IsWithinLastWeek() then
l_7_10 = l_7_8:GetDateString(DateFormatOptions_UseDayOfWeek)
else
l_7_10 = l_7_8:GetDateString(DateFormatOptions_UseShortDate)
end
end
end
l_7_9 = ": " .. l_7_10 .. ", " .. l_7_8:GetTimeString(TimeFormatOptions_Default)
end
if l_7_0:IOMMissedCall() then
if MissedCallCount > 0 then
l_7_4:SetTextureRef("icon_holder_missed")
MissedCallCount = MissedCallCount - 1
end
l_7_5:SetTextureRef("icon_missedCall")
l_7_3.String = Locale:GetString("IDS_FILTER_MISSED") .. l_7_9
else
if l_7_0:IOMOutgoingCall() then
l_7_5:SetTextureRef("icon_outgoingCall")
l_7_3.String = Locale:GetString("IDS_FILTER_OUTGOING") .. l_7_9
else
if l_7_0:IOMIncomingCall() then
l_7_5:SetTextureRef("icon_incomingCall")
l_7_3.String = Locale:GetString("IDS_FILTER_INCOMING") .. l_7_9
end
end
end
else
l_7_2.String = tostring(l_7_0) .. " Test Name"
if l_7_0 == 0 then
l_7_5:SetTextureRef("icon_missedCall")
elseif l_7_0 == 1 then
l_7_5:SetTextureRef("icon_incomingCall")
else
l_7_5:SetTextureRef("icon_outgoingCall")
end
if l_7_0 == 0 then
l_7_4:SetTextureRef("icon_holder_missed")
end
end
end
HandleCallLogItemDestroyed = function(l_8_0)
l_8_0.OnSelected:disconnect(HandleSelected)
l_8_0.OnDeselected:disconnect(HandleDeselected)
l_8_0.onKeyDown:disconnect(HandleCallLogItemKeyDown)
end
if _config_os == "windowsmobile" then
CallHistoryTitle = _application.Navigation.Title
end
UpdateQuery = function()
if _config_os == "windowsmobile" then
local l_9_0 = (CallLogWhereCondition())
local l_9_1 = nil
if FilterValue == CallLogWhereCondition_All then
l_9_1 = Locale:GetString("IDS_FILTER_ALL")
else
if FilterValue == CallLogWhereCondition_Incoming then
l_9_1 = Locale:GetString("IDS_FILTER_INCOMING")
else
if FilterValue == CallLogWhereCondition_Outgoing then
l_9_1 = Locale:GetString("IDS_FILTER_OUTGOING")
else
if FilterValue == CallLogWhereCondition_Missed then
l_9_1 = Locale:GetString("IDS_FILTER_MISSED")
end
end
end
end
l_9_0:SetCondition("Filter", Operator_Equals, FilterValue)
_application.Navigation.Title = CallHistoryTitle
MissedCallCount = machineStatus.MissedCalls.Value
machineStatus.MissedCalls.Value = 0
trace("Selecing Query\n")
CallLogQuery = Database:Select(l_9_0, nil)
CallLogGenerator.Collection = CallLogQuery
else
MissedCallCount = 1
CallLogGenerator.Collection = CallLogQuery
end
CallLogGenerator.SelectedIndex = -1
end
MissedCallsUpdate = function()
if machineStatus.MissedCalls.Value > 0 then
UpdateQuery()
end
end
CallLogLayout = TileLayout()
CallLogLayout:SetItemSize(480, 80, 0)
CallLogLayout.SelectionNode = CallLogSelector
CallLogList:SetLayout(CallLogLayout)
CallLogList.AllowScrollToEnd = false
if _config_os == "windowsmobile" then
CallLogGenerator = LibraryGeneratorCallLogContact(nil, CallLogList:GetMovie(), CallLogList.ComponentLibraryName, CallLogList.ComponentLibraryID)
else
CallLogGenerator = LibraryGeneratorint(nil, CallLogList:GetMovie(), CallLogList.ComponentLibraryName, CallLogList.ComponentLibraryID)
end
CallLogGenerator.RecycleItems = true
CallLogGenerator.ItemCreated:connect(HandleCallLogItemCreated)
CallLogGenerator.ItemDestroyed:connect(HandleCallLogItemDestroyed)
CallLogList:SetGenerator(CallLogGenerator)
if _config_os == "windowsmobile" then
FilterValue = CallLogWhereCondition_All
end
UpdateQuery()
ListPhysics = ScrollPhysics(CallLogList, CallLogList, HandleIndexSelection)
ListPhysics:ConnectMouseEvents()
CallLogList:Focus()
if _config_os == "windowsmobile" then
machineStatus.MissedCalls.OnValueChanged:connect(MissedCallsUpdate)
ContactDatabase_Instance().OnContactChanged:connect(UpdateQuery)
ContactDatabase_Instance().OnContactCreated:connect(UpdateQuery)
ContactDatabase_Instance().OnContactDeleted:connect(UpdateQuery)
machineStatus.IncomingCallRequest.OnValueChanged:connect(UpdateQuery)
machineStatus.OutgoingCallRequest.OnValueChanged:connect(UpdateQuery)
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -