Example #1
0
 public void Add(Article article)
 {
     if (!list.Keys.Contains(article.Title))
     {
         list.Add(article.Title, article);
     }
 }
 private void saveButton_Click(object sender, RoutedEventArgs e)
 {
     Article art = new Article();
     art.Title = titleTextBox.Text.Trim();
     art.Author = authorTextBox.Text.Trim();
     art.Time = timeTextBox.Text.Trim();
     art.Tag = tagTextBox.Text.Trim();
     art.Content = articleTextBox.Text.Trim();
     list.Add(art);
     listTextBlock.Text = list.GetListTitle();
 }