本文整理汇总了C#中System.Xml.XmlElement.GetOADate方法的典型用法代码示例。如果您正苦于以下问题:C# XmlElement.GetOADate方法的具体用法?C# XmlElement.GetOADate怎么用?C# XmlElement.GetOADate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.XmlElement
的用法示例。
在下文中一共展示了XmlElement.GetOADate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunningSessionInfo
internal RunningSessionInfo(XmlElement element)
{
_projectName = element.GetAttributeValue("projectname");
_moduleName = element.GetAttributeValue("moduledescription");
_loginDate = element.GetOADate("logindate").GetValueOrDefault();
_lastActionDate = element.GetOADate("lastactiondate").GetValueOrDefault();
element.TryGetGuid(out _loginGuid);
}
示例2: LoadXml
private void LoadXml(XmlElement element)
{
Link = (ILinkElement) PageElement.CreateElement(Project, element);
var start = element.GetOADate("startdate");
AppearenceStart = !start.HasValue ? DateTime.MinValue : start.Value;
var end = element.GetOADate("enddate");
AppearenceEnd = !end.HasValue ? DateTime.MaxValue : end.Value;
var dateState = element.GetIntAttributeValue("datestate").GetValueOrDefault();
IsActive = dateState == 1 || dateState == 3;
}
示例3: LoadXml
/*
private static readonly Dictionary<string, string> RQLMapping = new Dictionary<string, string>()
{
{"ext01", "Erstellungsautor"},
{"ext02", "Datum der Erstaufnahme"},
{"ext03", "Änderungsautor"},
{"ext04", "Änderungsdatum"},
{"ext05", "Höhe (Pixel)"},
{"ext06", "Breite (Pixel)"},
{"ext07", "Farbtiefe (Bit)"},
{"ext08", "Dateigröße (Byte)"},
{"ext09", "Titel"},
{"ext10", "Künstler"},
{"ext11", "Album"},
{"ext12", "Jahr"},
{"ext13", "Kommentar"},
{"ext14", "Genre"}
};*/
private void LoadXml(XmlElement xmlElement)
{
if (xmlElement == null)
{
return;
}
try
{
if (xmlElement.GetAttributeValue("ext01") != null)
{
OriginalAuthor = xmlElement.GetAttributeValue("ext01");
}
if (xmlElement.GetAttributeValue("ext02") != null)
{
EntryDate = xmlElement.GetOADate("ext02").GetValueOrDefault();
}
if (xmlElement.GetAttributeValue("ext03") != null)
{
LastEditor = xmlElement.GetAttributeValue("ext03");
}
if (xmlElement.GetAttributeValue("ext04") != null)
{
ModificationDate = xmlElement.GetOADate("ext04").GetValueOrDefault();
}
if (xmlElement.GetAttributeValue("ext05") != null)
{
Height = xmlElement.GetAttributeValue("ext05") + " Pixel";
}
if (xmlElement.GetAttributeValue("ext06") != null)
{
Width = xmlElement.GetAttributeValue("ext06") + " Pixel";
}
if (xmlElement.GetAttributeValue("ext07") != null)
{
Colordepth = xmlElement.GetAttributeValue("ext07") + " Bit";
}
if (xmlElement.GetAttributeValue("ext08") != null)
{
Filesize = xmlElement.GetAttributeValue("ext08") + " Byte";
}
if (xmlElement.GetAttributeValue("ext09") != null)
{
Title = xmlElement.GetAttributeValue("ext09");
}
if (xmlElement.GetAttributeValue("ext10") != null)
{
Artist = xmlElement.GetAttributeValue("ext10");
}
if (xmlElement.GetAttributeValue("ext11") != null)
{
Album = xmlElement.GetAttributeValue("ext11");
}
if (xmlElement.GetAttributeValue("ext12") != null)
{
Year = xmlElement.GetAttributeValue("ext12");
}
if (xmlElement.GetAttributeValue("ext13") != null)
{
Comment = xmlElement.GetAttributeValue("ext13");
}
if (xmlElement.GetAttributeValue("ext14") != null)
{
Genre = xmlElement.GetAttributeValue("ext14");
}
if (xmlElement.GetAttributeValue("ext4124") != null)
{
DocTitle = xmlElement.GetAttributeValue("ext4124");
}
//.........这里部分代码省略.........
示例4: UserInfo
public UserInfo(IProject project, XmlElement user)
{
User = new User(project.Session, user.GetGuid()) {Name = user.GetName()};
HasUserReleasedPage = user.GetIntAttributeValue("released").GetValueOrDefault() == 1;
PageReleaseDate = user.GetOADate().GetValueOrDefault();
}