示例#1
0
        /// <summary>
        /// 处理详细更新简要
        /// </summary>
        /// <param name="p_html">HTML文档</param>
        private BCW.Update.Model.UpdateInfo UpdateHtml(string p_html)
        {
            if (string.IsNullOrEmpty(p_html))
            {
                return(null);
            }

            BCW.Update.Model.UpdateInfo obj = new BCW.Update.Model.UpdateInfo();


            using (XmlReaderExtend reader = new XmlReaderExtend(p_html))
            {
                while (reader.ReadToFollowing("data"))
                {
                    obj.Version  = reader.GetElementValue("Version");
                    obj.ToPath   = reader.GetElementValue("ToPath");
                    obj.RePath   = reader.GetElementValue("RePath");
                    obj.Paths    = reader.GetElementValue("Paths");
                    obj.Notes    = reader.GetElementValue("Notes");
                    obj.WithTime = reader.GetElementValue("WithTime");
                    obj.AddTime  = reader.GetElementValue("AddTime");
                }
            }
            return(obj);
        }
示例#2
0
        /// <summary>
        /// 处理详细版本号
        /// </summary>
        /// <param name="p_html">HTML文档</param>
        private BCW.Update.Model.UpdateInfo VersionHtml(string p_html)
        {
            if (string.IsNullOrEmpty(p_html))
            {
                return(null);
            }

            BCW.Update.Model.UpdateInfo obj = new BCW.Update.Model.UpdateInfo();


            using (XmlReaderExtend reader = new XmlReaderExtend(p_html))
            {
                while (reader.ReadToFollowing("data"))
                {
                    obj.Version  = reader.GetElementValue("Version");
                    obj.SpDomain = reader.GetElementValue("SpDomain");
                    obj.FtpData  = reader.GetElementValue("FtpData");
                }
            }
            return(obj);
        }
示例#3
0
        /// <summary>
        /// 处理详细版本号
        /// </summary>
        /// <param name="p_html">HTML文档</param>
        private BCW.Update.Model.UpdateInfo FtpHtml(string p_html)
        {
            if (string.IsNullOrEmpty(p_html))
            {
                return(null);
            }

            BCW.Update.Model.UpdateInfo obj = new BCW.Update.Model.UpdateInfo();


            using (XmlReaderExtend reader = new XmlReaderExtend(p_html))
            {
                while (reader.ReadToFollowing("data"))
                {
                    obj.RemoteHost = reader.GetElementValue("RemoteHost");
                    obj.RemotePort = Convert.ToInt32(reader.GetElementValue("RemotePort"));
                    obj.RemoteUser = reader.GetElementValue("RemoteUser");
                    obj.RemotePass = reader.GetElementValue("RemotePass");
                    obj.RemotePath = reader.GetElementValue("RemotePath");
                }
            }
            return(obj);
        }