Skip to content
Commits on Source (5)
This diff is collapsed.
......@@ -261,7 +261,7 @@ Private Sub FillDatabaseList()
lvwDatabase.Clear
For Each sName In aName
lvwDatabase.Add(sName, sName, Picture["img/16/database.png"]).Selected = sName = Trim(txtDatabase.Text)
lvwDatabase.Add(sName, sName, Picture["icon:/16/database"]).Selected = sName = Trim(txtDatabase.Text)
Next
Try lvwDatabase[Trim(txtDatabase.Text)].Selected = True
UpdateCreateDatabase
......
......@@ -2,7 +2,7 @@
{ Form Form
MoveScaled(0,0,103,91)
Icon = Picture["img/16/database.png"]
Icon = Picture["icon:/small/database"]
Resizable = False
Arrangement = Arrange.Vertical
AutoResize = True
......
......@@ -387,7 +387,7 @@ Public Sub FillViewWithTables(lvwTable As TreeView, hConn As Connection, bShowSy
If hTable.System Then
lvwTable.Add("S" & hTable.Name, sName, Picture["img/16/system-table.png"], sParent)
Else
lvwTable.Add("T" & hTable.Name, sName, Picture["img/16/table.png"], sParent)
lvwTable.Add("T" & hTable.Name, sName, Picture["icon:/16/table"], sParent)
Endif
Next
......
......@@ -14,11 +14,11 @@
}
{ mnuWatch Menu
Text = ("Watch")
Picture = Picture["img/16/watch.png"]
Picture = Picture["icon:/small/watch"]
}
{ mnuPrint Menu
Text = ("Print to console")
Picture = Picture["img/16/console.png"]
Picture = Picture["icon:/small/terminal"]
}
{ Menu1 Menu
}
......
......@@ -54,7 +54,7 @@ Public Sub _new()
.Columns[0].Width = DS * 16
.Columns[0].Text = ("File")
.Columns[1].Width = DS * 16
.Columns[1].Text = ("Procedure")
.Columns[1].Text = ("Location")
.Columns[2].Width = DS * 6
.Columns[2].Text = ("Line")
.Columns[3].Width = DS * 6
......
......@@ -80,7 +80,6 @@
}
Index = 1
Text = ("Console")
Picture = Picture["img/16/console.png"]
{ panConsole Panel
MoveScaled(5,4,24,24)
Expand = True
......@@ -88,7 +87,6 @@
}
Index = 2
Text = ("Breakpoints")
Picture = Picture["img/16/breakpoint.png"]
{ panBreakpoint HBox
MoveScaled(0,0,76,4)
{ btnRemoveBreakpoint ToolButton
......@@ -142,7 +140,6 @@
}
Index = 3
Text = ("Warnings")
Picture = Picture["img/16/warning.png"]
{ Panel2 HBox
MoveScaled(28,9,53,24)
Expand = True
......@@ -159,7 +156,6 @@
}
Index = 4
Text = ("Tasks")
Picture = Picture["img/16/task.png"]
{ Panel3 HBox
MoveScaled(10,10,61,24)
Expand = True
......@@ -179,7 +175,6 @@
}
Index = 5
Text = ("Search result")
Picture = Picture["icon:/small/find"]
{ panSearch HBox
MoveScaled(1,0,83,4)
{ btnCancelSearch ToolButton
......
......@@ -683,7 +683,7 @@ End
Private Sub FillWithSpecial()
Dim sName As String
Dim hPict As Picture = Picture["img/16/point.png"]
Dim hPict As Picture = Picture["img/symbol/special.png"]
ClearRows
......
......@@ -179,7 +179,7 @@
{ mnuWatch Menu
Action = ".watch"
Text = Shortcut(("Watch expression"), "W")
Picture = Picture["img/16/watch.png"]
Picture = Picture["icon:/small/watch"]
}
{ mnuSepBookmark Menu
}
......
......@@ -829,9 +829,9 @@ Public Sub SetPosition(hResult As CFindResult, Optional bJustCheck As Boolean) A
End
Public Sub Replace(sReplace As String)
Public Sub Replace(sReplace As String) As Boolean
$hEditor.Replace(sReplace)
Return $hEditor.Replace(sReplace)
End
......
......@@ -1623,7 +1623,7 @@ Public Sub btnNewTable_Click()
If MConnection.CreateTable($hConn, sName, FNewTable.TableType) Then Return
lvwTable.Add("T" & sName, sName, Picture["img/16/table.png"])
lvwTable.Add("T" & sName, sName, Picture["icon:/16/table"])
'lvwTable["T" & sName].Selected = True
LoadTable(sName)
......
......@@ -11,7 +11,7 @@
{ btnTitle ToolButton
MoveScaled(0,0,4,4)
Action = ".database"
Picture = Picture["img/16/database.png"]
Picture = Picture["icon:/small/database"]
}
{ btnShowSystem ToolButton
MoveScaled(4,0,4,4)
......@@ -225,7 +225,7 @@
Index = 0
}
{ panRequest VBox
MoveScaled(6,10,61,24)
MoveScaled(6,8,61,24)
Visible = False
Background = Color.Background
{ tlbData2 ToolBar
......@@ -401,7 +401,7 @@
{ Actions
{ Action database
Text = ""
Picture = "img/16/database.png"
Picture = "icon:/small/database"
}
{ Action reload
Text = "Reload"
......
......@@ -3,7 +3,7 @@
{ Form Form
MoveScaled(0,0,53,19)
Text = ("New table")
Icon = Picture["img/16/table.png"]
Icon = Picture["icon:/small/table"]
Resizable = False
Arrangement = Arrange.Vertical
AutoResize = True
......
......@@ -4,6 +4,7 @@ Class Shortcut
Public Path As String
Public Family As String
Public Age As Integer '' The text age. It is incremented each time the text is modified
Public Master As CControl
Public Selection As New Collection
......@@ -1647,7 +1648,7 @@ Public Sub UpdateInfo(hCCtrl As CControl)
$cInfo = ["Name": hCCtrl.Name, "Kind": hCCtrl.Kind, "X": hCCtrl.X, "Y": hCCtrl.Y, "Width": hCCtrl.Width, "Height": hCCtrl.Height]
dwgInfo.Resize(dwgInfo.Font.TextWidth("99999") * 4 + Desktop.Scale * 8, dwgInfo.Font.Height * 2 + Desktop.Scale * 2)
dwgInfo.Resize(dwgInfo.Font.TextWidth("999999") * 4 + Desktop.Scale * 8, dwgInfo.Font.Height * 2 + Desktop.Scale * 2)
dwgInfo.Tag = sText
MoveInfo
......@@ -1930,6 +1931,9 @@ Public Sub Modify(Optional bReset As Boolean)
ResetClassScan
Inc Project.TimeStamp
Inc Age
FSearch.OnFileChange(Me.Path)
$bModify = Not bReset
DrawTitle
......@@ -3729,7 +3733,19 @@ End
Public Sub GetText() As String
Return
Dim sSave As String
ResetSave
AddLine(Project.FORM_MAGIC)
AddLine()
SaveOne(RootControl)
'SaveAction
sSave = $sSave
$sSave = ""
Return sSave
' Dim bModify As Boolean = $bModify
' ResetSave
......@@ -3744,12 +3760,24 @@ Public Sub GetPosition() As Integer
End
Public Sub SetPosition((hResult) As CFindResult, Optional (bJustCheck) As Boolean) As Boolean
Public Sub SetPosition(hResult As CFindResult, Optional bJustCheck As Boolean) As Boolean
Dim sName As String = hResult.GetLocation()
Dim aName As String[]
If bJustCheck Then
If Not sName Then Return True
Else
aName = Split(sName, ".")
Try SelectControl(aName[0])
If Not Error Then FProperty.FocusOn(aName[1])
Endif
End
Public Sub Replace((sReplace) As String)
Public Sub Replace((sReplace) As String) As Boolean
Return True
'Editor.Replace(sReplace)
End
......@@ -4356,3 +4384,35 @@ Public Sub dwgInfo_Draw()
Paint.DrawText($cInfo!Height, X + DS, Y, W, H, Align.Left)
End
Public Sub GetLocation(iLine As Integer) As String
Dim aText As String[]
Dim sLine As String
Dim iPos As Integer
Dim sProperty As String
Dim iLevel As Integer
aText = Split(GetText(), "\n")
Dec iLine
If iLine > aText.Max Then Return
sLine = Trim(aText[iLine])
iPos = InStr(sLine, " = ")
If iPos = 0 Then Return
sProperty = Left(sLine, iPos - 1)
While iLine >= 0
sLine = Trim(aText[iLine])
If sLine = "}" Then
Inc iLevel
Else If sLine Begins "{ " Then
If iLevel Then
Dec iLevel
Else
Return Split(sLine, " ")[1] & "." & sProperty
Endif
Endif
Dec iLine
Wend
End
......@@ -612,9 +612,6 @@ Private Sub ShowProperty(Optional sFocus As String)
If Project.Running Then Return
If Not $hForm Then Return
If $hForm.ReadOnly Then Return
If grdProperty.Row < 0 Then Return
If $sLast Then HideProperty()
If $sFocus Then sFocus = $sFocus
......@@ -623,6 +620,10 @@ Private Sub ShowProperty(Optional sFocus As String)
If iRow >= 0 Then grdProperty.Row = iRow
Endif
If grdProperty.Row < 0 Then Return
If $sLast Then HideProperty()
$bButton = False
If grdProperty.Row = 0 Then Return
......@@ -846,14 +847,14 @@ Private Sub ShowProperty(Optional sFocus As String)
txtProperty.Button = bButton
'btnProperty.Raise
$hEditor.SetFocus
If $hEditor = txtProperty Then
'IF NOT txtProperty.ReadOnly THEN
txtProperty.Editor.SetFocus
txtProperty.Editor.SelectAll
'ENDIF
Else If $hEditor = spnProperty Then
spnProperty.SetFocus
spnProperty.SelectAll
Else
$hEditor.SetFocus
Endif
End
......
......@@ -601,10 +601,10 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer, hStat As Stat
Case "connection"
If Exist(File.SetExt(sPath, "template")) Then bExported = True
sIcon = sLocalPrefix &/ "database.png"
sIcon = sPrefix &/ "database"
Case "console"
sIcon = sLocalPrefix &/ "console.png"
sIcon = sPrefix &/ "terminal"
Case Else
Try hImage = DesktopMime.FromFile(sPath).GetIcon(If(iSize, iSize, 16))
......
......@@ -12,18 +12,24 @@ Public Dark As Boolean
Public Control As String
Public {Property} As String
Private $sProc As String
Private $sWhere As String
Public Sub GetProcedure() As String
Public Sub GetLocation() As String
Dim hFile As FEditor
Dim hFile As Object
If Not Project.IsSourcePath(Path) Then Return
If $sProc Then Return $sProc
If $sWhere Then Return $sWhere
$sProc = "-"
$sWhere = "-"
Try hFile = Project.LoadFile(Path)
If hFile Then $sProc = hFile.GetProcAt({Line})
Return $sProc
If hFile Then
If hFile Is FEditor Or If hFile Is FTextEditor Then
$sWhere = hFile.GetProcAt({Line})
Else If hFile Is FForm Then
$sWhere = hFile.GetLocation({Line})
Endif
Endif
Return $sWhere
End
......@@ -954,7 +954,7 @@ Public Sub gvwFind_Data(Row As Integer, Column As Integer)
.Text = $aBrowse[Row].File
.Alignment = Align.Normal
Case 1
.Text = $aBrowse[Row].GetProcedure()
.Text = $aBrowse[Row].GetLocation()
.Alignment = Align.Normal
Case 2
.Text = CStr($aBrowse[Row].Line + 1) & " "
......@@ -1008,8 +1008,8 @@ Public Sub gvwFind_Select()
Try hForm = Project.OpenFile(hFind.Path)
If Not hForm Then Return
hForm.SetPosition(hFind, False)
Project.Activate(hForm)
hForm.SetPosition(hFind, False)
gvwFind.ScrollX = 0
......