コード例 #1
0
ファイル: ISession.cs プロジェクト: erminas/smartapi
 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
0
        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
0
ファイル: FileAttributes.cs プロジェクト: erminas/smartapi
        /*
        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");
                }

                if (xmlElement.GetAttributeValue("ext4125") != null)
                {
                    Keywords = xmlElement.GetAttributeValue("ext4125");
                }

                if (xmlElement.GetAttributeValue("ext4126") != null)
                {
                    DocAuthor = xmlElement.GetAttributeValue("ext4126");
                }

                if (xmlElement.GetAttributeValue("ext4127") != null)
                {
                    DocOriginalAuthor = xmlElement.GetAttributeValue("ext4127");
                }

                if (xmlElement.GetAttributeValue("ext4128") != null)
                {
                    DocCreatedWith = xmlElement.GetAttributeValue("ext4128");
                }

                if (xmlElement.GetAttributeValue("ext4129") != null)
                {
                    DocCreationDate = xmlElement.GetAttributeValue("ext4129");
                }

                if (xmlElement.GetAttributeValue("ext4130") != null)
                {
                    DocModificationDate = xmlElement.GetAttributeValue("ext4130");
                }

                if (xmlElement.GetAttributeValue("ext4131") != null)
                {
                    DocNumberOfPages = int.Parse(xmlElement.GetAttributeValue("ext4131"));
                }
            } catch (Exception e)
            {
                // couldn't read data
                throw new FileDataException(Folder.Project.Session.ServerLogin, "Couldn't read file data..", e);
            }
        }
コード例 #4
0
ファイル: IPageSearch.cs プロジェクト: erminas/smartapi
 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();
 }