public UserInterfacePreferences() { var userInterfaceSettings = Entities.UserInterfaceSettings.Instance; lyricsColorPicker = new FontAndColorPicker("Lyrics", FontAndColorPicker.FontAndColorPickerType.Font, true); notesColorPicker = new FontAndColorPicker("Notes", FontAndColorPicker.FontAndColorPickerType.Font, false); textboxColorPicker = new FontAndColorPicker("Textbox", FontAndColorPicker.FontAndColorPickerType.Font, false); labelColorPicker = new FontAndColorPicker("Labels", FontAndColorPicker.FontAndColorPickerType.Font, false); Content = new TableLayout() { Style = "padded-table", Rows = { new TableRow() { Cells = { new Label(), new Label() { Text = "Font" }, new Label() { Text = "Size" }, } }, lyricsColorPicker, notesColorPicker, textboxColorPicker, null } }; lyricsColorPicker.setFontFormat(userInterfaceSettings.LyricsFormat); notesColorPicker.setFontFormat(userInterfaceSettings.NoteFormat); textboxColorPicker.setFontFormat(userInterfaceSettings.TextboxFormat); labelColorPicker.setFontFormat(userInterfaceSettings.LabelFormat); }
public FontAndColorPanel(Entities.DisplayAndPrintSettings displayAndPrintSettings) { this.displayAndPrintSettings = displayAndPrintSettings; titleColorPicker = new FontAndColorPicker("Title", FontAndColorPicker.FontAndColorPickerType.FontAndColor); headingsColorPicker = new FontAndColorPicker("Headings", FontAndColorPicker.FontAndColorPickerType.FontAndColor); chordsColorPicker = new FontAndColorPicker("Chords", FontAndColorPicker.FontAndColorPickerType.FontAndColor, true); lyricsColorPicker = new FontAndColorPicker("Lyrics", FontAndColorPicker.FontAndColorPickerType.FontAndColor, true); notesColorPicker = new FontAndColorPicker("Notes", FontAndColorPicker.FontAndColorPickerType.FontAndColor); backgroundColor = new FontAndColorPicker("Background Color", FontAndColorPicker.FontAndColorPickerType.Color); verseHeadingBackgroundColor = new FontAndColorPicker("Verse Heading Background Color", FontAndColorPicker.FontAndColorPickerType.Color); paritalVerseHeadingBackgroundColor = new FontAndColorPicker("Partial Heading Background Color", FontAndColorPicker.FontAndColorPickerType.Color); verseLyricsBackgroundColor1 = new FontAndColorPicker("Verse Background Color 1", FontAndColorPicker.FontAndColorPickerType.Color); verseLyricsBackgroundColor2 = new FontAndColorPicker("Verse Background Color 2", FontAndColorPicker.FontAndColorPickerType.Color); verseLyricsBorderColor = new FontAndColorPicker("Verse Border Color", FontAndColorPicker.FontAndColorPickerType.Color); updateGuiFromSettingsObject(displayAndPrintSettings); Content = new TableLayout() { Style = "padded-table", Rows = { new TableRow() { Cells = { new Label(), new Label() { Text = "Font" }, new Label() { Text = "Size" }, new Label() { Text = "Color" }, new Label() { Text = "Style" } } }, titleColorPicker, headingsColorPicker, chordsColorPicker, lyricsColorPicker, notesColorPicker, backgroundColor, verseHeadingBackgroundColor, paritalVerseHeadingBackgroundColor, verseLyricsBackgroundColor1, verseLyricsBackgroundColor2, verseLyricsBorderColor, null } }; titleColorPicker.ItemChanged += ColorPicker_ItemChanged; headingsColorPicker.ItemChanged += ColorPicker_ItemChanged; chordsColorPicker.ItemChanged += ColorPicker_ItemChanged; lyricsColorPicker.ItemChanged += ColorPicker_ItemChanged; notesColorPicker.ItemChanged += ColorPicker_ItemChanged; backgroundColor.ItemChanged += ColorPicker_ItemChanged; verseHeadingBackgroundColor.ItemChanged += ColorPicker_ItemChanged; paritalVerseHeadingBackgroundColor.ItemChanged += ColorPicker_ItemChanged; verseLyricsBackgroundColor1.ItemChanged += ColorPicker_ItemChanged; verseLyricsBackgroundColor2.ItemChanged += ColorPicker_ItemChanged; verseLyricsBorderColor.ItemChanged += ColorPicker_ItemChanged; }
public FontAndColorPanel() { titleColorPicker = new FontAndColorPicker("Title", FontAndColorPicker.FontAndColorPickerType.FontAndColor); headingsColorPicker = new FontAndColorPicker("Headings", FontAndColorPicker.FontAndColorPickerType.FontAndColor); chordsColorPicker = new FontAndColorPicker("Chords", FontAndColorPicker.FontAndColorPickerType.FontAndColor, true); lyricsColorPicker = new FontAndColorPicker("Lyrics", FontAndColorPicker.FontAndColorPickerType.FontAndColor, true); notesColorPicker = new FontAndColorPicker("Notes", FontAndColorPicker.FontAndColorPickerType.FontAndColor); backgroundColor = new FontAndColorPicker("Background Color", FontAndColorPicker.FontAndColorPickerType.Color); verseHeadingBackgroundColor = new FontAndColorPicker("Verse Heading Background Color", FontAndColorPicker.FontAndColorPickerType.Color); paritalVerseHeadingBackgroundColor = new FontAndColorPicker("Partial Heading Background Color", FontAndColorPicker.FontAndColorPickerType.Color); verseLyricsBackgroundColor1 = new FontAndColorPicker("Verse Background Color 1", FontAndColorPicker.FontAndColorPickerType.Color); verseLyricsBackgroundColor2 = new FontAndColorPicker("Verse Background Color 2", FontAndColorPicker.FontAndColorPickerType.Color); verseLyricsBorderColor = new FontAndColorPicker("Verse Border Color", FontAndColorPicker.FontAndColorPickerType.Color); Content = new TableLayout() { Style = "padded-table", Rows = { new TableRow() { Cells = { new Label(), new Label() { Text = "Font" }, new Label() { Text = "Size" }, new Label() { Text = "Color" }, new Label() { Text = "Style" } } }, new TableRow(titleColorPicker), new TableRow(headingsColorPicker), new TableRow(chordsColorPicker), new TableRow(lyricsColorPicker), new TableRow(notesColorPicker), new TableRow(backgroundColor), new TableRow(verseHeadingBackgroundColor), new TableRow(paritalVerseHeadingBackgroundColor), new TableRow(verseLyricsBackgroundColor1), new TableRow(verseLyricsBackgroundColor2), new TableRow(verseLyricsBorderColor), null } }; titleColorPicker.ItemChanged += ColorPicker_ItemChanged; headingsColorPicker.ItemChanged += ColorPicker_ItemChanged; chordsColorPicker.ItemChanged += ColorPicker_ItemChanged; lyricsColorPicker.ItemChanged += ColorPicker_ItemChanged; notesColorPicker.ItemChanged += ColorPicker_ItemChanged; backgroundColor.ItemChanged += ColorPicker_ItemChanged; verseHeadingBackgroundColor.ItemChanged += ColorPicker_ItemChanged; paritalVerseHeadingBackgroundColor.ItemChanged += ColorPicker_ItemChanged; verseLyricsBackgroundColor1.ItemChanged += ColorPicker_ItemChanged; verseLyricsBackgroundColor2.ItemChanged += ColorPicker_ItemChanged; verseLyricsBorderColor.ItemChanged += ColorPicker_ItemChanged; }