private void SqlEditorWindow_Loaded(object sender, RoutedEventArgs e) { try { var overflowGrid = toolBar1.Template.FindName("OverflowGrid", toolBar1) as FrameworkElement; if (overflowGrid != null) { overflowGrid.Visibility = Visibility.Collapsed; } SetEditorFont(); toolBar1.Background = toolTray.Background = VsThemes.GetCommandBackground(); dock1.Background = VsThemes.GetWindowBackground(); sep4.Background = VsThemes.GetToolbarSeparatorBackground(); txtSaveAs.Foreground = VsThemes.GetWindowText(); if (DatabaseInfo != null) { txtVersion.Text = DatabaseInfo.ServerVersion; } ConfigureOptions(); LoadHighlighter(); SqlTextBox.TextChanged += SqlTextBox_TextChanged; SqlTextBox.Focus(); } catch (Exception ex) { DataConnectionHelper.SendError(ex, DatabaseInfo?.DatabaseType ?? DatabaseType.SQLServer); } }
private void SqlEditorWindow_Loaded(object sender, RoutedEventArgs e) { try { var overflowGrid = toolBar1.Template.FindName("OverflowGrid", toolBar1) as FrameworkElement; if (overflowGrid != null) { overflowGrid.Visibility = Visibility.Collapsed; } var package = _parentWindow.Package as SqlCeToolboxPackage; if (package == null) { return; } Dte = package.GetServiceHelper(typeof(DTE)) as DTE; toolBar1.Background = toolTray.Background = VsThemes.GetCommandBackground(); dock1.Background = VsThemes.GetWindowBackground(); sep4.Background = VsThemes.GetToolbarSeparatorBackground(); txtSaveAs.Foreground = VsThemes.GetWindowText(); if (DatabaseInfo != null) { txtVersion.Text = DatabaseInfo.ServerVersion; } LoadDefaultOptions(); ConfigureOptions(); LoadHighlighter(); //TODO //formsHost.Visibility = Visibility.Collapsed; SqlTextBox.TextChanged += SqlTextBox_TextChanged; //TODO Entry point for Intellisense //SqlTextBox.TextArea.TextEntering += SqlTextBox_TextArea_TextEntering; //SqlTextBox.TextArea.TextEntered += SqlTextBox_TextArea_TextEntered; SqlTextBox.Focus(); } catch (Exception ex) { DataConnectionHelper.SendError(ex, DatabaseInfo != null ? DatabaseInfo.DatabaseType : DatabaseType.SQLServer); } }