Ejemplo n.º 1
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public virtual void delete()
 {
     if (!m_isDeleted)
     {
         if (m_event != null)
         {
             m_event.delete();
             m_event = null;
         }
         if (m_script != null)
         {
             m_script.delete();
             m_script = null;
         }
         m_controls.clear();
         m_styles.clear();
         m_isDeleted = true;
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 调用方法
        /// </summary>
        /// <param name="sender">调用者</param>
        /// <param name="eventID">事件ID</param>
        public virtual String callFunction(object sender, int eventID)
        {
            FCView control = sender as FCView;

            if (m_events.containsKey(control))
            {
                FCEventInfo eventInfo = m_events.get(control);
                String      function  = eventInfo.getFunction(eventID);
                if (function != null && function.Length > 0)
                {
                    FCUIScript script = m_xml.Script;
                    if (script != null)
                    {
                        m_sender = control.Name;
                        String result = script.callFunction(function);
                        m_sender = "";
                        return(result);
                    }
                }
            }
            return(null);
        }