예제 #1
0
 /*
 IDistribAlg m_distrib = DistribAlgs.Complex;
 public string DistribAlg
 {
     get { return m_distrib.Name; }
     set { m_distrib = DistribAlgs.FromName(value); }
 }
 */
 public override void AddToPages(LogPages pages, SongBook book)
 {
     List<PaneGrp> grps = new List<PaneGrp>();
     foreach (var row in book.GetSongs(book.Formatting.Order))
     {
         grps.Add(book.FormatSong(row));
     }
     IDistribAlg alg = DistribAlgs.FromEnum(book.Layout.DistribAlg);
     alg.Run(pages, grps, book.Layout);
 }
예제 #2
0
        public OutlineFormatOptions(float pgwi, float pghi, XGraphics infoContext, PersistentFont titleFont, PersistentFont numberFont, int columns, SongBook songBook, float mmky)
            : base(pgwi, infoContext)
        {
            ConvertFont(titleFont, out TitleFont, out TitleColor, mmky);
            ConvertFont(numberFont, out NumberFont, out NumberColor, mmky);
            PageHeight = pghi;
            Columns = columns;

            ColumnWidth = PageWidth / Columns;
            float numwi = (float)InfoContext.MeasureString("99999", NumberFont).Width;
            ColumnWidthForText = ColumnWidth - numwi;
            NumberLeft = ColumnWidthForText + numwi / 4;
            TitleHeight = (float)InfoContext.MeasureString("M", TitleFont).Height;
            NumberHeight = (float)InfoContext.MeasureString("M", NumberFont).Height;
            SongBook = songBook;
        }
예제 #3
0
 public SongBookPrinter(SongBook book, PrinterSettings settings)
 {
     m_book = book;
     m_settings = settings;
     m_lastTarget = m_book.PrintTarget;
     if (book.Layout.Orientation == PageOrientation.Landscape)
     {
         m_settings.DefaultPageSettings.Landscape = true;
     }
 }
예제 #4
0
 private void cbsongbook_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (m_changingSb > 0) return;
     m_currentBook = null;
     if (cbsongbook.SelectedIndex > 0)
     {
         if (!TabControl1.TabPages.Contains(tbsongbook)) TabControl1.TabPages.Add(tbsongbook);
     }
     else
     {
         if (TabControl1.TabPages.Contains(tbsongbook)) TabControl1.TabPages.Remove(tbsongbook);
     }
     if (SelectedSongBook != null) songBookFrame1.SongBook = SelectedSongBook;
 }
예제 #5
0
 private void newSongList_Click(object sender, EventArgs e)
 {
     string name = InputBox.Run("Zadejte prosím název nového zpìvníku", "Nový zpìvník");
     if (name != null)
     {
         SelectedDatabase.ExecuteNonQuery("insert into songlist (name) values (@name)","name",name);
         int id = SelectedDatabase.LastInsertId();
         SongBook sb = new SongBook(SelectedDatabase, id);
         SelectedSongBook = sb;
     }
 }
예제 #6
0
 public abstract void AddToPages(LogPages pages, SongBook book);
예제 #7
0
 public LogPages CreateLogPages(SongBook book)
 {
     LogPages pages = new LogPages(book.Layout.SmallPageHeight);
     foreach (SequenceItem item in m_items) item.AddToPages(pages, book);
     return pages;
 }
예제 #8
0
 public override void AddToPages(LogPages pages, SongBook book)
 {
     PaneGrp outline = book.FormatOutline();
     pages.AddPaneGrp(outline);
 }