protected override void Initialize()
 {
     base.Initialize();
     _options = new Options(UserRegistryRoot,  "EventHandlerNaming");
     _options.Load();
     _designerHandler = new DesignerCreationListener((IDesignerEventService)GetService(typeof(IDesignerEventService)), _options);
     _codeWindowHandler = new CodeWindowHandler((DTE2) GetGlobalService(typeof(EnvDTE.DTE)), new PatternNameProvider(_options), _options);
     InitializeMenuCommands();
 }
 internal CodeWindowHandler(DTE2 application, PatternNameProvider nameProvider, Options options)
 {
     _application = application;
     _textDocKeyPressEvents = ((Events2)application.Events).TextDocumentKeyPressEvents[null];
     _textDocKeyPressEvents.AfterKeyPress += AfterTextDocumentKeyPress;
     _textDocKeyPressEvents.BeforeKeyPress += BeforeTextDocumentKeyPress;
     _nameProvider = nameProvider;
     _options = options;
 }
 public OptionsForm(Options options)
 {
     InitializeComponent();
     _options = options;
     cboSiteNameTransform.DataSource = Transform.Values.ToList();
     cboEventNameTransform.DataSource = Transform.Values.ToList();
     txtPattern.Text = _options.Pattern;
     chkOmitSiteNameForOwnEvents.Checked = _options.OmitSiteNameForOwnEvents;
     cboEventNameTransform.SelectedItem = _options.EventNameTransform;
     cboSiteNameTransform.SelectedItem = _options.SiteNameTransform;
     chkUseDelegateInference.Checked = _options.UseDelegateInference;
     txtRemovePrefixes.Text = _options.RemovePrefixes;
 }
 internal PatternNameProvider(Options options)
 {
     _options = options;
 }
 internal DesignerCreationListener(IDesignerEventService designerEvents, Options options)
 {
     designerEvents.DesignerCreated += (s, e) => e.Designer.LoadComplete += OnDesignerLoaded;
     _options = options;
 }