/* 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); }
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; }
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; } }
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; }
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; } }
public abstract void AddToPages(LogPages pages, SongBook book);
public LogPages CreateLogPages(SongBook book) { LogPages pages = new LogPages(book.Layout.SmallPageHeight); foreach (SequenceItem item in m_items) item.AddToPages(pages, book); return pages; }
public override void AddToPages(LogPages pages, SongBook book) { PaneGrp outline = book.FormatOutline(); pages.AddPaneGrp(outline); }