private void initializeFonts() { titleFormatter = displaySettings.TitleFormat; unSelectedOrderFormattor = displaySettings.Order1Format; selectedOrderFormattor = displaySettings.Order2Format; headingFormattor = displaySettings.HeadingsFormat; lyricsFormattor = displaySettings.LyricsFormat; chordsFormattor = displaySettings.ChordFormat; notesFormattor = displaySettings.NoteFormat; //fix bottom margin ensuring space for the please turn over text virtualBottomPageMargin = (int)(displaySettings.bottomPageMargin + 2 * (displaySettings.LyricsFormat.FontSize + displaySettings.contentLineSpacing)); }
private void setSettingsToFlowLayout(SongElementFormat songElement, Panel flowLayout) { //var ddlFont = (ComboBox)flowLayout.Controls[1]; //var sizeBox = (TextBox)flowLayout.Controls[2]; //var colorPickerBox = (PictureBox)flowLayout.Controls[3]; //var style = (ComboBox)flowLayout.Controls[4]; //ddlFont.DataSource = new string[] { "Helvetica", "Courier New" }; //style.DataSource = new string[] { "Regular", "Bold", "Italic" }; //sizeBox.Text = songElement.FontSize.ToString(); //colorPickerBox.BackColor = songElement.FontColor; //ddlFont.Text = songElement.FontName; //style.Text = songElement.FontStyle.ToString(); ////add event for changing color //colorPickerBox.Click += new System.EventHandler(this.ColorPicker_Click); }
public static Font GetFont(SongElementFormat elementFormat) { return(new Font(elementFormat.FontName, elementFormat.FontSize)); }