コード例 #1
0
ファイル: HisSettingDoc.cs プロジェクト: fangxunqing/mars
        /// <summary>
        ///
        /// </summary>
        /// <param name="doc"></param>
        /// <returns></returns>
        public static XElement SaveToXML(this HisSettingDoc doc)
        {
            XElement xe = new XElement("HisSetting");

            xe.SetAttributeValue("FileDataDuration", doc.FileDataDuration);
            xe.SetAttributeValue("DataBlockDuration", doc.DataBlockDuration);
            return(xe);
        }
コード例 #2
0
ファイル: HisSettingDoc.cs プロジェクト: fangxunqing/mars
        /// <summary>
        ///
        /// </summary>
        /// <param name="element"></param>
        /// <returns></returns>
        public static HisSettingDoc LoadHisSettingDocFromXML(this XElement element)
        {
            HisSettingDoc re = new HisSettingDoc();

            if (element.Attribute("FileDataDuration") != null)
            {
                re.FileDataDuration = int.Parse(element.Attribute("FileDataDuration").Value);
            }

            if (element.Attribute("DataBlockDuration") != null)
            {
                re.DataBlockDuration = int.Parse(element.Attribute("DataBlockDuration").Value);
            }

            return(re);
        }
コード例 #3
0
ファイル: HisSettingDoc.cs プロジェクト: cdy816/mars
        /// <summary>
        ///
        /// </summary>
        /// <param name="doc"></param>
        /// <returns></returns>
        public static XElement SaveToXML(this HisSettingDoc doc)
        {
            XElement xe = new XElement("HisSetting");

            xe.SetAttributeValue("FileDataDuration", doc.FileDataDuration);
            xe.SetAttributeValue("DataBlockDuration", doc.DataBlockDuration);

            if (!string.IsNullOrEmpty(doc.HisDataPathPrimary))
            {
                xe.SetAttributeValue("HisDataPathPrimary", doc.HisDataPathPrimary);
            }

            if (!string.IsNullOrEmpty(doc.HisDataPathBack))
            {
                xe.SetAttributeValue("HisDataPathBack", doc.HisDataPathBack);
            }
            xe.SetAttributeValue("HisDataKeepTimeInPrimaryPath", doc.HisDataKeepTimeInPrimaryPath);

            xe.SetAttributeValue("KeepNoZipFileDays", doc.KeepNoZipFileDays);

            return(xe);
        }
コード例 #4
0
ファイル: HisSettingDoc.cs プロジェクト: cdy816/mars
        /// <summary>
        ///
        /// </summary>
        /// <param name="element"></param>
        /// <returns></returns>
        public static HisSettingDoc LoadHisSettingDocFromXML(this XElement element)
        {
            HisSettingDoc re = new HisSettingDoc();

            if (element.Attribute("FileDataDuration") != null)
            {
                re.FileDataDuration = int.Parse(element.Attribute("FileDataDuration").Value);
            }

            if (element.Attribute("DataBlockDuration") != null)
            {
                re.DataBlockDuration = int.Parse(element.Attribute("DataBlockDuration").Value);
            }

            if (element.Attribute("HisDataPathPrimary") != null)
            {
                re.HisDataPathPrimary = element.Attribute("HisDataPathPrimary").Value;
            }

            if (element.Attribute("HisDataPathBack") != null)
            {
                re.HisDataPathBack = element.Attribute("HisDataPathBack").Value;
            }

            if (element.Attribute("HisDataKeepTimeInPrimaryPath") != null)
            {
                re.HisDataKeepTimeInPrimaryPath = int.Parse(element.Attribute("HisDataKeepTimeInPrimaryPath").Value);
            }


            if (element.Attribute("KeepNoZipFileDays") != null)
            {
                re.KeepNoZipFileDays = int.Parse(element.Attribute("KeepNoZipFileDays").Value);
            }

            return(re);
        }
コード例 #5
0
ファイル: HisDatabase.cs プロジェクト: fangxunqing/mars
 /// <summary>
 ///
 /// </summary>
 public HisDatabase()
 {
     Setting = new HisSettingDoc();
 }