Closed dragnilar closed 6 years ago
This took longer than I would have liked. The main problem was finding a way to allow a user to adjust the heights of query grids stored in the results pane via the XtraLayoutControl.
The XtraLayoutControl is not very straight forward at providing functionality similar to whatever it is that Microsoft used for the results pane in SSMS. While the XtraLayout DOES expose this functionality, the user has to right click on a control and open up a customization form and then afterwords they are able to resize the grids. I feel like this requires too many extra steps.
When I have the time, I will revisit the XtraLayout, but for now I will be using this decedent of the vanilla Windows Forms table layout panel:
In addition I will be adding a secondary view that allows you to add multiple grids as dockable panels so that you can move them around the app or onto a second monitor.
Still needs to be done:
The results tab can now show multiple results grids. This still needs some work however:
Another update -
Working on two things at once for this now:
A) Dock panel mode - All query results grids will be shown in dock able containers that can be pulled out of the window and docked anywhere on your screen. This mode has some limitations with downward scrolling, but this seems to be something that's even an issue in Visual Studio itself with dock panels...
B) WPF layout mode - This will replace the table layout mode used previously. This will fix the splitter resizing bugs.
WPF layout mode is almost "done". The most recent commit implements it but it needs some cleanup. Also exporting and printing are currently disabled. We need to add some functionality to allow the user to select a specific grid to export/print when there are multiples on screen.
Edit: Exporting and printing are enabled again for single grids. Need to implement some kind of dialog that lets you pick specific grids to export. It may also be beneficial to add a right click context menu to let you export like in SSMS.
Note - There is a bug with the right click context menu on the grids themselves. The right click menu does not disappear until you select something on it. We will need to add something to make it go away when clicking elsewhere on the screen. Otherwise it gets stuck on top of every other window and I can see that being very annoying.
Previous update resolves issue with the right click context menu.
The WPF layout clean up is in progress. The next commit will improve it twofold:
Side note - This entire enhancement has taken over 13 days, that's probably the longest any single one has ever taken for this project.
Small update with bd523822 - Images now display on the right click context menu for the grids. Also the way the grid buttons are built has been refactored.
55860be9 - 7 Days later..
b9eead8c and prior commits:
The WPF grid layout is finished. Printing and Exporting are now fully functional for both single and multi grid mode. When using multi-grid mode a window will pop up letting the user select which grid to print specifically. Note that the grid names are defaulted to $"grid {gridNumber}". If we can find a way to give them better names, that will be implemented.
Dock Panel Layout mode is finished as well. Printing and Exporting work in it as well. There are a couple of enhancements I can think of for this, one namely being having a single grid show up full sized instead of at the default dock panel size. But that can be addressed separately from this.
There may be bugs, but we will address them as we find them. I'm going to go ahead and close this.
Databvase only displays one query results grid at a time. This means that if you fire off a query that returns two or more results sets (I.E. Select from table1, select from table 2), you only get the first tables worth of results back.
SSMS is capable of displaying multiple results. It would be nice if Databvase were able to capture this functionality.