예제 #1
0
파일: EnvyBook.cs 프로젝트: sahwar/Envy
		private string GetAuthor(AuthorType author) {
			string[] names = new string[3];

			for (int i = 0; i < author.ItemsElementName.Length; i++) {
				// Should we check the lang field ?
				if (author.ItemsElementName[i] == AuthorDataChoice.firstname) {
					names[0] = (string)((TextFieldType)author.Items[i]).Value;
				} else if (author.ItemsElementName[i] == AuthorDataChoice.middlename) {
					names[1] = (string)((TextFieldType)author.Items[i]).Value;
				} else if (author.ItemsElementName[i] == AuthorDataChoice.lastname) {
					names[2] = (string)((TextFieldType)author.Items[i]).Value;
				}
			}

			return String.Join(" ", names).Replace("  ", " ");
		}
예제 #2
0
        private string GetAuthor(AuthorType author)
        {
            string[] names = new string[3];

            for (int i = 0; i < author.ItemsElementName.Length; i++) {
                // Should we check the lang field ?
                if (author.ItemsElementName[i] == AuthorDataChoice.firstname) {
                    names[0] = (string)((TextFieldType)author.Items[i]).Value;
                } else if (author.ItemsElementName[i] == AuthorDataChoice.middlename) {
                    names[1] = (string)((TextFieldType)author.Items[i]).Value;
                } else if (author.ItemsElementName[i] == AuthorDataChoice.lastname) {
                    names[2] = (string)((TextFieldType)author.Items[i]).Value;
                }
            }

            return String.Join(" ", names).Replace("  ", " ");
        }