예제 #1
0
 private static IEnumerable <FontFamilyItem> GetFontFamilies()
 {
     foreach (System.Windows.Media.FontFamily fontFamily in (IEnumerable <System.Windows.Media.FontFamily>)Fonts.SystemFontFamilies)
     {
         FontFamilyItem fontFamilyItem = CodeOptionsControl.CreateFontFamilyItem(fontFamily);
         if (fontFamilyItem.IsFontReadable)
         {
             yield return(fontFamilyItem);
         }
     }
 }
예제 #2
0
 public void Commit()
 {
     if (this.codeOptionsModel == null)
     {
         return;
     }
     this.configurationObject.Clear();
     this.codeOptionsModel.Save(this.configurationObject);
     this.codeOptionsModel   = (CodeOptionsModel)null;
     this.codeOptionsControl = (CodeOptionsControl)null;
     this.Apply();
 }
예제 #3
0
 private void DoBuildFontFamilies(object sender, DoWorkEventArgs e)
 {
     if (CodeOptionsControl.fontFamilyEnumerator == null)
     {
         CodeOptionsControl.fontFamilyEnumerator = CodeOptionsControl.GetFontFamilies().GetEnumerator();
     }
     if (CodeOptionsControl.fontFamilyEnumerator.MoveNext())
     {
         this.fontFamilies.Add(CodeOptionsControl.fontFamilyEnumerator.Current);
         e.Result = (object)AsyncProcessResult.StillGoing;
     }
     else
     {
         CodeOptionsControl.fontFamilyEnumerator = (IEnumerator <FontFamilyItem>)null;
     }
 }
예제 #4
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.codeOptionsControl = (CodeOptionsControl)target;
                break;

            case 2:
                this.CurrentSettings = (ComboBox)target;
                break;

            case 3:
                this.FontFamily = (ChoiceEditor)target;
                break;

            case 4:
                this.FontSize = (ChoiceEditor)target;
                break;

            case 5:
                this.TabSize = (NumberEditor)target;
                break;

            case 6:
                this.InsertSpacesCheckBox = (WorkaroundRadioButton)target;
                break;

            case 7:
                this.KeepTabsCheckBox = (WorkaroundRadioButton)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
예제 #5
0
 public void Cancel()
 {
     this.codeOptionsModel   = (CodeOptionsModel)null;
     this.codeOptionsControl = (CodeOptionsControl)null;
 }