private void buttonTest_GetContent(object sender, RoutedEventArgs e) { History = GetHistory(); ContentType type = (ContentType)cmbContentTypes.SelectedIndex; if (type == ContentType.UNSPECIFIED) { MessageBox.Show("타입을 선택하세요", "", MessageBoxButton.OK, MessageBoxImage.Error); return; } string id = textKidsNoteId.Text.Trim(); string password = kidsNotePassword.Password.Trim(); if (id == "" || password == "") { MessageBox.Show("키즈 노트 계정을 입력하세요", "", MessageBoxButton.OK, MessageBoxImage.Error); return; } if (Conf.KidsNoteId != id) { Conf.KidsNoteId = id; } if (Conf.KidsNotePassword != password) { Conf.KidsNotePassword = password; } KidsNoteContentDownloadResult result = Client.DownloadContent(type, History.GetLastContentId(type)); LinkedList <KidsNoteContent> content = result.ContentList; if (content == null || content.Count == 0) { MessageBox.Show("게시물이 없거나 가져오지 못했습니다"); return; } foreach (var each in content) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("[{0}] {1} by {2}", each.Type, each.Title, each.Writer); listContents.Items.Add(sb.ToString()); } }