예제 #1
0
파일: Book.cs 프로젝트: Ceasius/University
 private void getPublishedChapters()
 {
     try
     {
         String SQL = String.Format("SELECT * FROM BookChapter WHERE OutputID = '{0}'", outputID);
         DSL.Matrix matrix = RISReader.ReadTable(SQL);
         for (int x = 0; x < matrix.NumberOfRows; x++)
         {
             Chapter cur = new Chapter(matrix.GetNextRow(), this);
             Chapters.Add(cur);
         }
     }
     catch (Exception e)
     {
     }
 }
예제 #2
0
        private void btnROChAdd_Click(object sender, RoutedEventArgs e)
        {
            int selchapter = lsbROChChapters.Items.Count;
            Chapter cur = new Chapter("New Chapter"+(selchapter +1 ).ToString(), new RichTextBox(), (Book)curDoc, curUser);
            ((Book)curDoc).AddChapter(cur);


            grbROChapter.DataContext = cur;
            lsbROChChapters.DataContext = null;
            lsbROChChapters.DataContext = curDoc;
        }
예제 #3
0
파일: Book.cs 프로젝트: Ceasius/University
 public void AddChapter(Chapter chapter)
 {
     Chapters.Add(chapter);
     UpdateChapterNames();
 }