public ThemeOptionsControl(IThemeAwareDialog child) { InitializeComponent(); Child = child; Control control = child as Control; Debug.Assert(Child != null); Debug.Assert(control != null); tableContent.Controls.Add(control); tableContent.SetColumn(control, 0); tableContent.SetRow(control, 1); control.Dock = DockStyle.Fill; ServiceProvider provider = ServiceProvider.GlobalProvider; Service = provider.GetService(typeof(SIndentGuide)) as IndentGuideService; Child.Service = Service; TextManagerService = (IVsTextManager)provider.GetService(typeof(SVsTextManager)); IComponentModel componentModel = (IComponentModel)provider.GetService(typeof(SComponentModel)); EditorAdapters = componentModel .GetService <IVsEditorAdaptersFactoryService>(); ActiveThemeChanged += ActiveTheme_Changed; }
public ThemeOptionsControl(IThemeAwareDialog child) { InitializeComponent(); Child = child; var control = child as Control; Debug.Assert(Child != null); Debug.Assert(control != null); tableContent.Controls.Add(control); tableContent.SetColumn(control, 0); tableContent.SetRow(control, 1); control.Dock = DockStyle.Fill; var provider = ServiceProvider.GlobalProvider; Service = provider.GetService(typeof(SIndentGuide)) as IndentGuideService; Child.Service = (IIndentGuide)Service; TextManagerService = (IVsTextManager)provider.GetService(typeof(SVsTextManager)); var componentModel = (IComponentModel)provider.GetService(typeof(SComponentModel)); EditorAdapters = (IVsEditorAdaptersFactoryService)componentModel .GetService<IVsEditorAdaptersFactoryService>(); ActiveThemeChanged += ActiveTheme_Changed; }