當前位置: 首頁>>代碼示例>>C#>>正文


C# XmlElement.GetOADate方法代碼示例

本文整理匯總了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);
 }
開發者ID:erminas,項目名稱:smartapi,代碼行數:8,代碼來源:ISession.cs

示例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;
        }
開發者ID:erminas,項目名稱:smartapi,代碼行數:13,代碼來源:ILinkingAndAppearance.cs

示例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");
                }
//.........這裏部分代碼省略.........
開發者ID:erminas,項目名稱:smartapi,代碼行數:101,代碼來源:FileAttributes.cs

示例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();
 }
開發者ID:erminas,項目名稱:smartapi,代碼行數:6,代碼來源:IPageSearch.cs


注:本文中的System.Xml.XmlElement.GetOADate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。