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

📄 7.lua

📁 htc manila 2 sourcecode
💻 LUA
字号:
-- Decompiled using luadec 1.0 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l2 93-163,95-163,105-163;;16,37;;12;;;7,11,15;;;8,31;;;;;; 710a1147_manila_C9B2.luac 

require("theme")
trace("[MG] Purchased Page\n")
if _config_os == "windowsmobile" then
   require("audio_manager_svc")
   gPlayer = MusicPlayer_Instance()
   gData = nil
end
gListView_Height = 80
gScreenWidth = 480
gScreenHeight = 800
OnConfirmationDialogReturned = function(l_1_0)
   l_1_0.OnExit:disconnect(OnConfirmationDialogReturned)
   listview:Focus()
   if l_1_0.Result.ExitType == DialogExitType_Cancel then
      return 
   else
      MusicHelper_DeleteFile(gData.FilePath)
      GotoUpLayer()
   end
end

EnterList = function(l_2_0)
   if l_2_0 == 0 then
     if gData ~= nil then
      gPlayer:ShowDRMInfo(gData.FilePath)
    end
  elseif l_2_0 == 1 then
         local l_2_1 = URL("Manila://Confirmation.dialog")
         l_2_1.Parameters:AddParameter("Title", Locale:GetString("IDS_MUSIC_DELETE_TITLE"))
         l_2_1.Parameters:AddParameter("ContentString", Locale:GetString("IDS_MUSIC_DELETE_CONTENT"))
         local l_2_2 = _application.DialogManager:GetDialog(l_2_1)
         l_2_2.OnExit:connect(OnConfirmationDialogReturned)
         l_2_2:Show()
      end
end

HandleItemSelection = function(l_3_0)
   EnterList(l_3_0)
end

HandleKeyForItem = function(l_4_0, l_4_1, l_4_2)
   if l_4_1.Code == KeyCode_Return or l_4_1.Code == KeyCode_Space then
      local l_4_3 = ItemListGenerator:GetIndexForItem(l_4_0)
      EnterList(l_4_3)
      l_4_2.value = true
   end
end

HandleSelectionForItem = function(l_5_0)
   l_5_0.Namespace:FindName("title").Color = GetMainTextSelectedColor()
end

HandleDeselectionForItem = function(l_6_0)
   l_6_0.Namespace:FindName("title").Color = GetMainTextUnselectedColor()
end

HandleItemCreated = function(l_7_0, l_7_1)
   if _config_os == "windowsmobile" then
      local l_7_2 = l_7_1.Namespace:FindName("title")
      local l_7_3 = l_7_1.Namespace:FindName("itemicon")
      local l_7_4 = l_7_1.Namespace:FindName("seperator")
      l_7_2.Color = GetMainTextUnselectedColor()
      l_7_4.TextureCoords:set(0, 0, gScreenWidth / 2, 1)
      l_7_4.Size.width = gScreenWidth
      l_7_2.Size.width = gScreenWidth - 124
      if l_7_0 == 0 then
         l_7_3:SetTextureRef("music_purchase_info")
         l_7_2.String = Locale:GetString("[[IDS_MUSIC_INFORMATION]]")
      elseif l_7_0 == 1 then
         l_7_3:SetTextureRef("music_purchase_delete")
         l_7_2.String = Locale:GetString("[[IDS_MUSIC_DELETE]]")
      end
      l_7_1.Focusable = true
      l_7_1.onKeyDown:connect(HandleKeyForItem)
      l_7_1.OnSelected:connect(HandleSelectionForItem)
      l_7_1.OnDeselected:connect(HandleDeselectionForItem)
   end
end

HandleItemDestroyed = function(l_8_0)
   l_8_0.onKeyDown:disconnect(HandleKeyForItem)
   l_8_0.OnSelected:disconnect(HandleSelectionForItem)
   l_8_0.OnDeselected:disconnect(HandleDeselectionForItem)
end

OnMessageStrDialogExit = function(l_9_0)
   gPlayer.onMessageStr:connect(OnMessageStr)
end

OnMessageStr = function(l_10_0)
   gPlayer.onMessageStr:disconnect(OnMessageStr)
   local l_10_1 = URL("Manila://Confirmation.dialog")
   l_10_1.Parameters:AddParameter("Title", Locale:GetString("IDS_MUSIC_INFORMATION"))
   l_10_1.Parameters:AddParameter("ContentString", l_10_0)
   l_10_1.Parameters:AddParameter("Type", "OK")
   local l_10_2 = _application.DialogManager:GetDialog(l_10_1)
   l_10_2.OnExit:connect(OnMessageStrDialogExit)
   l_10_2:Show()
end

GotoUpLayer = function()
   _application.Navigation:NavigateBack()
end

NULLFunction = function()
end

LSKFunction = function()
   GotoUpLayer()
end

OnNavigateOutTo = function(l_14_0)
   ListPhysics:DisconnectMouseEvents()
   gPlayer.onMessageStr:disconnect(OnMessageStr)
   _request.NavigateOutTo:disconnect(OnNavigateOutTo)
   Transition(l_14_0, "Out")
end

OnNavigateInFrom = function(l_15_0)
   _request.NavigateInFrom:disconnect(OnNavigateInFrom)
   Transition(l_15_0, "In")
end

ItemListLayout = TileLayout()
ItemListLayout:SetItemSize(480, gListView_Height, 0)
ItemListLayout.SelectionNode = Selector
listview:SetLayout(ItemListLayout)
if _config_os == "windowsmobile" then
   _request.NavigateOutTo:connect(OnNavigateOutTo)
   _request.NavigateInFrom:connect(OnNavigateInFrom)
   gPlayer.onMessageStr:connect(OnMessageStr)
   local l_0_0 = _request.URL.Parameters:GetParameter("PurchaseFilePath")
   local l_0_1 = MusicWhereConditions()
   l_0_1:AddCondition(l_0_0)
   local l_0_2 = gPlayer:Database():GetList(VID_SONG_OF_FILEPATH, l_0_1)
   if l_0_2 ~= nil and l_0_2:GetCount() > 0 then
      gData = l_0_2:GetItem(0)
   end
   if gData ~= nil then
      _application.Navigation.Title = gData.Title
   end
   _application:SetLeftSoftkey(Softkey(Locale:GetString("IDS_MUSIC_UP"), LSKFunction))
   _application:SetRightSoftkey(Softkey("", NULLFunction))
   FakeCollection = VectorNotifyint()
   for i = 0, 1 do
      FakeCollection:push_back(i)
   end
   ItemListGenerator = LibraryGeneratorint(FakeCollection, listview:GetMovie(), listview.ComponentLibraryName, listview.ComponentLibraryID)
end
ItemListGenerator.RecycleItems = true
ItemListGenerator.ItemCreated:connect(HandleItemCreated)
ItemListGenerator.ItemDestroyed:connect(HandleItemDestroyed)
listview:SetGenerator(ItemListGenerator)
listview:Focus()
ListPhysics = ScrollPhysics(listview, listview, HandleItemSelection)
ListPhysics:ConnectMouseEvents()
if _application.Store:GetStringValue(Lifetime_Permanent, "EnableLandscape") == "true" then
   trace("[MG] : EnableLandscape")
   require("Audio\\Music_Purchased_Landscape")
   _MusicPurchased_ScreenRotation = MusicPurchased_ScreenRotation()
end

⌨️ 快捷键说明

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