peopleemaildialog.luac.lua

来自「htc manila 2 sourcecode」· LUA 代码 · 共 69 行

LUA
69
字号
-- Decompiled using luadec 0.4 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;0;0;0;8 11e6bab8_manila.luac 

trace("Loaded people email dialog Script\n")
require("contacts_database_svc")
DynamicData = {}
ExternalData = {}
InitialData = function()
  local pei = PeopleEngine_Instance()
  local pi = PersonInfo()
  local gpi = pei:GetPersonInfo(pi)
   if gpi == false then
      trace("get person info error")
      return 
   end
   local gai = pei:GetAccountInfo()
   ExternalData.HasThreeEmailAccounts = pi:HasThreeEmailAccounts()
   if gai == nil then
      ExternalData.AccountCount = 0
   else
      ExternalData.AccountCount = gai:GetCount()
      local acc = ExternalData.AccountCount - 1
      for i = 0, acc do
         DynamicData[i] = {}
         DynamicData[i].Title = gai:GetItem(i)
         DynamicData[i].Name = "email" .. i
      end
   end
   ExternalData.EmailCount = tonumber(_dialog.URL.Parameters:GetParameter("ECount"))
   trace("Info.EmailCount=" .. tostring(ExternalData.EmailCount))
end

IsDialogItemEnable = function(l_2_0)
   if l_2_0.Name  == "Add" then
     if ExternalData.HasThreeEmailAccounts then
       return false
     end
   elseif l_2_0.Name  ==  "Delete" then
     if ExternalData.EmailCount <= 0 then
       return false
     end
   elseif l_2_0.Name  == "SendReceive" then
     if ExternalData.AccountCount <= 0 then
       return false
     end
   end
   return true
end

IsDynamicItem = function(l_3_0)
  if l_3_0.Name == "SendReceive" then
    return true
  end
  return false  
end

GetDynamicCollection = function()
   trace("GetDynamicCollection++++++" .. ExternalData.AccountCount)
   local l_4_0 = VectorNotifyint()
   for i = 0, ExternalData.AccountCount - 1 do
      l_4_0:push_back(i)
   end
   return l_4_0
end

InitialData()
require("people\\peopleDialogBase")

⌨️ 快捷键说明

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