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); } } }
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(); }
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; } }
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; } }
public void Cancel() { this.codeOptionsModel = (CodeOptionsModel)null; this.codeOptionsControl = (CodeOptionsControl)null; }