public QueryBuilderPropertiesForm(QueryBuilder queryBuilder) { Debug.Assert(queryBuilder != null); InitializeComponent(); _queryBuilder = queryBuilder; BaseSyntaxProvider syntaxProvider = queryBuilder.SyntaxProvider != null ? queryBuilder.SyntaxProvider.Clone() : new GenericSyntaxProvider(); _sqlSyntaxPage = new SqlSyntaxPage(_queryBuilder, syntaxProvider); _offlineModePage = new OfflineModePage(_queryBuilder, syntaxProvider); _panesVisibilityPage = new PanesVisibilityPage(_queryBuilder); _databaseSchemaViewPage = new DatabaseSchemaViewPage(_queryBuilder); _miscellaneousPage = new MiscellaneousPage(_queryBuilder); _generalPage = new GeneralPage(_queryBuilder); _mainQueryPage = new SqlFormattingPage(SqlBuilderOptionsPages.MainQuery, _queryBuilder); _derievedQueriesPage = new SqlFormattingPage(SqlBuilderOptionsPages.DerivedQueries, _queryBuilder); _expressionSubqueriesPage = new SqlFormattingPage(SqlBuilderOptionsPages.ExpressionSubqueries, _queryBuilder); // Activate the first page SideMenu_LinkClicked(linkSqlSyntax, new LinkLabelLinkClickedEventArgs(linkSqlSyntax.Links[0], MouseButtons.Left)); Application.Idle += Application_Idle; }
public QueryBuilderPropertiesWindow(QueryBuilder queryBuilder) { Debug.Assert(queryBuilder != null); InitializeComponent(); _queryBuilder = queryBuilder; BaseSyntaxProvider syntaxProvider = queryBuilder.SyntaxProvider != null ? queryBuilder.SyntaxProvider.Clone() : new GenericSyntaxProvider(); _sqlSyntaxPage = new SqlSyntaxPage(_queryBuilder, syntaxProvider); _offlineModePage = new OfflineModePage(_queryBuilder.SQLContext); _panesVisibilityPage = new PanesVisibilityPage(_queryBuilder); _databaseSchemaViewPage = new DatabaseSchemaViewPage(_queryBuilder); _miscellaneousPage = new MiscellaneousPage(_queryBuilder); _generalPage = new GeneralPage(_queryBuilder); _mainQueryPage = new SqlFormattingPage(SqlBuilderOptionsPages.MainQuery, _queryBuilder); _derivedQueriesPage = new SqlFormattingPage(SqlBuilderOptionsPages.DerivedQueries, _queryBuilder); _expressionSubqueriesPage = new SqlFormattingPage(SqlBuilderOptionsPages.ExpressionSubqueries, _queryBuilder); // Activate the first page UIElement_OnMouseLeftButtonUp(linkSqlSyntax, null); }