コード例 #1
0
ファイル: ImageRec.cs プロジェクト: jeason0813/wallswitch
 public void Save(XmlWriter xml)
 {
     xml.WriteAttributeString("Type", _type.ToString());
     if (_pubDate.HasValue)
     {
         xml.WriteAttributeString("PubDate", _pubDate.Value.ToString("s"));
     }
     xml.WriteString(_location);
 }
コード例 #2
0
        private FlatResultImageInfo getImageInfoFlat()
        {
            var flatResult = new FlatResultImageInfo();

            flatResult.Image_Location = ImageLocation;
            flatResult.Image_From     = ImageLocationType.ToString();

            if (ImageLocationType == CVClientCommon.LocationType.Local)
            {
                var fileInfo = new FileInfo(ImageLocation);
                flatResult.Image_BaseName = fileInfo.Name;
            }
            else if (ImageLocationType == CVClientCommon.LocationType.Uri)
            {
                Uri fileUri = new Uri(ImageLocation);
                flatResult.Image_BaseName = fileUri.Segments.Last();
            }

            return(flatResult);
        }