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

📄 28.lua

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

trace("Loaded Ringtone Script\n")
LVPositionX = 0
LVPositionY = 0
LVWidth = 480
LVHeight = 636
ItemSizeWidth = 480
ItemSizeHeight = 81
Ringtones_CurrentSelected = 0
if _config_os == "windowsmobile" then
   require("machine_status_svc")
   Ringtones_RingToneManager = RingToneManager()
end
Ringtones_SelectedCallback = function(l_1_0)
   trace("Playing Ringtone\n")
   Ringtones_CurrentSelected = l_1_0
   if _config_os == "windowsmobile" then
      if bFromContactCard == 1 then
         if (l_1_0.FilePath == "\\Windows\\Rings\\Alarm-Beeps.wav") == true then
            SelectedFilePath = ""
            SelectedName = ""
            trace("[Setting] - Ringtones_SelectedCallback : Data.FilePath = " .. l_1_0.FilePath)
         else
            SelectedFilePath = l_1_0.FilePath
            SelectedName = l_1_0.DisplayName
            Ringtones_RingToneManager:StopPlayingRingtone()
            Ringtones_RingToneManager:PlayRingtone(l_1_0)
            trace("[Setting] - Ringtones_SelectedCallback : SelectedFilePath = " .. SelectedFilePath)
         end
      else
         SelectedFilePath = l_1_0.FilePath
         trace("[Setting] - Ringtones_SelectedCallback1 : SelectedFilePath = " .. SelectedFilePath)
         Ringtones_RingToneManager:PlayRingtone(l_1_0)
      end
   end
end

Ringtones_DoneSoftkeyCallback = function()
   if bFromContactCard == 1 then
      Shell_SendRingToneDataToContactCard(true, SelectedName, SelectedFilePath)
      Ringtones_RingToneManager:StopPlayingRingtone()
   else
      Ringtones_RingToneManager.CurrentRingtone = Ringtones_CurrentSelected
      Ringtones_RingToneManager:StopPlayingRingtone()
   end
   _application.Navigation:NavigateBack()
end

Ringtones_CancelSoftkeyCallback = function()
   if bFromContactCard == 1 then
      SelectedName = ""
      strRingTonePath = ""
      Shell_SendRingToneDataToContactCard(false, SelectedName, strRingTonePath)
      Ringtones_RingToneManager:StopPlayingRingtone()
   else
      Ringtones_RingToneManager:StopPlayingRingtone()
   end
   _application.Navigation:NavigateBack()
end

CheckRingTone = function(l_4_0, l_4_1)
   trace("[Setting] - CheckRingTone recevied path = " .. l_4_1)
   local l_4_2 = l_4_0:GetCount()
   for i = 0, l_4_2 - 1 do
      local item = l_4_0:GetItem(i)
      if item.FilePath == l_4_1 then
         trace("[Setting] - CheckRingTone find path = " .. item.FilePath)
         return item
      end
   end
   local item = l_4_0:GetItem(0)
   trace("[Setting] - CheckRingTone..can't find path. Using ringtone path")
   return item
end

CreateRingtoneDialog = function()
   if _config_os == "windowsmobile" then
      bFromContactCard = _application.Store:GetIntValue(Lifetime_Application, "People.RingtonePicker.FromContactCard")
      trace("[Setting] - People.RingtonePicker.FromContactCard = " .. tostring(bFromContactCard))
      Ringtone_Collection = Ringtones_RingToneManager:GetAllRingtones()
      Ringtones_CurrentSelected = Ringtones_RingToneManager.CurrentRingtone
      if bFromContactCard == 1 then
         strRingTonePath = _application.Store:GetStringValue(Lifetime_Application, "People.RingtonePicker.OriginalRingTone")
         _application.Store:SetIntValue(Lifetime_Application, "People.RingtonePicker.FromContactCard", 0)
         trace("Setting] - CreateRingtoneDialog.. bFromContactCard  = " .. bFromContactCard)
         local str = CheckRingTone(Ringtone_Collection, strRingTonePath)
         if str ~= "" then
            Ringtones_CurrentSelected = str
         else
            Ringtones_CurrentSelected = ""
         end
         trace("[Setting] - People.RingtonePicker.OriginalRingTone = " .. tostring(strRingTonePath))
       end         
   else
      Ringtone_Collection = VectorNotifyint()
      for i = 0, 5 do
         Ringtone_Collection:push_back(i)
      end
      Ringtones_CurrentSelected = 2
      Ringtone_Contents = {[0] = "Arial", [1] = "Dopplo", [2] = "Flamenco Fire", [3] = "Gritty Beat", [4] = "Kinetic", [5] = "Locket"}
   end
   RadioList_Initialize("[[IDS_RINGTONES]]", Ringtone_Collection, Ringtones_CurrentSelected, Ringtones_SelectedCallback, Ringtone_Contents)
   if _config_os == "windowsmobile" then
      _application:SetLeftSoftkey(Softkey(Locale:GetString("IDS_DONE"), Ringtones_DoneSoftkeyCallback))
      _application:SetRightSoftkey(Softkey(Locale:GetString("IDS_CANCEL"), Ringtones_CancelSoftkeyCallback))
   end
end

if _application.Store:GetStringValue(Lifetime_Permanent, "EnableLandscape") == "true" then
   trace("[SoundSettings] : EnableLandscape")
   require("Settings\\SettingsPage_Landscape")
   _RadioPage_ScreenRotation = SettingsPage_ScreenRotation(RadioListView, Camera_2D, Camera_3D, Mask)
end
CreateRingtoneDialog()

⌨️ 快捷键说明

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