mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Issue #1482: enable events on Database tab
This commit is contained in:
@ -375,7 +375,7 @@ type
|
||||
procedure FixVT(VT: TVirtualStringTree; MultiLineCount: Word=1);
|
||||
function GetTextHeight(Font: TFont): Integer;
|
||||
function ColorAdjustBrightness(Col: TColor; Shift: SmallInt): TColor;
|
||||
//procedure DeInitializeVTNodes(Sender: TBaseVirtualTree);
|
||||
procedure DeInitializeVTNodes(Sender: TBaseVirtualTree);
|
||||
function FindNode(VT: TLazVirtualStringTree; idx: Int64; ParentNode: PVirtualNode): PVirtualNode;
|
||||
function SelectNode(VT: TLazVirtualStringTree; idx: Int64; ParentNode: PVirtualNode=nil): Boolean; overload;
|
||||
function SelectNode(VT: TLazVirtualStringTree; Node: PVirtualNode; ClearSelection: Boolean=True): Boolean; overload;
|
||||
@ -383,8 +383,8 @@ type
|
||||
procedure SetVTSelection(VT: TVirtualStringTree; SelectedCaptions: TStringList; FocusedCaption: String);
|
||||
function GetNextNode(Tree: TLazVirtualStringTree; CurrentNode: PVirtualNode; Selected: Boolean=False): PVirtualNode;
|
||||
function GetPreviousNode(Tree: TLazVirtualStringTree; CurrentNode: PVirtualNode; Selected: Boolean=False): PVirtualNode;
|
||||
//function DateBackFriendlyCaption(d: TDateTime): String;
|
||||
//function DateTimeToStrDef(DateTime: TDateTime; Default: String): String;
|
||||
function DateBackFriendlyCaption(d: TDateTime): String;
|
||||
function DateTimeToStrDef(DateTime: TDateTime; Default: String): String;
|
||||
function TruncDef(X: Real; Default: Int64): Int64;
|
||||
function GetLightness(AColor: TColor): Byte;
|
||||
//function ParamBlobToStr(lpData: Pointer): String;
|
||||
@ -1434,9 +1434,9 @@ begin
|
||||
VT.TreeOptions.PaintOptions := VT.TreeOptions.PaintOptions + [toHotTrack]
|
||||
else
|
||||
VT.TreeOptions.PaintOptions := VT.TreeOptions.PaintOptions - [toHotTrack];
|
||||
//VT.OnGetHint := MainForm.AnyGridGetHint;
|
||||
//VT.OnScroll := MainForm.AnyGridScroll;
|
||||
//VT.OnMouseWheel := MainForm.AnyGridMouseWheel;
|
||||
VT.OnGetHint := MainForm.AnyGridGetHint;
|
||||
VT.OnScroll := MainForm.AnyGridScroll;
|
||||
VT.OnMouseWheel := MainForm.AnyGridMouseWheel;
|
||||
VT.ShowHint := True;
|
||||
|
||||
if toGridExtensions in VT.TreeOptions.MiscOptions then
|
||||
@ -1444,8 +1444,8 @@ begin
|
||||
else
|
||||
VT.HintMode := hmTooltip; // Just a quick tooltip for clipped nodes
|
||||
// Apply case insensitive incremental search event
|
||||
//if VT.IncrementalSearch <> VirtualTrees.Types.isNone then
|
||||
// VT.OnIncrementalSearch := Mainform.AnyGridIncrementalSearch;
|
||||
if VT.IncrementalSearch <> laz.VirtualTrees.isNone then
|
||||
VT.OnIncrementalSearch := Mainform.AnyGridIncrementalSearch;
|
||||
//VT.OnStartOperation := Mainform.AnyGridStartOperation;
|
||||
//VT.OnEndOperation := Mainform.AnyGridEndOperation;
|
||||
end;
|
||||
@ -1472,7 +1472,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{procedure DeInitializeVTNodes(Sender: TBaseVirtualTree);
|
||||
procedure DeInitializeVTNodes(Sender: TBaseVirtualTree);
|
||||
var
|
||||
Node: PVirtualNode;
|
||||
begin
|
||||
@ -1483,7 +1483,7 @@ begin
|
||||
Node.States := Node.States - [vsInitialized];
|
||||
Node := Sender.GetNextInitialized(Node);
|
||||
end;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
function FindNode(VT: TLazVirtualStringTree; idx: Int64; ParentNode: PVirtualNode): PVirtualNode;
|
||||
@ -1646,7 +1646,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{function DateBackFriendlyCaption(d: TDateTime): String;
|
||||
function DateBackFriendlyCaption(d: TDateTime): String;
|
||||
var
|
||||
MonthsAgo, DaysAgo, HoursAgo, MinutesAgo: Int64;
|
||||
begin
|
||||
@ -1663,10 +1663,10 @@ begin
|
||||
else if MinutesAgo = 1 then Result := f_('%s minute ago', [FormatNumber(MinutesAgo)])
|
||||
else if MinutesAgo > 0 then Result := f_('%s minutes ago', [FormatNumber(MinutesAgo)])
|
||||
else Result := _('less than a minute ago');
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{function DateTimeToStrDef(DateTime: TDateTime; Default: String) : String;
|
||||
function DateTimeToStrDef(DateTime: TDateTime; Default: String) : String;
|
||||
begin
|
||||
try
|
||||
if DateTime = 0 then
|
||||
@ -1676,7 +1676,7 @@ begin
|
||||
except
|
||||
on EInvalidOp do Result := Default;
|
||||
end;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
function TruncDef(X: Real; Default: Int64): Int64;
|
||||
@ -1774,11 +1774,11 @@ begin
|
||||
for SortItem in Self do begin
|
||||
if Result <> '' then
|
||||
Result := Result + ', ';
|
||||
//if SortItem.Order = sioAscending then
|
||||
// SortOrder := Connection.GetSQLSpecifity(spOrderAsc)
|
||||
//else
|
||||
// SortOrder := Connection.GetSQLSpecifity(spOrderDesc);
|
||||
//Result := Result + Connection.QuoteIdent(SortItem.Column) + ' ' + SortOrder;
|
||||
if SortItem.Order = sioAscending then
|
||||
SortOrder := Connection.GetSQLSpecifity(spOrderAsc)
|
||||
else
|
||||
SortOrder := Connection.GetSQLSpecifity(spOrderDesc);
|
||||
Result := Result + Connection.QuoteIdent(SortItem.Column) + ' ' + SortOrder;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -2080,6 +2080,7 @@ var
|
||||
State: TKeyboardState;
|
||||
begin
|
||||
// Checks whether a key is pressed, defined by virtual key code
|
||||
// Windows-only. Prefer "ssShift in GetKeyShiftState"
|
||||
GetKeyboardState(State);
|
||||
Result := (State[Code] and 128) <> 0;
|
||||
end;}
|
||||
|
152
source/main.lfm
152
source/main.lfm
@ -962,11 +962,11 @@ object MainForm: TMainForm
|
||||
Height = 316
|
||||
Top = 0
|
||||
Width = 780
|
||||
ActivePage = tabHost
|
||||
ActivePage = tabDatabase
|
||||
Align = alClient
|
||||
Images = ImageListIcons8
|
||||
PopupMenu = popupMainTabs
|
||||
TabIndex = 0
|
||||
TabIndex = 1
|
||||
TabOrder = 1
|
||||
OnChange = PageControlMainChange
|
||||
OnChanging = PageControlMainChanging
|
||||
@ -980,11 +980,11 @@ object MainForm: TMainForm
|
||||
Height = 283
|
||||
Top = 0
|
||||
Width = 772
|
||||
ActivePage = tabVariables
|
||||
ActivePage = tabCommandStats
|
||||
Align = alClient
|
||||
Images = ImageListIcons8
|
||||
PopupMenu = popupHost
|
||||
TabIndex = 1
|
||||
TabIndex = 4
|
||||
TabOrder = 0
|
||||
OnChange = PageControlHostChange
|
||||
object tabDatabases: TTabSheet
|
||||
@ -1059,6 +1059,7 @@ object MainForm: TMainForm
|
||||
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible, hoDisableAnimatedResize]
|
||||
Header.SortColumn = 0
|
||||
Images = ImageListIcons8
|
||||
IncrementalSearch = isInitializedOnly
|
||||
PopupMenu = popupHost
|
||||
TabOrder = 0
|
||||
TreeOptions.PaintOptions = [toHotTrack, toShowButtons, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toGhostedIfUnfocused, toUseExplorerTheme, toHideTreeLinesIfThemed]
|
||||
@ -1110,6 +1111,7 @@ object MainForm: TMainForm
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible, hoDisableAnimatedResize]
|
||||
Header.SortColumn = 0
|
||||
Images = ImageListIcons8
|
||||
IncrementalSearch = isInitializedOnly
|
||||
ParentShowHint = False
|
||||
PopupMenu = popupHost
|
||||
ShowHint = True
|
||||
@ -1863,11 +1865,147 @@ object MainForm: TMainForm
|
||||
Width = 772
|
||||
Align = alClient
|
||||
DefaultText = 'Node'
|
||||
Header.AutoSizeIndex = 0
|
||||
Header.Columns = <>
|
||||
Header.MainColumn = -1
|
||||
EditDelay = 500
|
||||
Header.AutoSizeIndex = -1
|
||||
Header.Columns = <
|
||||
item
|
||||
Position = 0
|
||||
Text = 'Name'
|
||||
Width = 120
|
||||
end
|
||||
item
|
||||
Position = 1
|
||||
Text = 'Rows'
|
||||
Width = 70
|
||||
end
|
||||
item
|
||||
Position = 2
|
||||
Text = 'Size'
|
||||
Width = 70
|
||||
end
|
||||
item
|
||||
Position = 3
|
||||
Text = 'Created'
|
||||
Width = 120
|
||||
end
|
||||
item
|
||||
Position = 4
|
||||
Text = 'Updated'
|
||||
Width = 120
|
||||
end
|
||||
item
|
||||
Position = 5
|
||||
Text = 'Engine'
|
||||
Width = 70
|
||||
end
|
||||
item
|
||||
Position = 6
|
||||
Text = 'Comment'
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark]
|
||||
Position = 7
|
||||
Text = 'Version'
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark]
|
||||
Position = 8
|
||||
Text = 'Row format'
|
||||
Width = 70
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark]
|
||||
Position = 9
|
||||
Text = 'Avg row length'
|
||||
Width = 70
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark]
|
||||
Position = 10
|
||||
Text = 'Max data length'
|
||||
Width = 70
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark]
|
||||
Position = 11
|
||||
Text = 'Index length'
|
||||
Width = 70
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark]
|
||||
Position = 12
|
||||
Text = 'Data free'
|
||||
Width = 70
|
||||
end
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark]
|
||||
Position = 13
|
||||
Text = 'Auto increment'
|
||||
Width = 90
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark]
|
||||
Position = 14
|
||||
Text = 'Check time'
|
||||
Width = 120
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark]
|
||||
Position = 15
|
||||
Text = 'Collation'
|
||||
Width = 70
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark]
|
||||
Position = 16
|
||||
Text = 'Checksum'
|
||||
Width = 70
|
||||
end
|
||||
item
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark]
|
||||
Position = 17
|
||||
Text = 'Create options'
|
||||
Width = 70
|
||||
end
|
||||
item
|
||||
Position = 18
|
||||
Text = 'Type'
|
||||
end>
|
||||
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible, hoDisableAnimatedResize]
|
||||
Header.SortColumn = 0
|
||||
HintMode = hmTooltip
|
||||
Images = ImageListIcons8
|
||||
IncrementalSearch = isInitializedOnly
|
||||
ParentShowHint = False
|
||||
PopupMenu = popupDB
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes, toAutoChangeScale]
|
||||
TreeOptions.MiscOptions = [toEditable, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toEditOnClick]
|
||||
TreeOptions.PaintOptions = [toHotTrack, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toUseExplorerTheme]
|
||||
TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect, toRightClickSelect]
|
||||
OnAfterPaint = AnyGridAfterPaint
|
||||
OnBeforeCellPaint = ListTablesBeforeCellPaint
|
||||
OnBeforePaint = ListTablesBeforePaint
|
||||
OnChange = ListTablesChange
|
||||
OnCompareNodes = AnyGridCompareNodes
|
||||
OnDblClick = ListTablesDblClick
|
||||
OnEditing = ListTablesEditing
|
||||
OnGetText = ListTablesGetText
|
||||
OnGetImageIndex = ListTablesGetImageIndex
|
||||
OnGetHint = AnyGridGetHint
|
||||
OnGetNodeDataSize = ListTablesGetNodeDataSize
|
||||
OnHeaderClick = AnyGridHeaderClick
|
||||
OnHeaderDraggedOut = AnyGridHeaderDraggedOut
|
||||
OnInitNode = ListTablesInitNode
|
||||
OnKeyPress = ListTablesKeyPress
|
||||
OnNewText = ListTablesNewText
|
||||
end
|
||||
end
|
||||
object tabEditor: TTabSheet
|
||||
|
126
source/main.pas
126
source/main.pas
@ -11,7 +11,7 @@ uses
|
||||
SynGutter, SynGutterChanges, SynGutterCodeFolding, SynGutterLineNumber,
|
||||
SynGutterMarks, StrUtils, laz.VirtualTrees, RegExpr, Buttons, StdCtrls,
|
||||
fphttpclient, Math, LCLIntf, Generics.Collections, Generics.Defaults,
|
||||
opensslsockets, StdActns, Clipbrd, Types, dbconnection, dbstructures,
|
||||
opensslsockets, StdActns, Clipbrd, Types, LCLType, dbconnection, dbstructures,
|
||||
dbstructures.mysql, generic_types, apphelpers;
|
||||
|
||||
|
||||
@ -838,7 +838,7 @@ type
|
||||
procedure actWebbrowse(Sender: TObject);
|
||||
procedure popupQueryPopup(Sender: TObject);
|
||||
procedure btnDataClick(Sender: TObject);
|
||||
//procedure ListTablesChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
procedure ListTablesChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
//procedure SynCompletionProposalAfterCodeCompletion(Sender: TObject;
|
||||
// const Value: String; Shift: TShiftState; Index: Integer; EndToken: Char);
|
||||
//procedure SynCompletionProposalCodeCompletion(Sender: TObject;
|
||||
@ -856,8 +856,8 @@ type
|
||||
procedure LogSQL(Msg: String; Category: TDBLogCategory=lcInfo; Connection: TDBConnection=nil);
|
||||
procedure KillProcess(Sender: TObject);
|
||||
procedure TimerHostUptimeTimer(Sender: TObject);
|
||||
//procedure ListTablesNewText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
// Column: TColumnIndex; NewText: String);
|
||||
procedure ListTablesNewText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex; NewText: String);
|
||||
procedure TimerConnectedTimer(Sender: TObject);
|
||||
procedure QuickFilterClick(Sender: TObject);
|
||||
procedure AutoRefreshSetInterval(Sender: TObject);
|
||||
@ -886,8 +886,8 @@ type
|
||||
// TColumnIndex; TextType: TVSTTextType; var CellText: String);
|
||||
//procedure DataGridHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
//procedure AnyGridKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
//procedure AnyGridMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer;
|
||||
// MousePos: TPoint; var Handled: Boolean);
|
||||
procedure AnyGridMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer;
|
||||
MousePos: TPoint; var Handled: Boolean);
|
||||
//procedure AnyGridNewText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column:
|
||||
// TColumnIndex; NewText: String);
|
||||
//procedure AnyGridPaintText(Sender: TBaseVirtualTree; const TargetCanvas:
|
||||
@ -901,8 +901,8 @@ type
|
||||
PVirtualNode; Column: TColumnIndex; var Result: Integer);
|
||||
procedure AnyGridHeaderDraggedOut(Sender: TVTHeader; Column: TColumnIndex;
|
||||
DropPosition: TPoint);
|
||||
//procedure AnyGridIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: String;
|
||||
// var Result: Integer);
|
||||
procedure AnyGridIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: String;
|
||||
var Result: Integer);
|
||||
procedure SetMainTab(Page: TTabSheet);
|
||||
procedure DBtreeFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex);
|
||||
@ -927,9 +927,9 @@ type
|
||||
procedure AnyGridGetHint(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex; var LineBreakStyle: TVTTooltipLineBreakStyle; var
|
||||
HintText: String);
|
||||
//procedure ListTablesBeforeCellPaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas;
|
||||
// Node: PVirtualNode; Column: TColumnIndex; CellPaintMode: TVTCellPaintMode; CellRect: TRect;
|
||||
// var ContentRect: TRect);
|
||||
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 editFilterVTChange(Sender: TObject);
|
||||
procedure ListVariablesDblClick(Sender: TObject);
|
||||
@ -955,14 +955,14 @@ type
|
||||
procedure HostListBeforeCellPaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas;
|
||||
Node: PVirtualNode; Column: TColumnIndex; CellPaintMode: TVTCellPaintMode; CellRect: TRect;
|
||||
var ContentRect: TRect);
|
||||
//procedure ListTablesBeforePaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas);
|
||||
//procedure ListTablesGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; Kind: TVTImageKind;
|
||||
// Column: TColumnIndex; var Ghosted: Boolean; var ImageIndex: TImageIndex);
|
||||
//procedure ListTablesGetNodeDataSize(Sender: TBaseVirtualTree; var NodeDataSize: Integer);
|
||||
//procedure ListTablesGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
// Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
|
||||
//procedure ListTablesInitNode(Sender: TBaseVirtualTree; ParentNode,
|
||||
// Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
|
||||
procedure ListTablesBeforePaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas);
|
||||
procedure ListTablesGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; Kind: TVTImageKind;
|
||||
Column: TColumnIndex; var Ghosted: Boolean; var ImageIndex: TImageIndex);
|
||||
procedure ListTablesGetNodeDataSize(Sender: TBaseVirtualTree; var NodeDataSize: Integer);
|
||||
procedure ListTablesGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
|
||||
procedure ListTablesInitNode(Sender: TBaseVirtualTree; ParentNode,
|
||||
Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
|
||||
procedure AnyGridAfterPaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas);
|
||||
procedure actFollowForeignKeyExecute(Sender: TObject);
|
||||
procedure actCopyOrCutExecute(Sender: TObject);
|
||||
@ -970,10 +970,10 @@ type
|
||||
procedure actSelectAllExecute(Sender: TObject);
|
||||
//procedure EnumerateRecentFilters;
|
||||
procedure LoadRecentFilter(Sender: TObject);
|
||||
//procedure ListTablesEditing(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
// Column: TColumnIndex; var Allowed: Boolean);
|
||||
procedure ListTablesEditing(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex; var Allowed: Boolean);
|
||||
procedure DBtreeChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
//procedure ListTablesDblClick(Sender: TObject);
|
||||
procedure ListTablesDblClick(Sender: TObject);
|
||||
//procedure panelTopDblClick(Sender: TObject);
|
||||
//procedure PageControlMainMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure actNewQueryTabExecute(Sender: TObject);
|
||||
@ -1007,7 +1007,7 @@ type
|
||||
//procedure SynMemoQueryPaintTransient(Sender: TObject; Canvas: TCanvas;
|
||||
// TransientType: TTransientType);
|
||||
procedure actQueryFindAgainExecute(Sender: TObject);
|
||||
//procedure AnyGridScroll(Sender: TBaseVirtualTree; DeltaX, DeltaY: Integer);
|
||||
procedure AnyGridScroll(Sender: TBaseVirtualTree; DeltaX, DeltaY: Integer);
|
||||
procedure lblExplainProcessClick(Sender: TObject);
|
||||
procedure actDataShowNextExecute(Sender: TObject);
|
||||
procedure actDataShowAllExecute(Sender: TObject);
|
||||
@ -1015,7 +1015,7 @@ type
|
||||
Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
|
||||
//procedure AnyGridFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
// Column: TColumnIndex);
|
||||
//procedure ListTablesKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure ListTablesKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure DBtreeFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
procedure ListDatabasesBeforePaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas);
|
||||
procedure ListDatabasesGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
@ -2922,8 +2922,8 @@ begin
|
||||
m := SynMemoSQLLog;
|
||||
//m.Gutter.LineNumberStart := m.Gutter.LineNumberStart + m.Lines.Count;
|
||||
end else begin
|
||||
//m := SynMemoFilter;
|
||||
//editFilterSearch.Clear;
|
||||
m := SynMemoFilter;
|
||||
editFilterSearch.Clear;
|
||||
end;
|
||||
m.SelectAll;
|
||||
m.SelText := '';
|
||||
@ -2934,9 +2934,9 @@ begin
|
||||
QueryTabs.ActiveTab.Memo.Modified := False;
|
||||
QueryTabs.ActiveTab.Uid := '';
|
||||
end;
|
||||
//if m = SynMemoFilter then begin
|
||||
// InvalidateVT(DataGrid, VTREE_NOTLOADED_PURGECACHE, False);
|
||||
//end;
|
||||
if m = SynMemoFilter then begin
|
||||
InvalidateVT(DataGrid, VTREE_NOTLOADED_PURGECACHE, False);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -2996,7 +2996,7 @@ var
|
||||
begin
|
||||
// Mark focused column as UNIX timestamp column
|
||||
AppSettings.SessionPath := GetRegKeyTable;
|
||||
//GridColumn := DataGrid.Header.Columns[DataGrid.FocusedColumn];
|
||||
GridColumn := DataGrid.Header.Columns[DataGrid.FocusedColumn];
|
||||
FocusedColumnName := GridColumn.Text;
|
||||
i := SelectedTableTimestampColumns.IndexOf(FocusedColumnName);
|
||||
if i > -1 then
|
||||
@ -3706,7 +3706,7 @@ begin
|
||||
Exit;
|
||||
Screen.Cursor := crHourGlass;
|
||||
try
|
||||
{ShowStatusMsg(_('Loading contents into image viewer ...'));
|
||||
ShowStatusMsg(_('Loading contents into image viewer ...'));
|
||||
lblPreviewTitle.Caption := _('Loading ...');
|
||||
lblPreviewTitle.Repaint;
|
||||
imgPreview.Picture := nil;
|
||||
@ -3734,7 +3734,7 @@ begin
|
||||
Graphic := TBitmap.Create;
|
||||
end else if Copy(Header, 2, 3) = 'PNG' then begin
|
||||
ImgType := 'PNG';
|
||||
Graphic := TPngImage.Create;
|
||||
Graphic := TPortableNetworkGraphic.Create;
|
||||
end;
|
||||
if Assigned(Graphic) then begin
|
||||
try
|
||||
@ -3750,9 +3750,9 @@ begin
|
||||
end;
|
||||
FreeAndNil(ContentStream);
|
||||
end else
|
||||
lblPreviewTitle.Caption := f_('No image detected, %s', [FormatByteNumber(StrLen)]);}
|
||||
lblPreviewTitle.Caption := f_('No image detected, %s', [FormatByteNumber(StrLen)]);
|
||||
finally
|
||||
//lblPreviewTitle.Hint := lblPreviewTitle.Caption;
|
||||
lblPreviewTitle.Hint := lblPreviewTitle.Caption;
|
||||
ShowStatusMsg;
|
||||
Screen.Cursor := crDefault;
|
||||
end;
|
||||
@ -6342,7 +6342,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{procedure TMainForm.ListTablesBeforePaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas);
|
||||
procedure TMainForm.ListTablesBeforePaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas);
|
||||
var
|
||||
i, NumObj: Integer;
|
||||
Obj: TDBObject;
|
||||
@ -6408,10 +6408,10 @@ begin
|
||||
ShowStatusMsg;
|
||||
ValidateControls(Self);
|
||||
Screen.Cursor := crDefault;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{procedure TMainForm.ListTablesGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
procedure TMainForm.ListTablesGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Kind: TVTImageKind; Column: TColumnIndex; var Ghosted: Boolean; var ImageIndex: TImageIndex);
|
||||
var
|
||||
Obj: PDBObject;
|
||||
@ -6425,17 +6425,17 @@ begin
|
||||
ikOverlay:
|
||||
ImageIndex := Obj.OverlayImageIndex;
|
||||
end;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{procedure TMainForm.ListTablesGetNodeDataSize(Sender: TBaseVirtualTree;
|
||||
procedure TMainForm.ListTablesGetNodeDataSize(Sender: TBaseVirtualTree;
|
||||
var NodeDataSize: Integer);
|
||||
begin
|
||||
NodeDataSize := SizeOf(TDBObject);
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{procedure TMainForm.ListTablesGetText(Sender: TBaseVirtualTree;
|
||||
procedure TMainForm.ListTablesGetText(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
|
||||
var CellText: string);
|
||||
var
|
||||
@ -6471,10 +6471,10 @@ begin
|
||||
17: CellText := Obj.CreateOptions;
|
||||
18: CellText := Obj.ObjType;
|
||||
end;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{procedure TMainForm.ListTablesInitNode(Sender: TBaseVirtualTree; ParentNode,
|
||||
procedure TMainForm.ListTablesInitNode(Sender: TBaseVirtualTree; ParentNode,
|
||||
Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
|
||||
var
|
||||
Obj: PDBObject;
|
||||
@ -6490,14 +6490,14 @@ begin
|
||||
Obj^ := nil;
|
||||
LogSQL('InitNode on '+Sender.Name+' failed, due to no connection or no database set. Database: "'+Conn.Database+'"', lcDebug);
|
||||
end;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{***
|
||||
Selection in ListTables is changing
|
||||
}
|
||||
{procedure TMainForm.ListTablesChange(Sender: TBaseVirtualTree; Node:
|
||||
procedure TMainForm.ListTablesChange(Sender: TBaseVirtualTree; Node:
|
||||
PVirtualNode);
|
||||
var
|
||||
Msg: String;
|
||||
@ -6508,7 +6508,7 @@ begin
|
||||
else
|
||||
Msg := '';
|
||||
ShowStatusMsg(Msg, 1)
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{***
|
||||
@ -7298,7 +7298,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{procedure TMainForm.ListTablesEditing(Sender: TBaseVirtualTree;
|
||||
procedure TMainForm.ListTablesEditing(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex; var Allowed: Boolean);
|
||||
var
|
||||
Obj: PDBObject;
|
||||
@ -7308,13 +7308,13 @@ begin
|
||||
Obj := Sender.GetNodeData(Node);
|
||||
Allowed := Obj.NodeType in [lntTable, lntView];
|
||||
end;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{***
|
||||
Rename table after checking the new name for invalid characters
|
||||
}
|
||||
{procedure TMainForm.ListTablesNewText(Sender: TBaseVirtualTree; Node:
|
||||
procedure TMainForm.ListTablesNewText(Sender: TBaseVirtualTree; Node:
|
||||
PVirtualNode; Column: TColumnIndex; NewText: String);
|
||||
var
|
||||
Obj: PDBObject;
|
||||
@ -7351,7 +7351,7 @@ begin
|
||||
on E:EDbError do
|
||||
ErrorDialog(E.Message);
|
||||
end;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
procedure TMainForm.TimerConnectedTimer(Sender: TObject);
|
||||
@ -8979,7 +8979,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{procedure TMainForm.AnyGridIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
procedure TMainForm.AnyGridIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
const SearchText: String; var Result: Integer);
|
||||
var
|
||||
CellText: String;
|
||||
@ -8991,10 +8991,10 @@ begin
|
||||
Exit;
|
||||
CellText := VT.Text[Node, VT.FocusedColumn];
|
||||
Result := StrLIComp(PChar(CellText), PChar(SearchText), Length(SearchText));
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{procedure TMainForm.ListTablesBeforeCellPaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas;
|
||||
procedure TMainForm.ListTablesBeforeCellPaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas;
|
||||
Node: PVirtualNode; Column: TColumnIndex; CellPaintMode: TVTCellPaintMode; CellRect: TRect;
|
||||
var ContentRect: TRect);
|
||||
var
|
||||
@ -9010,7 +9010,7 @@ begin
|
||||
2: PaintColorBar(Obj.Size, FDBObjectsMaxSize, TargetCanvas, CellRect);
|
||||
end;
|
||||
end;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
function TMainForm.GetAlternatingRowBackground(Node: PVirtualNode): TColor;
|
||||
@ -10617,7 +10617,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{procedure TMainForm.AnyGridMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer;
|
||||
procedure TMainForm.AnyGridMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer;
|
||||
MousePos: TPoint; var Handled: Boolean);
|
||||
var
|
||||
VT: TVirtualStringTree;
|
||||
@ -10637,7 +10637,7 @@ begin
|
||||
Handled := True;
|
||||
end;
|
||||
end;
|
||||
end else if KeyPressed(VK_CONTROL) then begin
|
||||
end else if ssCtrl in GetKeyShiftState then begin
|
||||
// Change font size with MouseWheel
|
||||
if AppSettings.ReadBool(asWheelZoom) then begin
|
||||
NewFontSize := VT.Font.Size;
|
||||
@ -10655,7 +10655,7 @@ begin
|
||||
VT.OffsetX := VT.OffsetX + WheelDelta;
|
||||
Handled := True;
|
||||
end;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{**
|
||||
@ -12225,15 +12225,15 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{procedure TMainForm.ListTablesKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure TMainForm.ListTablesKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
// Open object editor on pressing Enter
|
||||
if Ord(Key) = VK_RETURN then
|
||||
ListTables.OnDblClick(Sender);
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
{procedure TMainForm.ListTablesDblClick(Sender: TObject);
|
||||
procedure TMainForm.ListTablesDblClick(Sender: TObject);
|
||||
var
|
||||
Obj: PDBObject;
|
||||
vt: TVirtualStringTree;
|
||||
@ -12246,7 +12246,7 @@ begin
|
||||
// Normally the editor tab is active now, but not when same node was focused before
|
||||
SetMainTab(tabEditor);
|
||||
end;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
procedure TMainForm.actNewQueryTabExecute(Sender: TObject);
|
||||
@ -13710,14 +13710,14 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{procedure TMainForm.AnyGridScroll(Sender: TBaseVirtualTree; DeltaX, DeltaY: Integer);
|
||||
procedure TMainForm.AnyGridScroll(Sender: TBaseVirtualTree; DeltaX, DeltaY: Integer);
|
||||
begin
|
||||
// A tree gets scrolled only when the mouse is over it - see FormMouseWheel
|
||||
// Our home brewn cell editors do not reposition when the underlying tree scrolls.
|
||||
// To avoid confusion, terminate editors then.
|
||||
if Sender.IsEditing and (DeltaX=0) then
|
||||
Sender.EndEditNode;
|
||||
end;}
|
||||
end;
|
||||
|
||||
|
||||
procedure TMainForm.lblExplainProcessClick(Sender: TObject);
|
||||
|
Reference in New Issue
Block a user