// ======================================================================== // Con- / Destructors #region === Con- / Destructors /// <summary> /// Initializes a new instance of <see cref="VisitorManager"/>. /// </summary> private VisitorManager() { visitorTypes = new Dictionary <string, Type>(); visitorConfigs = new Dictionary <string, VisitorConfig>(); VisitorNames = new List <string>(); VisitorTypes = new List <Type>(); LoadVisitors(); VisitorConfig config = new CSharpVisitorConfig(); visitorConfigs.Add(config.VisitorName, config); LoadConfigs(); }
// ======================================================================== // Con- / Destructors #region === Con- / Destructors /// <summary> /// Initializes a new instance of <see cref="CSharpVisitorConfigControl"/>. /// </summary> public CSharpVisitorConfigControl() { InitializeComponent(); Text = "C# Visitor"; CSharpVisitorConfig config = VisitorManager.Instance.GetVisitorConfig(typeof(CSharpVisitor).FullName) as CSharpVisitorConfig; if (config != null) { chkCreateAttributes.DataBindings.Add("Checked", config, "CreateAttributes", false, DataSourceUpdateMode.OnPropertyChanged); chkNewLineAfterType.DataBindings.Add("Checked", config, "NewLineAfterType", false, DataSourceUpdateMode.OnPropertyChanged); chkNewLineAfterMember.DataBindings.Add("Checked", config, "NewLineAfterMember", false, DataSourceUpdateMode.OnPropertyChanged); chkUseNamespaces.DataBindings.Add("Checked", config, "UseNamespaces", false, DataSourceUpdateMode.OnPropertyChanged); txtKnownNamespaces.DataBindings.Add("Lines", config, "KnownNamespaces", true, DataSourceUpdateMode.OnPropertyChanged); } }