📄 internetsetting.luac.lua
字号:
-- Decompiled using luadec 0.7 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;0,4,8;0,4,8,12,16;0,4,8,12,16;0,0,2,6,13,17;;;31;; 180b40d8_manila.luac
trace("enter InternetSetting.lua")
require("class")
require("scrollphysics")
require("theme")
require("internetpush_svc")
require("OnOffButtonControl")
InternetSettingsItemUI = class()
InternetSettingsItemUI.__init = function(l_1_0, l_1_1, l_1_2, l_1_3, l_1_4)
l_1_0._icon = l_1_1
l_1_0._text = l_1_2
l_1_0._detailtext = l_1_3
l_1_0._defaultValue = l_1_4
end
HandleListSelection = function(l_2_0)
local l_2_1 = ListGenerator:GetItem(l_2_0)
local l_2_2 = l_2_1.Namespace:FindName("OnOffButtonComponent")
l_2_1.Tag = not l_2_1.Tag
if PushInternetSettingUI == Internet_MapSettingsItemUI[l_2_0] then
_InternetSetUtil.EnablePushInternet.Value = l_2_1.Tag
else
if ConnectionUI == Internet_MapSettingsItemUI[l_2_0] then
_InternetSetUtil.UseWiFiActiveSyncOnl.Value = l_2_1.Tag
else
if RoamingSettingUI == Internet_MapSettingsItemUI[l_2_0] then
_InternetSetUtil.PushWhileRoaming.Value = l_2_1.Tag
end
end
end
OnOffButton_ToggleValue(l_2_2)
end
OnItemSelected = function(l_3_0)
local l_3_1 = l_3_0.Namespace:FindName("MainText")
local l_3_2 = l_3_0.Namespace:FindName("DetailText")
local l_3_3 = l_3_0.Namespace:FindName("OnText")
local l_3_4 = l_3_0.Namespace:FindName("OffText")
l_3_1.Color = GetMainTextSelectedColor()
l_3_2.Color = GetSubTextSelectedColor()
if l_3_3 ~= nil then
l_3_3.Color = GetOnOffTextSelectedColor()
end
if l_3_4 ~= nil then
l_3_4.Color = GetOnOffTextSelectedColor()
end
end
OnItemDeselected = function(l_4_0)
local l_4_1 = l_4_0.Namespace:FindName("MainText")
local l_4_2 = l_4_0.Namespace:FindName("DetailText")
local l_4_3 = l_4_0.Namespace:FindName("OnText")
local l_4_4 = l_4_0.Namespace:FindName("OffText")
l_4_1.Color = GetMainTextUnselectedColor()
l_4_2.Color = GetSubTextUnselectedColor()
if l_4_3 ~= nil then
l_4_3.Color = GetOnOffTextUnselectedColor()
end
if l_4_4 ~= nil then
l_4_4.Color = GetOnOffTextUnselectedColor()
end
end
HandleItemCreated = function(l_5_0, l_5_1)
local l_5_2 = Internet_MapSettingsItemUI[l_5_0]
local l_5_3 = l_5_1.Namespace:FindName("IconBox")
l_5_3:SetTextureRef(l_5_2._icon)
local l_5_4 = l_5_1.Namespace:FindName("MainText")
local l_5_5 = l_5_1.Namespace:FindName("DetailText")
l_5_4.String = l_5_2._text
l_5_5.String = l_5_2._detailtext
local l_5_6 = l_5_1.Namespace:FindName("OnOffButtonComponent")
OnOffButton_Initialize(l_5_6, l_5_2._defaultValue)
l_5_1.Tag = l_5_2._defaultValue
l_5_1.OnSelected:connect(OnItemSelected)
l_5_1.OnDeselected:connect(OnItemDeselected)
end
HandleItemDestroyed = function(l_6_0)
l_6_0.OnSelected:disconnect(OnItemSelected)
l_6_0.OnDeselected:disconnect(OnItemDeselected)
end
HandleLeftSoftkey = function()
_application.Navigation:NavigateBack()
end
InitUI = function()
_InternetSetUtil = InternetSetUtil()
PushInternetSettingUI = InternetSettingsItemUI("PushInternet", "[[IDS_PUSH_INTERNET]]", "[[IDS_ENABLEPUSHINTERNET]]", _InternetSetUtil.EnablePushInternet.Value)
ConnectionUI = InternetSettingsItemUI("Connection", "[[IDS_CONNECTION]]", "[[IDS_USEWIFIACTIVESYNCONLY]]", _InternetSetUtil.UseWiFiActiveSyncOnl.Value)
RoamingSettingUI = InternetSettingsItemUI("Roaming", "[[IDS_ROAMING]]", "[[IDS_PUSHWHILEROAMING]]", _InternetSetUtil.PushWhileRoaming.Value)
local l_8_0 = {}
Internet_MapSettingsItemUI = l_8_0
l_8_0 = 0
Internet_MapSettingsItemUI[l_8_0] = PushInternetSettingUI
l_8_0 = l_8_0 + 1
Internet_MapSettingsItemUI[l_8_0] = ConnectionUI
l_8_0 = l_8_0 + 1
Internet_MapSettingsItemUI[l_8_0] = RoamingSettingUI
ListLayout = TileLayout()
ListLayout:SetItemSize(480, 80, 0)
SettingList:SetLayout(ListLayout)
ListLayout.SelectionNode = Selector
FakeCollection = VectorNotifyint()
for i = 0, l_8_0 do
FakeCollection:push_back(i)
end
ListGenerator = LibraryGeneratorint(FakeCollection, SettingList:GetMovie(), SettingList.ComponentLibraryName, SettingList.ComponentLibraryID)
ListGenerator.RecycleItems = true
ListGenerator.ItemCreated:connect(HandleItemCreated)
ListGenerator.ItemDestroyed:connect(HandleItemDestroyed)
SettingList:SetGenerator(ListGenerator)
_ListScrollPhysics = ScrollPhysics(SettingList, SettingList, HandleListSelection)
_ListScrollPhysics:ConnectMouseEvents()
SettingList:ForceLayout()
SettingList:Focus()
end
Main = function()
trace("Main()")
InitUI()
end
Main()
_application:SetLeftSoftkey(Softkey(Locale:GetString("IDS_BACK"), HandleLeftSoftkey))
_application:SetRightSoftkey(Softkey("", nil))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -