private void Button_InitFontInformationClick(object sender, RoutedEventArgs e)
        {
            FontList fontsToInit = (this.DataContext as MainVM).Fonts;

            fontsToInit.InitializeFonts();

            fontsToInit.FilterFonts();
        }
Example #2
0
        public void OverwriteFontData(List <FavoriteFont> overwriteFontData)
        {
            fonts.InitializeFonts();

            foreach (FavoriteFont favoriteFont in overwriteFontData)
            {
                FavoriteFont fontToOverwrite = fonts.FavoriteFontList.FirstOrDefault(x => x.FontName == favoriteFont.FontName);
                fontToOverwrite.Comment    = favoriteFont.Comment;
                fontToOverwrite.IsFavorite = favoriteFont.IsFavorite;
            }

            Fonts.FilterFonts();
        }