public InternalSqliteConnectionDialog(MsSqlAuditorModel model) { this._model = model; this._storage = model.DefaultVaultProcessor.CurrentStorage; this._connectionsManager = new ConnectionsManager(model); this._loginManager = new LoginManager(this._storage); this._templateManager = new TemplateManager(this._storage); this._templates = TemplateNodesLoader.GetTemplates(); InitializeComponent(); List<BindingWrapper<ConnectionType>> connectionTypes = this._model.ConnectionTypes; this.dataTypeBindingSource.DataSource = connectionTypes; this.dataTypeBindingSource.DataMember = "Item"; this.cmbDataType.DataSource = dataTypeBindingSource.DataSource; this.cmbDataType.SelectionChangeCommitted += this.cmbDataType_SelectedIndexChanged; this.cmbConnectionGroup.SelectionChangeCommitted += this.cmbConnectionGroup_SelectedIndexChanged; this.cmbServerInstance.SelectionChangeCommitted += this.cmbServerInstance_SelectedIndexChanged; this.cmbTemplate.SelectionChangeCommitted += this.cmbTemplate_SelectedIndexChanged; this.cmbLogin.SelectionChangeCommitted += this.cmbLogin_SelectedIndexChanged; if (connectionTypes.Count > 0) { UpdateConnectionGroupList(); } UpdateButtonsState(); }
public ConnectionsManager(MsSqlAuditorModel model) { CurrentStorage storage = model.DefaultVaultProcessor.CurrentStorage; this._groupManager = new ConnectionGroupManager(storage); this._instanceManager = new ServerInstanceManager(storage); this._loginManager = new LoginManager(storage); }