protected void PopulateFieldList(Gtk.ComboBox ctrl, PrintFieldType fieldType = PrintFieldType.None) { ctrl.AppendText("None"); ctrl.AppendText("Title"); ctrl.AppendText("Page #"); ctrl.AppendText("Page # of #"); ctrl.AppendText("Artist"); ctrl.AppendText("Copyright"); ctrl.AppendText("CCLI"); ctrl.Active = (int)fieldType; }
public HeaderFooterNode(bool isHeader , double pageWidth , FontInfo font , PrintLineType lineType , PrintFieldType leftField , PrintFieldType centerField , PrintFieldType rightField , SongData song) { _isHeader = isHeader; _song = song; _pageWidth = pageWidth; _fields[0] = GetTextNode(leftField, font); _fields[1] = GetTextNode(centerField, font); _fields[2] = GetTextNode(rightField, font); if (lineType != PrintLineType.None) { _lineNode = new LineNode(_pageWidth, 0, 0, lineType); } }
private TextNode GetTextNode(PrintFieldType fieldType, FontInfo font) { TextNode node = null; string text = string.Empty; switch (fieldType) { case PrintFieldType.Title: text = _song.Title; break; case PrintFieldType.Artist: text = _song.Artist; break; case PrintFieldType.CCLI: text = _song.CCLI; break; case PrintFieldType.Copyright: text = _song.Copyright; break; case PrintFieldType.PageNum: text = "#PageNum"; break; case PrintFieldType.PageNumOfTotal: text = "#PageNum of #PageTotal"; break; } node = new TextNode(text, font); return(node); }