Add a spinner to the test panel.
[DEVELOPMENT ENVIRONMENT] * BUG: If the program test crashes, then the fail test label is shown. * NEW: Add a spinner to the test panel. * NEW: Bigger Atari bomb icons.
This commit is contained in:
parent
5afcec8959
commit
53dd10bafe
8 changed files with 25 additions and 10 deletions
|
@ -439,6 +439,7 @@ Public Sub Process_Kill()
|
|||
|
||||
Dim sMsg As String
|
||||
Dim bTest As Boolean
|
||||
Dim bFail As Boolean
|
||||
|
||||
bTest = $bTest
|
||||
|
||||
|
@ -462,19 +463,18 @@ Public Sub Process_Kill()
|
|||
Case 15
|
||||
sMsg = ("The program has been terminated.")
|
||||
Default
|
||||
If bTest Then FDebugInfo.SetTestResult(True)
|
||||
bTest = False
|
||||
FCrash.Run($hProcess)
|
||||
End Select
|
||||
If sMsg Then FMain.ShowWarning(sMsg)
|
||||
Else If $hProcess.Value Then
|
||||
If bTest Then
|
||||
FDebugInfo.SetTestResult(True)
|
||||
Else
|
||||
FMain.ShowInfo(Subst(("The program has returned\nthe value: &1"), $hProcess.Value))
|
||||
Endif
|
||||
Else
|
||||
If bTest Then FDebugInfo.SetTestResult(False)
|
||||
If Not bTest Then FMain.ShowInfo(Subst(("The program has returned\nthe value: &1"), $hProcess.Value))
|
||||
bFail = True
|
||||
Endif
|
||||
|
||||
If bTest Then FDebugInfo.SetTestResult(bFail)
|
||||
|
||||
$hProcess = Null
|
||||
|
||||
If Project.Profiling Then
|
||||
|
|
|
@ -10,12 +10,15 @@
|
|||
Margin = True
|
||||
{ Panel6 HBox
|
||||
MoveScaled(1,1,67,22)
|
||||
Spacing = True
|
||||
{ Panel7 VBox
|
||||
MoveScaled(1,0,13,21)
|
||||
Margin = True
|
||||
{ picCrash PictureBox
|
||||
MoveScaled(0,0,12,12)
|
||||
Picture = Picture["img/64/atari.png"]
|
||||
MoveScaled(0,0,11,11)
|
||||
Picture = Picture["img/crash/atari.png"]
|
||||
Alignment = Align.Center
|
||||
Mode = PictureBox.Contain
|
||||
}
|
||||
}
|
||||
{ Panel2 VBox
|
||||
|
|
|
@ -923,6 +923,7 @@ Public Sub OnProjectChange()
|
|||
CloseSearch
|
||||
trmVersionControl.Clear
|
||||
trmTest.Clear
|
||||
panTestResult.Hide
|
||||
|
||||
End
|
||||
|
||||
|
@ -1533,6 +1534,8 @@ End
|
|||
Public Sub btnTest_Click()
|
||||
|
||||
panTestResult.Hide
|
||||
spnTest.Show
|
||||
spnTest.Start
|
||||
Design.Test()
|
||||
|
||||
End
|
||||
|
@ -1553,6 +1556,9 @@ End
|
|||
|
||||
Public Sub SetTestResult(bFail As Boolean)
|
||||
|
||||
spnTest.Stop
|
||||
spnTest.Hide
|
||||
|
||||
If bFail Then
|
||||
lblTestResult.Text = ("Test has failed.")
|
||||
lblTestResult.Foreground = Color.DarkRed
|
||||
|
@ -1569,4 +1575,4 @@ Public Sub SetTestResult(bFail As Boolean)
|
|||
|
||||
panTestResult.Show
|
||||
|
||||
End
|
||||
End
|
||||
|
|
|
@ -207,6 +207,12 @@
|
|||
Text = ("Run test")
|
||||
Picture = Picture["icon:/small/ok"]
|
||||
}
|
||||
{ spnTest Spinner
|
||||
MoveScaled(27,0,4,4)
|
||||
Visible = False
|
||||
Margin = True
|
||||
Type = Spinner.Circle
|
||||
}
|
||||
{ panTestResult Panel
|
||||
MoveScaled(40,0,29,4)
|
||||
Visible = False
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 202 B |
Binary file not shown.
Before Width: | Height: | Size: 202 B |
BIN
app/src/gambas3/img/crash/atari-dark.png
Normal file
BIN
app/src/gambas3/img/crash/atari-dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 215 B |
BIN
app/src/gambas3/img/crash/atari.png
Normal file
BIN
app/src/gambas3/img/crash/atari.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 215 B |
Loading…
Reference in a new issue