Exemplo n.º 1
0
        public void Initialize(IHeaderItem header, VesselGroup group, bool startOn)
        {
            if (header == null || group == null)
            {
                return;
            }

            _parent = group;

            _headerInterface = header;

            if (m_NameText != null)
            {
                m_NameText.OnTextUpdate.Invoke(header.HeaderName);
            }

            if (m_InfoText != null)
            {
                m_InfoText.OnTextUpdate.Invoke(header.HeaderInfo);
            }

            AssignHeaderObject(header.HeaderImage);

            if (m_HeaderToggle != null)
            {
                m_HeaderToggle.isOn = startOn;
            }

            _loaded = true;
        }
Exemplo n.º 2
0
 public DownLoadResult(string text, string fileName, IHeaderItem contentType = null)
 {
     mData     = Encoding.UTF8.GetBytes(text);
     mFileName = System.Web.HttpUtility.UrlEncode(fileName);
     if (contentType != null)
     {
         mContentType = contentType;
     }
 }
Exemplo n.º 3
0
 public DownLoadResult(byte[] data, string fileName, IHeaderItem contentType = null)
 {
     mData     = data;
     mFileName = System.Web.HttpUtility.UrlEncode(fileName);
     if (contentType != null)
     {
         mContentType = contentType;
     }
 }
Exemplo n.º 4
0
        private void AddHeader(IHeaderItem header)
        {
            if (m_HeaderTransform == null || m_HeaderPrefab == null || header == null)
            {
                return;
            }

            _header = Instantiate(m_HeaderPrefab);
            _header.transform.SetParent(m_HeaderTransform, false);
            _header.Initialize(header, this, _groupInterface.StartOn);
        }