📄 google_search.luac.lua
字号:
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;;;;;;;0,0,0,13;0,6;;;; 60d00923_manila.luac
trace("google_search.lua begin")
require("class")
require("Internetportal\\google_search_listview_controller")
require("google_suggestion_svc")
google_search = class()
google_search.__init = function(l_1_0, l_1_1, l_1_2, l_1_3, l_1_4)
trace("[google_search] : __init")
l_1_0.inputbox = l_1_1
l_1_0.default_string = l_1_4
l_1_0.ResultList = ListGet()
l_1_0.listviewinstance = google_search_listview_controller(l_1_2, google_result_selector, l_1_0)
l_1_0.inputBox_HitArea = l_1_3
l_1_0:SetSoftKey()
l_1_0:ConnectEvent()
end
HandleLeftSoftkey = function()
_application.Navigation:NavigateBack()
end
google_search.ConnectEvent = function(l_3_0)
l_3_0.inputbox.OnTextChanged:disconnect(l_3_0.OnInputChanged, l_3_0)
l_3_0.inputbox.OnTextChanged:connect(l_3_0.OnInputChanged, l_3_0)
l_3_0:OnInputChanged()
l_3_0.inputBox_HitArea.onFocusIn:connect(l_3_0.FocusInInputBox, l_3_0)
l_3_0.inputBox_HitArea.onFocusOut:connect(l_3_0.FocusOutInputBox, l_3_0)
l_3_0.inputBox_HitArea.onPress:connect(l_3_0.InputBox_HitAreaOnPress, l_3_0)
l_3_0.inputbox.onFocusIn:connect(l_3_0.FocusInInputBox, l_3_0)
l_3_0.inputbox.onFocusOut:connect(l_3_0.FocusOutInputBox, l_3_0)
end
google_search.FocusInInputBox = function(l_4_0)
trace("[google_search] : FocusInInputBox")
l_4_0.default_string._visible = false
trace("[google_search] : FocusInInputBox")
l_4_0.inputbox:SetShowWindowFlag(true)
l_4_0.inputbox:ShowInputPanel(true)
end
google_search.FocusOutInputBox = function(l_5_0)
trace("[google_search] : FocusOutInputBox")
l_5_0.inputbox:SetShowWindowFlag(false)
l_5_0.inputbox:ShowInputPanel(false)
if l_5_0.inputbox.WindowText:len() == 0 then
l_5_0.default_string._visible = true
end
end
google_search.OnInputChanged = function(l_6_0)
trace("[google_search] : OnInputChanged")
if l_6_0.inputbox.WindowText:len() > 0 then
l_6_0.ResultList.OnComplete:disconnect(l_6_0.QueryComplete, l_6_0)
l_6_0.ResultList.OnComplete:connect(l_6_0.QueryComplete, l_6_0)
l_6_0.ResultList:Query(l_6_0.inputbox.WindowText)
else
-- Warning: missing end command somewhere! Added here
end
end
google_search.SetSoftKey = function(l_7_0)
_application:SetLeftSoftkey(Softkey(Locale:GetString("IDS_BACK"), HandleLeftSoftkey))
_application:SetRightSoftkey(Softkey("", nil))
end
google_search.Searching = function(l_8_0, l_8_1, l_8_2)
trace("[google_search] : Searching")
if l_8_1 then
l_8_0.ResultList:GoogleSearch(l_8_1, l_8_2)
return
end
local l_8_3 = l_8_0.inputbox.WindowText
if l_8_3:len() > 0 then
l_8_0.ResultList:GoogleSearch(l_8_3, -1)
else
Shell_NavigateTo("\\Windows\\OperaL.exe", "http://www.google.com/")
end
end
google_search.QueryComplete = function(l_9_0)
trace("[google_search] : QueryComplete")
local l_9_1 = l_9_0.ResultList:GetCollection()
l_9_0.listviewinstance:generate(l_9_1)
end
google_search.InputBox_HitAreaOnPress = function(l_10_0)
trace("[google_search] : InputBox_HitAreaOnPress")
l_10_0.inputbox:SetShowWindowFlag(true)
l_10_0.inputbox:ShowInputPanel(true)
l_10_0.inputBox_HitArea:Focus()
end
google_search.Clear = function(l_11_0)
trace("[google_search] : Clear")
_application.OnSipPanelChanged:disconnect(l_11_0.SipPanelStatusChanged, l_11_0)
l_11_0.inputbox:SetShowWindowFlag(false)
l_11_0.inputbox:ShowInputPanel(false)
end
_google_search = google_search(InputBox, GizmoListView, inputBox_HitArea, default_google_string)
NavigateOut_Inputbox = function()
_request.NavigateOutTo:disconnect(NavigateOut_Inputbox)
_google_search:Clear()
Cam_inputbox._visible = false
end
_request.NavigateOutTo:connect(NavigateOut_Inputbox)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -