mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Issue #1482: enable events on Processes and Command-Statistics tabs
This commit is contained in:
203
source/main.lfm
203
source/main.lfm
@ -1,16 +1,17 @@
|
||||
object MainForm: TMainForm
|
||||
Left = 549
|
||||
Height = 500
|
||||
Height = 0
|
||||
Top = 272
|
||||
Width = 998
|
||||
Width = 0
|
||||
Caption = 'MainForm'
|
||||
ClientHeight = 500
|
||||
ClientWidth = 998
|
||||
ClientHeight = 0
|
||||
ClientWidth = 0
|
||||
DesignTimePPI = 120
|
||||
Font.Height = -15
|
||||
Menu = MainMenu1
|
||||
OnCreate = FormCreate
|
||||
Position = poMainFormCenter
|
||||
LCLVersion = '3.8.0.0'
|
||||
object StatusBar: TStatusBar
|
||||
Left = 0
|
||||
Height = 29
|
||||
@ -68,7 +69,7 @@ object MainForm: TMainForm
|
||||
end
|
||||
object tlbSep1: TToolButton
|
||||
Left = 74
|
||||
Height = 28
|
||||
Height = 8
|
||||
Top = 2
|
||||
Caption = 'tlbSep1'
|
||||
ImageIndex = 2
|
||||
@ -99,7 +100,7 @@ object MainForm: TMainForm
|
||||
end
|
||||
object tlbSep2: TToolButton
|
||||
Left = 198
|
||||
Height = 28
|
||||
Height = 8
|
||||
Top = 2
|
||||
Caption = 'tlbSep2'
|
||||
ImageIndex = 3
|
||||
@ -133,7 +134,7 @@ object MainForm: TMainForm
|
||||
end
|
||||
object tlbSep6: TToolButton
|
||||
Left = 337
|
||||
Height = 28
|
||||
Height = 8
|
||||
Top = 2
|
||||
Caption = 'tlbSep6'
|
||||
ImageIndex = 97
|
||||
@ -867,6 +868,7 @@ object MainForm: TMainForm
|
||||
HintMode = hmTooltip
|
||||
Images = ImageListIcons8
|
||||
IncrementalSearch = isInitializedOnly
|
||||
ParentShowHint = False
|
||||
PopupMenu = popupDB
|
||||
ShowHint = True
|
||||
TabOrder = 3
|
||||
@ -1047,15 +1049,12 @@ object MainForm: TMainForm
|
||||
Width = 120
|
||||
end>
|
||||
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible, hoDisableAnimatedResize]
|
||||
Header.PopupMenu = popupListHeader
|
||||
Header.SortColumn = 0
|
||||
Images = VirtualImageListMain
|
||||
PopupMenu = popupHost
|
||||
TreeOptions.PaintOptions = [toHotTrack, toShowButtons, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toGhostedIfUnfocused, toUseExplorerTheme, toHideTreeLinesIfThemed]
|
||||
TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect, toMultiSelect, toRightClickSelect]
|
||||
Images = ImageListIcons8
|
||||
PopupMenu = popupHost
|
||||
TabOrder = 0
|
||||
TreeOptions.PaintOptions = [toHotTrack, toShowButtons, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toGhostedIfUnfocused, toUseExplorerTheme, toHideTreeLinesIfThemed]
|
||||
TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect, toMultiSelect, toRightClickSelect]
|
||||
OnAfterPaint = AnyGridAfterPaint
|
||||
OnBeforeCellPaint = HostListBeforeCellPaint
|
||||
OnBeforePaint = ListDatabasesBeforePaint
|
||||
@ -1138,9 +1137,53 @@ object MainForm: TMainForm
|
||||
Align = alClient
|
||||
DefaultText = 'Node'
|
||||
Header.AutoSizeIndex = 0
|
||||
Header.Columns = <>
|
||||
Header.MainColumn = -1
|
||||
Header.Columns = <
|
||||
item
|
||||
Position = 0
|
||||
Text = 'Variable'
|
||||
Width = 248
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Position = 1
|
||||
Text = 'Value'
|
||||
Width = 312
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Position = 2
|
||||
Text = 'Avg per hour'
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Position = 3
|
||||
Text = 'Avg per second'
|
||||
Width = 100
|
||||
end>
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible, hoDisableAnimatedResize]
|
||||
Header.SortColumn = 0
|
||||
HintMode = hmTooltip
|
||||
Images = ImageListIcons8
|
||||
IncrementalSearch = isInitializedOnly
|
||||
ParentShowHint = False
|
||||
PopupMenu = popupHost
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
TreeOptions.MiscOptions = [toToggleOnDblClick]
|
||||
TreeOptions.PaintOptions = [toHotTrack, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toUseExplorerTheme]
|
||||
TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect, toRightClickSelect]
|
||||
OnAfterPaint = AnyGridAfterPaint
|
||||
OnBeforeCellPaint = HostListBeforeCellPaint
|
||||
OnBeforePaint = HostListBeforePaint
|
||||
OnCompareNodes = AnyGridCompareNodes
|
||||
OnGetText = HostListGetText
|
||||
OnGetImageIndex = HostListGetImageIndex
|
||||
OnGetHint = AnyGridGetHint
|
||||
OnGetNodeDataSize = AnyGridGetNodeDataSize
|
||||
OnHeaderClick = AnyGridHeaderClick
|
||||
OnHeaderDraggedOut = AnyGridHeaderDraggedOut
|
||||
OnInitNode = AnyGridInitNode
|
||||
end
|
||||
end
|
||||
object tabProcesslist: TTabSheet
|
||||
@ -1661,11 +1704,73 @@ object MainForm: TMainForm
|
||||
Width = 764
|
||||
Align = alClient
|
||||
DefaultText = 'Node'
|
||||
Header.AutoSizeIndex = 0
|
||||
Header.Columns = <>
|
||||
Header.MainColumn = -1
|
||||
Images = ImageListIcons8
|
||||
Header.AutoSizeIndex = 7
|
||||
Header.Columns = <
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Position = 0
|
||||
Text = 'id'
|
||||
Width = 70
|
||||
end
|
||||
item
|
||||
Position = 1
|
||||
Text = 'User'
|
||||
Width = 80
|
||||
end
|
||||
item
|
||||
Position = 2
|
||||
Text = 'Host'
|
||||
Width = 80
|
||||
end
|
||||
item
|
||||
Position = 3
|
||||
Text = 'DB'
|
||||
Width = 80
|
||||
end
|
||||
item
|
||||
Position = 4
|
||||
Text = 'Command'
|
||||
Width = 80
|
||||
end
|
||||
item
|
||||
Position = 5
|
||||
Text = 'Time'
|
||||
end
|
||||
item
|
||||
Position = 6
|
||||
Text = 'State'
|
||||
end
|
||||
item
|
||||
Position = 7
|
||||
Text = 'Info'
|
||||
Width = 244
|
||||
end>
|
||||
Header.Height = 20
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible, hoDisableAnimatedResize]
|
||||
Header.SortColumn = 0
|
||||
Header.SortDirection = sdDescending
|
||||
HintMode = hmTooltip
|
||||
IncrementalSearch = isInitializedOnly
|
||||
ParentShowHint = False
|
||||
PopupMenu = popupHost
|
||||
ShowHint = True
|
||||
TabOrder = 2
|
||||
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
||||
TreeOptions.PaintOptions = [toHotTrack, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toUseExplorerTheme]
|
||||
TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect, toMultiSelect, toRightClickSelect]
|
||||
OnAfterPaint = AnyGridAfterPaint
|
||||
OnBeforeCellPaint = HostListBeforeCellPaint
|
||||
OnBeforePaint = HostListBeforePaint
|
||||
OnCompareNodes = AnyGridCompareNodes
|
||||
OnFocusChanged = ListProcessesFocusChanged
|
||||
OnGetText = HostListGetText
|
||||
OnGetImageIndex = HostListGetImageIndex
|
||||
OnGetHint = AnyGridGetHint
|
||||
OnGetNodeDataSize = AnyGridGetNodeDataSize
|
||||
OnHeaderClick = AnyGridHeaderClick
|
||||
OnHeaderDraggedOut = AnyGridHeaderDraggedOut
|
||||
OnInitNode = AnyGridInitNode
|
||||
end
|
||||
end
|
||||
object tabCommandStats: TTabSheet
|
||||
@ -1680,11 +1785,62 @@ object MainForm: TMainForm
|
||||
Width = 764
|
||||
Align = alClient
|
||||
DefaultText = 'Node'
|
||||
Header.AutoSizeIndex = 0
|
||||
Header.Columns = <>
|
||||
Header.AutoSizeIndex = 4
|
||||
Header.Columns = <
|
||||
item
|
||||
Position = 0
|
||||
Text = 'Command-type'
|
||||
Width = 120
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Position = 1
|
||||
Text = 'Total count'
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Position = 2
|
||||
Text = 'Average per hour'
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Position = 3
|
||||
Text = 'Average per second'
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
Position = 4
|
||||
Text = 'Percentage'
|
||||
Width = 252
|
||||
end>
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible, hoDisableAnimatedResize, hoAutoResizeInclCaption]
|
||||
Header.PopupMenu = popupListHeader
|
||||
Header.SortColumn = 1
|
||||
Header.SortDirection = sdDescending
|
||||
HintMode = hmTooltip
|
||||
Images = ImageListIcons8
|
||||
IncrementalSearch = isInitializedOnly
|
||||
ParentShowHint = False
|
||||
Header.MainColumn = -1
|
||||
PopupMenu = popupHost
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
TreeOptions.MiscOptions = [toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
||||
TreeOptions.PaintOptions = [toHotTrack, toShowButtons, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toUseExplorerTheme]
|
||||
TreeOptions.SelectionOptions = [toExtendedFocus, toFullRowSelect]
|
||||
OnAfterPaint = AnyGridAfterPaint
|
||||
OnBeforeCellPaint = HostListBeforeCellPaint
|
||||
OnBeforePaint = HostListBeforePaint
|
||||
OnCompareNodes = AnyGridCompareNodes
|
||||
OnGetText = HostListGetText
|
||||
OnGetImageIndex = HostListGetImageIndex
|
||||
OnGetHint = AnyGridGetHint
|
||||
OnGetNodeDataSize = AnyGridGetNodeDataSize
|
||||
OnHeaderClick = AnyGridHeaderClick
|
||||
OnHeaderDraggedOut = AnyGridHeaderDraggedOut
|
||||
OnInitNode = AnyGridInitNode
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -19549,7 +19705,7 @@ object MainForm: TMainForm
|
||||
Top = 120
|
||||
end
|
||||
object SynCompletionProposal: TSynCompletion
|
||||
Position = 0
|
||||
Position = -1
|
||||
LinesInWindow = 6
|
||||
SelectedColor = clHighlight
|
||||
CaseSensitive = False
|
||||
@ -20341,4 +20497,11 @@ object MainForm: TMainForm
|
||||
Left = 704
|
||||
Top = 168
|
||||
end
|
||||
object TimerStoreTabs: TTimer
|
||||
Enabled = False
|
||||
Interval = 10000
|
||||
OnTimer = TimerStoreTabsTimer
|
||||
Left = 689
|
||||
Top = 299
|
||||
end
|
||||
end
|
||||
|
@ -602,6 +602,7 @@ type
|
||||
actGotoTab41: TMenuItem;
|
||||
actGotoTab51: TMenuItem;
|
||||
actClearQueryLog: TAction;
|
||||
TimerStoreTabs: TTimer;
|
||||
Duplicaterowwithkeys1: TMenuItem;
|
||||
actGoToQueryResults: TAction;
|
||||
Switchtoqueryresults1: TMenuItem;
|
||||
@ -786,10 +787,10 @@ type
|
||||
procedure actExitApplicationExecute(Sender: TObject);
|
||||
//procedure WMCopyData(var Msg: TWMCopyData); message WM_COPYDATA;
|
||||
//procedure CMStyleChanged(var Msg: TMessage); message CM_STYLECHANGED;
|
||||
//procedure FormDestroy(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure AfterFormCreate;
|
||||
//procedure FormShow(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormResize(Sender: TObject);
|
||||
//procedure AddEditorCommandMenu(const S: string);
|
||||
//procedure EditorCommandOnClick(Sender: TObject);
|
||||
@ -929,7 +930,7 @@ type
|
||||
//procedure ListTablesBeforeCellPaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas;
|
||||
// Node: PVirtualNode; Column: TColumnIndex; CellPaintMode: TVTCellPaintMode; CellRect: TRect;
|
||||
// var ContentRect: TRect);
|
||||
//procedure ListProcessesFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
|
||||
procedure ListProcessesFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
|
||||
procedure editFilterVTChange(Sender: TObject);
|
||||
procedure ListVariablesDblClick(Sender: TObject);
|
||||
procedure menuEditVariableClick(Sender: TObject);
|
||||
@ -1130,7 +1131,7 @@ type
|
||||
// WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
|
||||
//procedure SynMemoQueryKeyPress(Sender: TObject; var Key: Char);
|
||||
//procedure filterQueryHelpersChange(Sender: TObject);
|
||||
//procedure TimerStoreTabsTimer(Sender: TObject);
|
||||
procedure TimerStoreTabsTimer(Sender: TObject);
|
||||
procedure actGoToQueryResultsExecute(Sender: TObject);
|
||||
procedure actGoToDataMultiFilterExecute(Sender: TObject);
|
||||
procedure actDataOpenUrlExecute(Sender: TObject);
|
||||
@ -1817,10 +1818,10 @@ begin
|
||||
CanClose := not (ActiveObjectEditor.DeInit in [mrAbort, mrCancel]);
|
||||
end;}
|
||||
|
||||
{procedure TMainForm.FormDestroy(Sender: TObject);
|
||||
procedure TMainForm.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
// Destroy dialogs
|
||||
FreeAndNil(FSearchReplaceDialog);
|
||||
//FreeAndNil(FSearchReplaceDialog);
|
||||
|
||||
StoreLastSessions;
|
||||
|
||||
@ -1866,16 +1867,17 @@ begin
|
||||
AppSettings.WriteIntDpiAware(asMainWinWidth, Self, Width);
|
||||
AppSettings.WriteIntDpiAware(asMainWinHeight, Self, Height);
|
||||
end;
|
||||
SaveListSetup(ListDatabases);
|
||||
SaveListSetup(ListVariables);
|
||||
SaveListSetup(ListStatus);
|
||||
SaveListSetup(ListProcesses);
|
||||
SaveListSetup(ListCommandStats);
|
||||
SaveListSetup(ListTables);
|
||||
//SaveListSetup(ListDatabases);
|
||||
//SaveListSetup(ListVariables);
|
||||
//SaveListSetup(ListStatus);
|
||||
//SaveListSetup(ListProcesses);
|
||||
//SaveListSetup(ListCommandStats);
|
||||
//SaveListSetup(ListTables);
|
||||
|
||||
LogToFile := False;
|
||||
AppSettings.Free;
|
||||
end;}
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormCreate(Sender: TObject);
|
||||
var
|
||||
i, j, MonitorIndex: Integer;
|
||||
@ -2606,11 +2608,11 @@ begin
|
||||
end;}
|
||||
|
||||
|
||||
{procedure TMainForm.TimerStoreTabsTimer(Sender: TObject);
|
||||
procedure TMainForm.TimerStoreTabsTimer(Sender: TObject);
|
||||
begin
|
||||
// Backup unsaved content every 10 seconds
|
||||
StoreTabs;
|
||||
end;}
|
||||
//StoreTabs;
|
||||
end;
|
||||
|
||||
|
||||
procedure TMainForm.actSessionManagerExecute(Sender: TObject);
|
||||
@ -2824,27 +2826,27 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
{procedure TMainForm.FormShow(Sender: TObject);
|
||||
procedure TMainForm.FormShow(Sender: TObject);
|
||||
begin
|
||||
// Window dimensions
|
||||
if WindowState <> wsMaximized then begin
|
||||
Width := AppSettings.ReadIntDpiAware(asMainWinWidth, Self);
|
||||
Height := AppSettings.ReadIntDpiAware(asMainWinHeight, Self);
|
||||
//Width := AppSettings.ReadIntDpiAware(asMainWinWidth, Self);
|
||||
//Height := AppSettings.ReadIntDpiAware(asMainWinHeight, Self);
|
||||
end;
|
||||
|
||||
LogSQL(f_('Scaling controls to screen DPI: %d%%', [Round(ScaleFactor*100)]));
|
||||
{LogSQL(f_('Scaling controls to screen DPI: %d%%', [Round(ScaleFactor*100)]));
|
||||
if TStyleManager.IsCustomStyleActive and (ScaleFactor<>1) then begin
|
||||
LogSQL(f_('Caution: Style "%s" selected and non-default DPI factor - be aware that some styles appear broken with high DPI settings!', [TStyleManager.ActiveStyle.Name]));
|
||||
end;
|
||||
end;}
|
||||
|
||||
|
||||
// Restore width of columns of all VirtualTrees
|
||||
RestoreListSetup(ListDatabases);
|
||||
{RestoreListSetup(ListDatabases);
|
||||
RestoreListSetup(ListVariables);
|
||||
RestoreListSetup(ListStatus);
|
||||
RestoreListSetup(ListProcesses);
|
||||
RestoreListSetup(ListCommandStats);
|
||||
RestoreListSetup(ListTables);
|
||||
RestoreListSetup(ListTables);}
|
||||
|
||||
// Fix node height on Virtual Trees for current DPI settings
|
||||
FixVT(DBTree);
|
||||
@ -2870,7 +2872,7 @@ begin
|
||||
|
||||
// Call once after all query tabs were created:
|
||||
ValidateControls(Sender);
|
||||
end;}
|
||||
end;
|
||||
|
||||
{procedure TMainForm.AddEditorCommandMenu(const S: string);
|
||||
begin
|
||||
@ -4789,14 +4791,14 @@ begin
|
||||
tab2 := PageControlHost.ActivePage;
|
||||
if tab2 = tabDatabases then
|
||||
List := ListDatabases
|
||||
{else if tab2 = tabVariables then
|
||||
else if tab2 = tabVariables then
|
||||
List := ListVariables
|
||||
else if tab2 = tabStatus then
|
||||
List := ListStatus
|
||||
else if tab2 = tabProcessList then
|
||||
List := ListProcesses
|
||||
else
|
||||
List := ListCommandStats};
|
||||
List := ListCommandStats;
|
||||
InvalidateVT(List, VTREE_NOTLOADED_PURGECACHE, True);
|
||||
end else if tab1 = tabDatabase then begin
|
||||
OldDbObject := TDBObject.Create(FActiveDbObj.Connection);
|
||||
@ -4804,8 +4806,8 @@ begin
|
||||
RefreshTree(OldDbObject);
|
||||
end else if tab1 = tabEditor then begin
|
||||
RefreshTree;
|
||||
end {else if tab1 = tabData then
|
||||
InvalidateVT(DataGrid, VTREE_NOTLOADED_PURGECACHE, False)};
|
||||
end else if tab1 = tabData then
|
||||
InvalidateVT(DataGrid, VTREE_NOTLOADED_PURGECACHE, False);
|
||||
end;
|
||||
|
||||
|
||||
@ -9066,7 +9068,7 @@ end;
|
||||
A row in the process list was selected. Fill SynMemoProcessView with
|
||||
the SQL of that row.
|
||||
}
|
||||
{procedure TMainForm.ListProcessesFocusChanged(Sender: TBaseVirtualTree;
|
||||
procedure TMainForm.ListProcessesFocusChanged(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex);
|
||||
var
|
||||
NodeFocused, EnableControls: Boolean;
|
||||
@ -9092,7 +9094,7 @@ begin
|
||||
pnlProcessView.Enabled := EnableControls;
|
||||
lblExplainProcess.Enabled := EnableControls and ActiveConnection.Parameters.IsAnyMySQL;
|
||||
menuExplainProcess.Enabled := lblExplainProcess.Enabled;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{***
|
||||
|
Reference in New Issue
Block a user