Example #1
0
        private void LoadFontList()
        {
            if (!_IsFontLoading)
            {
                _IsFontLoading = true;
                FontSource.Clear();

                //폰트 콤보
                FontHelper.LoadAllFont(FontSource, FontTypes.All, () =>
                {
                    DispatcherHelper.CheckBeginInvokeOnUI(() =>
                    {
                        var selected = FontSource.FirstOrDefault(x => x.Key == Settings.Subtitle.FontFamily);
                        if (selected == null)
                        {
                            Settings.Subtitle.FontFamily = Settings.FONT_FAMILY_DEFAUT;
                            selected = FontSource.FirstOrDefault(x => x.Key == Settings.Subtitle.FontFamily);
                        }

                        FontFamily     = selected;
                        _IsFontLoading = false;
                    });
                });
            }
        }
 private void LoadedFontListCommandExecute(object arg)
 {
     FontSource.Clear();
     FontHelper.LoadAllFont(FontSource, FontTypes.CustomFont, () =>
     {
         DispatcherHelper.CheckBeginInvokeOnUI(() =>
         {
             RaisePropertyChanged("FontSource");
         });
     });
 }
Example #3
0
 internal void LoadFontList()
 {
     FontSource.Clear();
     FontHelper.LoadFonts(FontSource, FontTypes.All, null, () =>
     {
         DispatcherHelper.CheckBeginInvokeOnUI(() =>
         {
             Settings.ClosedCaption.OnPropertyChanged("CCFontFamily");
         });
     });
 }