private void Initialize()
 {
     FontManager.GetLadder().Name  = Properties.Resources.Element;
     FontManager.GetTitle().Name   = Properties.Resources.Ladder_Title;
     FontManager.GetComment().Name = Properties.Resources.Comment;
     FontManager.GetFunc().Name    = Properties.Resources.FuncBlock;
     DemoFontManager.GetLadder().Setup(FontManager.GetLadder());
     DemoFontManager.GetTitle().Setup(FontManager.GetTitle());
     DemoFontManager.GetComment().Setup(FontManager.GetComment());
     DemoFontManager.GetFunc().Setup(FontManager.GetFunc());
     CB_Range.Items.Add(new FontDataItem(DemoFontManager.GetLadder()));
     CB_Range.Items.Add(new FontDataItem(DemoFontManager.GetTitle()));
     CB_Range.Items.Add(new FontDataItem(DemoFontManager.GetComment()));
     CB_Range.Items.Add(new FontDataItem(DemoFontManager.GetFunc()));
     foreach (var fontFamily in (new InstalledFontCollection()).Families)
     {
         FontFamilyItem ffitem = new FontFamilyItem(fontFamily);
         CB_Family.Items.Add(ffitem);
     }
     for (int i = 22; i <= 60; i++)
     {
         ComboBoxItem item = new ComboBoxItem();
         item.Content = i;
         CB_Size.Items.Add(item);
     }
     CB_Range.SelectedIndex = 0;
 }
 private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (sender == CB_Range)
     {
         FontDataItem fditem = (FontDataItem)(CB_Range.SelectedItem);
         Current = fditem;
         Demo.SetFontColor(Current.Data.FontColor, CB_Range.SelectedIndex);
     }
     if (sender == CB_Size)
     {
         ComboBoxItem cbitem = (ComboBoxItem)(CB_Size.SelectedItem);
         Current.Data.FontSize = (int)(cbitem.Content);
         Demo.SetFontSize(Current.Data.FontSize, CB_Range.SelectedIndex);
     }
     if (sender == CB_Family)
     {
         FontFamilyItem ffitem = (FontFamilyItem)(CB_Family.SelectedItem);
         Current.Data.FontFamily = new FontFamily(ffitem.Family.Name);
         Demo.SetFontFamily(ffitem.Family.Name, CB_Range.SelectedIndex);
     }
 }