⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calendarbehavior.luac.lua

📁 htc manila 2 sourcecode
💻 LUA
字号:
-- Decompiled using luadec 0.7 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;;;;;;;;;;0,0,0,0,8; 35f6cd5a_manila.luac 

trace("MonthViewScripts start")
require("appointment_svc")
require("machine_status_svc")
require("class")
require("transitions")
require("Calendar\\CalendarMonthViewScript")
require("Calendar\\CalendarAppointmentLoader")
appointment = nil
calendar = nil
machineStatus = nil
currentMode = 0
Calendar_ScreenRotation = nil
OnNavigateOut = function(l_1_0)
   CancelSwitchCalendar()
   CalendarControl:Destory()
   if g_objAppointmentLoader ~= nil then
      g_objAppointmentLoader:Destroy()
      g_objAppointmentLoader = nil
   end
   _request.NavigateOutTo:disconnect(OnNavigateOut)
   Transition(l_1_0, "Out")
end

OnNavigateIn = function(l_2_0)
   _request.NavigateInFrom:disconnect(OnNavigateIn)
   Transition(l_2_0, "In")
end

OnPageInit = function()
   trace("OnPageInit+++++")
   _request.PageInit:disconnect(OnPageInit)
   Transition("Arbitrary", "In")
end

OnPostPageInit = function()
   trace("OnPostPageInit+++++")
   _request.PostPageInit:disconnect(OnPostPageInit)
   machineStatus = MachineStatus()
   machineStatus.EventNotify.OnValueChanged:connect(onMachineStatus_AppointmentChanged)
   machineStatus.CurrentAppointmentStartTime.OnValueChanged:connect(onMachineStatus_AppointmentChanged)
   machineStatus.NextAppointmentStartTime.OnValueChanged:connect(onMachineStatus_AppointmentChanged)
   machineStatus.CurrentTime.OnValueChanged:connect(onDayChange)
   require("Calendar\\CalendarDayViewScript")
   require("weather_svc")
   require("Calendar\\CalendarWeather")
   ResetAppInfo(ActiveCalendar)
   initWeatherData()
   Transition("Arbitrary", "In")
end

objs3D = {}
objs3D[1] = Group3D
objs2D = {}
setOffScreen()
HandleToNewAppointments = function()
   if CalendarControl.animationObj ~= nil then
      trace("lock softKey")
      return 
   end
   appointment:CreateNewAppointment()
end

HandleToNewAppointmentsByDay = function(l_6_0, l_6_1, l_6_2)
   if CalendarControl.animationObj ~= nil then
      trace("lock softKey")
      return 
   end
   appointment:CreateNewAppointmentByDay(l_6_0, l_6_1, l_6_2)
end

HandleSwitchToMonthView = function()
   if CalendarControl.animationObj ~= nil then
      trace("lock softKey")
      return 
   end
   DisconnectDayEvent()
   ShowMonthView()
   ResetAppInfo(ActiveCalendar)
   SwitchMode(1)
   ResetAppInfo(ActiveCalendar)
end

HandleSwitchToDayView = function()
   if CalendarControl.animationObj ~= nil then
      trace("lock softKey")
      return 
   end
   DisconnectMonthEvent()
   ShowDayView()
   SwitchMode(2)
end

switchComplete = function()
   if currentMode == 1 then
      DayView.Opacity.value = 0
      ConnectMonthEvent()
   elseif currentMode == 2 then
      MonthView.Opacity.value = 0
      ConnectDayEvent()
   end
end

SwitchMode = function(l_10_0)
   if currentMode == 0 then
      currentMode = l_10_0
      switchComplete()
   elseif l_10_0 ~= currentMode then
      currentMode = l_10_0
      if currentMode == 1 then
         CalendarControl:StartAnimation(SwitchModeAnimate(false, switchComplete))
      elseif currentMode == 2 then
         MonthSelector.Opacity:Interpolate(100, 0, 3, 0, Interpolate_Linear, function()
         CalendarControl:StartAnimation(SwitchModeAnimate(true, switchComplete))
      end)
      else
         trace("switch mode error")
      end
   end
end

GetAppTimeString = function(l_11_0, l_11_1, l_11_2, l_11_3)
   trace("GetAppTimeString RANGE=" .. l_11_3 .. " type=" .. l_11_2)
   local l_11_4 = l_11_0.IsValid
   if l_11_4 then
      l_11_4 = nil
      if l_11_3 == VALID_RANGE_AllDay then
         l_11_4 = Locale:GetString("IDS_CALENDAR_ALLDAY")
      elseif l_11_3 == VALID_RANGE_Today_Today then
         l_11_4 = l_11_0:GetTimeString(TimeFormatOptions_Default) .. " - " .. l_11_1:GetTimeString(TimeFormatOptions_Default)
      elseif l_11_3 == VALID_RANGE_MultiDay_Today then
         l_11_4 = l_11_0:GetDateString(Locale:GetString("IDS_CALENDAR_DATEFORMAT")) .. " - " .. l_11_1:GetTimeString(TimeFormatOptions_Default)
      elseif l_11_3 == VALID_RANGE_Today_MultiDay then
         l_11_4 = l_11_0:GetTimeString(TimeFormatOptions_Default) .. " - " .. l_11_1:GetDateString(Locale:GetString("IDS_CALENDAR_DATEFORMAT"))
      elseif l_11_3 == VALID_RANGE_MultiDay then
         l_11_4 = Locale:GetString("IDS_CALENDAR_ALLDAY")
      else
         trace("time format error")
      end
      return l_11_4
   else
      l_11_4 = ""
      return l_11_4
   end
end

if _config_os == "windowsmobile" then
   _request.NavigateOutTo:connect(OnNavigateOut)
   _request.NavigateInFrom:connect(OnNavigateIn)
   _request.PageInit:connect(OnPageInit)
   _request.PostPageInit:connect(OnPostPageInit)
   appointment = PoomAppointments(APPOINTMENT_TAB_Calendar)
   calendar = Calendar()
   initialCalendar()
   ShowMonthView()
   SwitchMode(1)
   if _application.Store:GetStringValue(Lifetime_Permanent, "EnableLandscape") == "true" then
      trace(" EnableLandscape")
      require("Calendar\\Calendar_Landscape")
      Calendar_ScreenRotation = Calendar_ScreenRotation(Camera2D, Camera3D, DayGroup1, DayGroup2, CalendarHitArea, RightArrowHitArea, LeftArrowHitArea, DayRightArrowHitArea, DayLeftArrowHitArea, MonthSelectorGroup, MonthSelector, MonthSelectorText, LeftArrowHitArea, RightArrowHitArea, DayLeftArrowHitArea, DayRightArrowHitArea, TodayGroup, TodayBackground, TodayText, Today_App)
   end
   SetTodayMark(calendar:GetCurrentYear(), calendar:GetCurrentMonth())
end
trace("MonthView Scripts end")

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -