Skip to content

Commit

Permalink
added question explanation options + fix undo icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Maerciezz committed Oct 28, 2021
1 parent c15acfa commit 1f9c845
Show file tree
Hide file tree
Showing 15 changed files with 172 additions and 74 deletions.
4 changes: 2 additions & 2 deletions FFF_Guest/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.0.13.0")>
<Assembly: AssemblyFileVersion("1.0.13.0")>
<Assembly: AssemblyVersion("1.0.30.0")>
<Assembly: AssemblyFileVersion("1.0.30.0")>
3 changes: 3 additions & 0 deletions FFF_Guest/frmMain.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions FFF_Guest/frmMain.vb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Public Class frmMain
Button1.Text = "Disconnect"
lblStatus.Text = "Client connected!"
grpSlot.Enabled = False
TextBox1.Enabled = False
Catch ex As Exception
xUpdate("Can't connect to the server!")
lblStatus.Text = "Error: Cannot connect to server."
Expand All @@ -59,6 +60,7 @@ Public Class frmMain
Button1.Text = "Connect"
lblStatus.Text = "Client disconnected!"
grpSlot.Enabled = True
TextBox1.Enabled = True
End Select
End Sub
Private Sub TextBox4_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox4.KeyDown
Expand Down Expand Up @@ -86,11 +88,13 @@ Public Class frmMain

If cmd = "/unlock" Then
grpAnswers.Enabled = True
Button1.Enabled = False
btnA.Text = "A"
btnB.Text = "B"
btnC.Text = "C"
btnD.Text = "D"
ElseIf cmd = "/lock" Then
Button1.Enabled = True
grpAnswers.Enabled = False
ElseIf cmd = "/clear" Then
btnA.Text = "A"
Expand Down
4 changes: 2 additions & 2 deletions Het DJG Toernooi/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.0.304.0")>
<Assembly: AssemblyFileVersion("1.0.304.0")>
<Assembly: AssemblyVersion("1.0.309.0")>
<Assembly: AssemblyFileVersion("1.0.309.0")>
17 changes: 11 additions & 6 deletions Het DJG Toernooi/Source_Scripts/QDatabase.vb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Public Class QDatabase
If Game.level = -1 Then
Dim ds As New DataSet
Dim sqlupdate As String
Dim sql = New SqlCommand("SELECT TOP 1 * FROM questions_Level0 Used = 'False' ORDER BY NEWID()", Data.connectionString)
Dim sql = New SqlCommand("SELECT TOP 1 * FROM questions_Level0 WHERE Used = 'False' ORDER BY NEWID()", Data.connectionString)
Try
Dim reader As SqlDataReader = sql.ExecuteReader
If reader.HasRows Then
Expand All @@ -35,6 +35,7 @@ Public Class QDatabase
ControlPanel.txtD.Text = reader.GetString(5)
ControlPanel.lblAnswer.Text = reader.GetString(6)
ControlPanel.txtID.Text = reader.GetInt32(0)
ControlPanel.txtExplain.Text = reader.GetString(9)
End If
End While
reader.Close()
Expand Down Expand Up @@ -76,6 +77,7 @@ Public Class QDatabase
ControlPanel.txtD.Text = ds.Tables("qLevel1").Rows(0).Item(5)
ControlPanel.lblAnswer.Text = ds.Tables("qLevel1").Rows(0).Item(6)
ControlPanel.txtID.Text = ds.Tables("qLevel1").Rows(0).Item(0)
ControlPanel.txtExplain.Text = ds.Tables("qLevel1").Rows(0).Item(9)

sqlupdate = "UPDATE questions_Level1 SET Used='True' WHERE Id = " & ControlPanel.txtID.Text
Dim cmd As SqlCommand = New SqlCommand(sqlupdate, Data.connectionString)
Expand All @@ -94,7 +96,7 @@ Public Class QDatabase
If Game.level >= 5 And Game.level < 10 Then
Dim ds As New DataSet
Dim sqlupdate As String
sql = "SELECT TOP 1 * FROM questions_Level2 Used = 'False' ORDER BY NEWID()"
sql = "SELECT TOP 1 * FROM questions_Level2 WHERE Used = 'False' ORDER BY NEWID()"
da = New SqlDataAdapter(sql, Data.connectionString)
da.Fill(ds, "qLevel2")
MaxRows = ds.Tables("qLevel2").Rows.Count
Expand All @@ -111,6 +113,7 @@ Public Class QDatabase
ControlPanel.txtD.Text = ds.Tables("qLevel2").Rows(0).Item(5)
ControlPanel.lblAnswer.Text = ds.Tables("qLevel2").Rows(0).Item(6)
ControlPanel.txtID.Text = ds.Tables("qLevel2").Rows(0).Item(0)
ControlPanel.txtExplain.Text = ds.Tables("qLevel2").Rows(0).Item(9)

sqlupdate = "UPDATE questions_Level2 SET Used='True' WHERE Id = " & ControlPanel.txtID.Text
Dim cmd As SqlCommand = New SqlCommand(sqlupdate, Data.connectionString)
Expand All @@ -126,10 +129,10 @@ Public Class QDatabase
End If

'Haalt een vraag uit de database (64.000 - 500.000 pt)
If Game.level >= 10 And Game.level < 15 Then
If Game.level >= 10 And Game.level < 14 Then
Dim ds As New DataSet
Dim sqlupdate As String
sql = "SELECT TOP 1 * FROM questions_Level3 Used = 'False' ORDER BY NEWID()"
sql = "SELECT TOP 1 * FROM questions_Level3 WHERE Used = 'False' ORDER BY NEWID()"
da = New SqlDataAdapter(sql, Data.connectionString)
da.Fill(ds, "qLevel3")
MaxRows = ds.Tables("qLevel3").Rows.Count
Expand All @@ -146,6 +149,7 @@ Public Class QDatabase
ControlPanel.txtD.Text = ds.Tables("qLevel3").Rows(0).Item(5)
ControlPanel.lblAnswer.Text = ds.Tables("qLevel3").Rows(0).Item(6)
ControlPanel.txtID.Text = ds.Tables("qLevel3").Rows(0).Item(0)
ControlPanel.txtExplain.Text = ds.Tables("qLevel3").Rows(0).Item(9)

sqlupdate = "UPDATE questions_Level3 SET Used='True' WHERE Id = " & ControlPanel.txtID.Text
Dim cmd As SqlCommand = New SqlCommand(sqlupdate, Data.connectionString)
Expand All @@ -161,10 +165,10 @@ Public Class QDatabase
End If

'Haalt een vraag uit de database (1.000.000 pt)
If Game.level = 15 Then
If Game.level = 14 Then
Dim ds As New DataSet
Dim sqlupdate As String
sql = "SELECT TOP 1 * FROM questions_Level4 Used = 'False' ORDER BY NEWID()"
sql = "SELECT TOP 1 * FROM questions_Level4 WHERE Used = 'False' ORDER BY NEWID()"
da = New SqlDataAdapter(sql, Data.connectionString)
da.Fill(ds, "qLevel4")
MaxRows = ds.Tables("qLevel4").Rows.Count
Expand All @@ -181,6 +185,7 @@ Public Class QDatabase
ControlPanel.txtD.Text = ds.Tables("qLevel4").Rows(0).Item(5)
ControlPanel.lblAnswer.Text = ds.Tables("qLevel4").Rows(0).Item(6)
ControlPanel.txtID.Text = ds.Tables("qLevel4").Rows(0).Item(0)
ControlPanel.txtExplain.Text = ds.Tables("qLevel4").Rows(0).Item(9)

sqlupdate = "UPDATE questions_Level4 SET Used='True' WHERE Id = " & ControlPanel.txtID.Text
Dim cmd As SqlCommand = New SqlCommand(sqlupdate, Data.connectionString)
Expand Down
2 changes: 1 addition & 1 deletion Het DJG Toernooi/The Millionaire Game.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<SuiteName>Het TeamDJG Toernooi</SuiteName>
<AutorunEnabled>true</AutorunEnabled>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>1.0.303.0</ApplicationVersion>
<ApplicationVersion>1.0.308.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
Expand Down
22 changes: 12 additions & 10 deletions Het DJG Toernooi/Windows/ControlPanel.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Het DJG Toernooi/Windows/ControlPanel.vb
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ Public Class ControlPanel
ElseIf i = 2 Then
HostScreen.pnlStrap.Visible = False
GuestScreen.pnlStrap.Visible = False
HostScreen.pnlAnswer.BackColor = Color.Black
HostScreen.txtQuestion.Text = ""
HostScreen.txtA.Text = ""
HostScreen.txtB.Text = ""
Expand Down
4 changes: 2 additions & 2 deletions Het DJG Toernooi/Windows/General/TVControlPnl.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Het DJG Toernooi/Windows/General/TVControlPnl.vb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Dim strstep As Integer = 0

Private Sub tmrFlash_Tick(sender As Object, e As EventArgs) Handles tmrFlash.Tick
If strstep <= 2 Then
If strstep <= 3 Then
If HostScreen.pnlAnswer.BackColor = Color.Lime Then
If ControlPanel.lblAnswer.Text = "A" Then
If i = 0 Then
Expand Down
Loading

0 comments on commit 1f9c845

Please sign in to comment.