Exemple #1
0
        public void ApplyChanges()
        {
            if (Modified)
            {
                MetadataStructureOptions metadataStructureOptions = _queryBuilder.MetadataStructure.Options;
                metadataStructureOptions.BeginUpdate();

                try
                {
                    metadataStructureOptions.GroupByServers   = cbGroupByServers.Checked;
                    metadataStructureOptions.GroupByDatabases = cbGroupByDatabases.Checked;
                    metadataStructureOptions.GroupBySchemas   = cbGroupBySchemas.Checked;
                    metadataStructureOptions.GroupByTypes     = cbGroupByTypes.Checked;
                    metadataStructureOptions.ShowFields       = cbShowFields.Checked;
                }
                finally
                {
                    metadataStructureOptions.EndUpdate();
                }

                DatabaseSchemaViewOptions databaseSchemaViewOptions = _queryBuilder.DatabaseSchemaViewOptions;
                databaseSchemaViewOptions.BeginUpdate();

                try
                {
                    databaseSchemaViewOptions.SortingType = (ObjectsSortingType)cmbSortObjectsBy.SelectedIndex;
                    databaseSchemaViewOptions.DefaultExpandMetadataType = GetExpandType();
                }
                finally
                {
                    databaseSchemaViewOptions.EndUpdate();
                }
            }
        }
 public void CreateDefaultOptions()
 {
     BehaviorOptions           = new BehaviorOptions();
     DatabaseSchemaViewOptions = new DatabaseSchemaViewOptions();
     DesignPaneOptions         = new DesignPaneOptions();
     VisualOptions             = new VisualOptions();
     AddObjectDialogOptions    = new AddObjectDialogOptions();
     DataSourceOptions         = new DataSourceOptions();
     QueryNavBarOptions        = new QueryNavBarOptions();
     UserInterfaceOptions      = new UserInterfaceOptions();
     SqlFormattingOptions      = new SQLFormattingOptions();
     SqlGenerationOptions      = new SQLGenerationOptions();
 }
 public void CreateDefaultOptions()
 {
     BehaviorOptions           = new BehaviorOptions();
     DatabaseSchemaViewOptions = new DatabaseSchemaViewOptions();
     DesignPaneOptions         = new DesignPaneOptions();
     VisualOptions             = new VisualOptions();
     AddObjectDialogOptions    = new AddObjectDialogOptions();
     DataSourceOptions         = new DataSourceOptions();
     QueryNavBarOptions        = new QueryNavBarOptions();
     UserInterfaceOptions      = new UserInterfaceOptions();
     SqlFormattingOptions      = new SQLFormattingOptions();
     SqlGenerationOptions      = new SQLGenerationOptions();
     ExpressionEditorOptions   = new ExpressionEditorOptions();
     TextEditorOptions         = new TextEditorOptions
     {
         Padding    = DefaultTextEditorPadding,
         LineHeight = new LengthUnit(90, SizeUnitType.Percent)
     };
     TextEditorSqlOptions = new SqlTextEditorOptions();
 }