📄 weatherdetail.luac.lua
字号:
-- Decompiled using luadec 0.7 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;;;;;; 6be2e4bd_manila.luac
require("weathericon")
require("weather")
require("weather_svc")
require("playcontrol")
require("machine_status_svc")
trace("detail got here11")
require("transitions")
TransitionDelayTime = 60
trace("detail got here12")
OnNavigateIn = function(l_1_0)
_request.NavigateInFrom:disconnect(OnNavigateIn)
Transition(l_1_0, "In")
end
trace("detail got here13")
OnNavigateOut = function(l_2_0)
if initialTimer ~= nil then
initialTimer:Stop()
end
Transition(l_2_0, "Out")
_request.NavigateOutTo:disconnect(OnNavigateOut)
end
if _config_os == "windowsmobile" then
_request.NavigateOutTo:connect(OnNavigateOut)
_request.NavigateInFrom:connect(OnNavigateIn)
end
trace("detail got here14")
objs3D = {}
objs3D[1] = DetailView
setOffScreen()
trace("detail got here15")
OnInitialTimerElapsed = function(l_3_0)
l_3_0:Stop()
_application.Navigation:NavigateBack()
end
OnBeginGetForecastCompletion = function()
trace("detail got here2")
initialTimer:Stop()
local city = weather:GetForecast(city)
machineStatus = MachineStatus()
forecastMinutes = Time_GetMinutesBetweenTheseTwoTimes(city.lastUpdate, machineStatus.CurrentTime.Value) - 1
minutetimer = timer(60)
minutetimer.OnElapsed:connect(onTimePulse)
onTimePulse()
trace("detail got here3")
for i = 1, 5 do
local l_4_5 = city.forecast[i - 1]
if i == 1 then
Day1DayOfWeek.String = "[[IDS_" .. string.upper(tostring(l_4_5.dayOfWeek)) .. "]]"
SetWeatherIconStateNoFade(Day1ConditionIcon, l_4_5.condition)
if _celsius == true then
Day1HighTemperature.String = tostring(l_4_5.highC .. "?")
Day1LowTemperature.String = tostring("/ " .. l_4_5.lowC .. "?")
else
Day1HighTemperature.String = tostring(l_4_5.highF .. "?")
Day1LowTemperature.String = tostring("/ " .. l_4_5.lowF .. "?")
end
elseif i == 2 then
Day2DayOfWeek.String = "[[IDS_" .. string.upper(tostring(l_4_5.dayOfWeek)) .. "]]"
SetWeatherIconStateNoFade(Day2ConditionIcon, l_4_5.condition)
if _celsius == true then
Day2HighTemperature.String = tostring(l_4_5.highC .. "?")
Day2LowTemperature.String = tostring("/ " .. l_4_5.lowC .. "?")
else
Day2HighTemperature.String = tostring(l_4_5.highF .. "?")
Day2LowTemperature.String = tostring("/ " .. l_4_5.lowF .. "?")
end
elseif i == 3 then
Day3DayOfWeek.String = "[[IDS_" .. string.upper(tostring(l_4_5.dayOfWeek)) .. "]]"
SetWeatherIconStateNoFade(Day3ConditionIcon, l_4_5.condition)
if _celsius == true then
Day3HighTemperature.String = tostring(l_4_5.highC .. "?")
Day3LowTemperature.String = tostring("/ " .. l_4_5.lowC .. "?")
else
Day3HighTemperature.String = tostring(l_4_5.highF .. "?")
Day3LowTemperature.String = tostring("/ " .. l_4_5.lowF .. "?")
end
elseif i == 4 then
Day4DayOfWeek.String = "[[IDS_" .. string.upper(tostring(l_4_5.dayOfWeek)) .. "]]"
SetWeatherIconStateNoFade(Day4ConditionIcon, l_4_5.condition)
if _celsius == true then
Day4HighTemperature.String = tostring(l_4_5.highC .. "?")
Day4LowTemperature.String = tostring("/ " .. l_4_5.lowC .. "?")
else
Day4HighTemperature.String = tostring(l_4_5.highF .. "?")
Day4LowTemperature.String = tostring("/ " .. l_4_5.lowF .. "?")
end
elseif i == 5 then
Day5DayOfWeek.String = "[[IDS_" .. string.upper(tostring(l_4_5.dayOfWeek)) .. "]]"
SetWeatherIconStateNoFade(Day5ConditionIcon, l_4_5.condition)
if _celsius == true then
Day5HighTemperature.String = tostring(l_4_5.highC .. "?")
Day5LowTemperature.String = tostring("/ " .. l_4_5.lowC .. "?")
else
Day5HighTemperature.String = tostring(l_4_5.highF .. "?")
Day5LowTemperature.String = tostring("/ " .. l_4_5.lowF .. "?")
end
end
end
end
trace("detail got here")
InitializeWeatherIcon(Day1ConditionIcon, true)
InitializeWeatherIcon(Day2ConditionIcon, true)
InitializeWeatherIcon(Day3ConditionIcon, true)
InitializeWeatherIcon(Day4ConditionIcon, true)
InitializeWeatherIcon(Day5ConditionIcon, true)
StopAll(DetailComponent)
cityCode = _request.URL.Parameters:GetParameter("CityCode")
weather = AccuWeather(_application:GetScopedLog("weather"), _application.Store)
city = weather:GetCityFromCode(cityCode)
initialTimer = timer(30)
initialTimer.OnElapsed:connect(OnInitialTimerElapsed)
weather:BeginGetForecast(city, false, OnBeginGetForecastCompletion)
_application.Navigation.Title = GetDisplayName(city)
_application:SetLeftSoftkey(Softkey(Locale:GetString("IDS_GIZMOVIEW"), function()
_application.Navigation:NavigateBack()
end
))
_application:SetRightSoftkey(Softkey(Locale:GetString("IDS_WEATHER_MORE"), function()
Shell_NavigateTo(ShellLocation_Opera, "http://wap.accuweather.com/?p=wapc3&ad=htcwx")
end
))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -