diff --git a/FFF_Guest/My Project/AssemblyInfo.vb b/FFF_Guest/My Project/AssemblyInfo.vb index c5f376c..0abf710 100644 --- a/FFF_Guest/My Project/AssemblyInfo.vb +++ b/FFF_Guest/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' - - + + diff --git a/FFF_Guest/frmMain.Designer.vb b/FFF_Guest/frmMain.Designer.vb index 91966ee..b2b6d18 100644 --- a/FFF_Guest/frmMain.Designer.vb +++ b/FFF_Guest/frmMain.Designer.vb @@ -47,6 +47,7 @@ Partial Class frmMain ' 'TextBox1 ' + Me.TextBox1.Enabled = False Me.TextBox1.Location = New System.Drawing.Point(116, 21) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(170, 20) @@ -55,6 +56,7 @@ Partial Class frmMain ' 'Button1 ' + Me.Button1.Enabled = False Me.Button1.ForeColor = System.Drawing.Color.Black Me.Button1.Location = New System.Drawing.Point(405, 19) Me.Button1.Name = "Button1" @@ -250,6 +252,7 @@ Partial Class frmMain ' 'nmrSlot ' + Me.nmrSlot.Enabled = False Me.nmrSlot.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.nmrSlot.Location = New System.Drawing.Point(18, 20) Me.nmrSlot.Maximum = New Decimal(New Integer() {8, 0, 0, 0}) diff --git a/FFF_Guest/frmMain.vb b/FFF_Guest/frmMain.vb index d810f1e..b5107df 100644 --- a/FFF_Guest/frmMain.vb +++ b/FFF_Guest/frmMain.vb @@ -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." @@ -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 @@ -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" diff --git a/Het DJG Toernooi/My Project/AssemblyInfo.vb b/Het DJG Toernooi/My Project/AssemblyInfo.vb index 4b01c6f..12fc68b 100644 --- a/Het DJG Toernooi/My Project/AssemblyInfo.vb +++ b/Het DJG Toernooi/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' - - + + diff --git a/Het DJG Toernooi/Source_Scripts/QDatabase.vb b/Het DJG Toernooi/Source_Scripts/QDatabase.vb index e4b8a20..f424f0d 100644 --- a/Het DJG Toernooi/Source_Scripts/QDatabase.vb +++ b/Het DJG Toernooi/Source_Scripts/QDatabase.vb @@ -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 @@ -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() @@ -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) @@ -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 @@ -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) @@ -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 @@ -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) @@ -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 @@ -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) diff --git a/Het DJG Toernooi/The Millionaire Game.vbproj b/Het DJG Toernooi/The Millionaire Game.vbproj index 5d5b992..19a336c 100644 --- a/Het DJG Toernooi/The Millionaire Game.vbproj +++ b/Het DJG Toernooi/The Millionaire Game.vbproj @@ -28,7 +28,7 @@ Het TeamDJG Toernooi true 2 - 1.0.303.0 + 1.0.308.0 false true true diff --git a/Het DJG Toernooi/Windows/ControlPanel.Designer.vb b/Het DJG Toernooi/Windows/ControlPanel.Designer.vb index 165e6ec..840490c 100644 --- a/Het DJG Toernooi/Windows/ControlPanel.Designer.vb +++ b/Het DJG Toernooi/Windows/ControlPanel.Designer.vb @@ -747,6 +747,7 @@ Partial Class ControlPanel Me.txtExplain.Location = New System.Drawing.Point(346, 471) Me.txtExplain.Multiline = True Me.txtExplain.Name = "txtExplain" + Me.txtExplain.ReadOnly = True Me.txtExplain.Size = New System.Drawing.Size(249, 66) Me.txtExplain.TabIndex = 60 ' @@ -817,19 +818,19 @@ Partial Class ControlPanel 'QuestionsEditorToolStripMenuItem ' Me.QuestionsEditorToolStripMenuItem.Name = "QuestionsEditorToolStripMenuItem" - Me.QuestionsEditorToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.QuestionsEditorToolStripMenuItem.Size = New System.Drawing.Size(161, 22) Me.QuestionsEditorToolStripMenuItem.Text = "Questions Editor" ' 'ToolStripMenuItem1 ' Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1" - Me.ToolStripMenuItem1.Size = New System.Drawing.Size(177, 6) + Me.ToolStripMenuItem1.Size = New System.Drawing.Size(158, 6) Me.ToolStripMenuItem1.Visible = False ' 'ProfileEditorToolStripMenuItem ' Me.ProfileEditorToolStripMenuItem.Name = "ProfileEditorToolStripMenuItem" - Me.ProfileEditorToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.ProfileEditorToolStripMenuItem.Size = New System.Drawing.Size(161, 22) Me.ProfileEditorToolStripMenuItem.Text = "Profile Editor" Me.ProfileEditorToolStripMenuItem.Visible = False ' @@ -843,24 +844,24 @@ Partial Class ControlPanel 'HostScreenToolStripMenuItem ' Me.HostScreenToolStripMenuItem.Name = "HostScreenToolStripMenuItem" - Me.HostScreenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.HostScreenToolStripMenuItem.Size = New System.Drawing.Size(142, 22) Me.HostScreenToolStripMenuItem.Text = "Host Screen" ' 'GuestScreenToolStripMenuItem ' Me.GuestScreenToolStripMenuItem.Name = "GuestScreenToolStripMenuItem" - Me.GuestScreenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.GuestScreenToolStripMenuItem.Size = New System.Drawing.Size(142, 22) Me.GuestScreenToolStripMenuItem.Text = "Guest Screen" ' 'ToolStripMenuItem2 ' Me.ToolStripMenuItem2.Name = "ToolStripMenuItem2" - Me.ToolStripMenuItem2.Size = New System.Drawing.Size(177, 6) + Me.ToolStripMenuItem2.Size = New System.Drawing.Size(139, 6) ' 'TVScreenToolStripMenuItem ' Me.TVScreenToolStripMenuItem.Name = "TVScreenToolStripMenuItem" - Me.TVScreenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.TVScreenToolStripMenuItem.Size = New System.Drawing.Size(142, 22) Me.TVScreenToolStripMenuItem.Text = "TV Screen" ' 'OptionsToolStripMenuItem @@ -874,7 +875,7 @@ Partial Class ControlPanel 'AboutToolStripMenuItem ' Me.AboutToolStripMenuItem.Name = "AboutToolStripMenuItem" - Me.AboutToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.AboutToolStripMenuItem.Size = New System.Drawing.Size(107, 22) Me.AboutToolStripMenuItem.Text = "About" ' 'grpLifelines @@ -1093,12 +1094,13 @@ Partial Class ControlPanel 'btnUndo ' Me.btnUndo.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer)) + Me.btnUndo.BackgroundImage = Global.MillionaireGame.My.Resources.Resources._36973 Me.btnUndo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom Me.btnUndo.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnUndo.ForeColor = System.Drawing.SystemColors.ControlText - Me.btnUndo.Location = New System.Drawing.Point(577, 208) + Me.btnUndo.Location = New System.Drawing.Point(568, 208) Me.btnUndo.Name = "btnUndo" - Me.btnUndo.Size = New System.Drawing.Size(40, 26) + Me.btnUndo.Size = New System.Drawing.Size(49, 26) Me.btnUndo.TabIndex = 81 Me.btnUndo.UseVisualStyleBackColor = False ' diff --git a/Het DJG Toernooi/Windows/ControlPanel.vb b/Het DJG Toernooi/Windows/ControlPanel.vb index 7156f7d..ffe155e 100644 --- a/Het DJG Toernooi/Windows/ControlPanel.vb +++ b/Het DJG Toernooi/Windows/ControlPanel.vb @@ -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 = "" diff --git a/Het DJG Toernooi/Windows/General/TVControlPnl.Designer.vb b/Het DJG Toernooi/Windows/General/TVControlPnl.Designer.vb index 9d79309..37200f8 100644 --- a/Het DJG Toernooi/Windows/General/TVControlPnl.Designer.vb +++ b/Het DJG Toernooi/Windows/General/TVControlPnl.Designer.vb @@ -130,11 +130,11 @@ Partial Class TVControlPnl ' 'tmrFlash ' - Me.tmrFlash.Interval = 200 + Me.tmrFlash.Interval = 175 ' 'tmrStrap ' - Me.tmrStrap.Interval = 1100 + Me.tmrStrap.Interval = 1250 ' 'pnlTime ' diff --git a/Het DJG Toernooi/Windows/General/TVControlPnl.vb b/Het DJG Toernooi/Windows/General/TVControlPnl.vb index 2c99737..d6d8107 100644 --- a/Het DJG Toernooi/Windows/General/TVControlPnl.vb +++ b/Het DJG Toernooi/Windows/General/TVControlPnl.vb @@ -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 diff --git a/MillionaireGameQEditor/AddQuestion.Designer.cs b/MillionaireGameQEditor/AddQuestion.Designer.cs index c260758..1155dc3 100644 --- a/MillionaireGameQEditor/AddQuestion.Designer.cs +++ b/MillionaireGameQEditor/AddQuestion.Designer.cs @@ -52,13 +52,17 @@ private void InitializeComponent() this.btnFFFC = new System.Windows.Forms.Button(); this.btnFFFB = new System.Windows.Forms.Button(); this.btnFFFA = new System.Windows.Forms.Button(); + this.txtNote = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.textBox2 = new System.Windows.Forms.TextBox(); this.pnlFFFAnswer.SuspendLayout(); this.SuspendLayout(); // // txtQuestion // this.txtQuestion.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtQuestion.Location = new System.Drawing.Point(71, 12); + this.txtQuestion.Location = new System.Drawing.Point(87, 12); this.txtQuestion.Multiline = true; this.txtQuestion.Name = "txtQuestion"; this.txtQuestion.Size = new System.Drawing.Size(349, 73); @@ -67,7 +71,7 @@ private void InitializeComponent() // txtA // this.txtA.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtA.Location = new System.Drawing.Point(71, 91); + this.txtA.Location = new System.Drawing.Point(87, 91); this.txtA.Name = "txtA"; this.txtA.Size = new System.Drawing.Size(259, 24); this.txtA.TabIndex = 1; @@ -75,7 +79,7 @@ private void InitializeComponent() // txtB // this.txtB.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtB.Location = new System.Drawing.Point(71, 117); + this.txtB.Location = new System.Drawing.Point(87, 117); this.txtB.Name = "txtB"; this.txtB.Size = new System.Drawing.Size(259, 24); this.txtB.TabIndex = 2; @@ -83,7 +87,7 @@ private void InitializeComponent() // txtC // this.txtC.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtC.Location = new System.Drawing.Point(71, 143); + this.txtC.Location = new System.Drawing.Point(87, 143); this.txtC.Name = "txtC"; this.txtC.Size = new System.Drawing.Size(259, 24); this.txtC.TabIndex = 3; @@ -91,7 +95,7 @@ private void InitializeComponent() // txtD // this.txtD.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtD.Location = new System.Drawing.Point(71, 169); + this.txtD.Location = new System.Drawing.Point(87, 169); this.txtD.Name = "txtD"; this.txtD.Size = new System.Drawing.Size(259, 24); this.txtD.TabIndex = 4; @@ -105,7 +109,7 @@ private void InitializeComponent() "B", "C", "D"}); - this.txtCorrect.Location = new System.Drawing.Point(71, 231); + this.txtCorrect.Location = new System.Drawing.Point(87, 231); this.txtCorrect.Name = "txtCorrect"; this.txtCorrect.Size = new System.Drawing.Size(44, 26); this.txtCorrect.TabIndex = 5; @@ -121,7 +125,7 @@ private void InitializeComponent() "Level 3 (q11-14)", "Level 4 (q15)", "Fastest Finger Round"}); - this.txtLevel.Location = new System.Drawing.Point(71, 199); + this.txtLevel.Location = new System.Drawing.Point(87, 199); this.txtLevel.Name = "txtLevel"; this.txtLevel.Size = new System.Drawing.Size(136, 26); this.txtLevel.TabIndex = 6; @@ -130,7 +134,7 @@ private void InitializeComponent() // btnSave // this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnSave.Location = new System.Drawing.Point(122, 322); + this.btnSave.Location = new System.Drawing.Point(152, 419); this.btnSave.Name = "btnSave"; this.btnSave.Size = new System.Drawing.Size(85, 25); this.btnSave.TabIndex = 7; @@ -140,7 +144,7 @@ private void InitializeComponent() // // btnCancel // - this.btnCancel.Location = new System.Drawing.Point(321, 322); + this.btnCancel.Location = new System.Drawing.Point(351, 419); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(85, 25); this.btnCancel.TabIndex = 8; @@ -160,7 +164,7 @@ private void InitializeComponent() // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(48, 98); + this.label2.Location = new System.Drawing.Point(64, 98); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(17, 13); this.label2.TabIndex = 10; @@ -169,7 +173,7 @@ private void InitializeComponent() // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(48, 124); + this.label3.Location = new System.Drawing.Point(64, 124); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(17, 13); this.label3.TabIndex = 11; @@ -178,7 +182,7 @@ private void InitializeComponent() // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(48, 150); + this.label4.Location = new System.Drawing.Point(64, 150); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(17, 13); this.label4.TabIndex = 12; @@ -187,7 +191,7 @@ private void InitializeComponent() // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(47, 176); + this.label5.Location = new System.Drawing.Point(63, 176); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(18, 13); this.label5.TabIndex = 13; @@ -196,7 +200,7 @@ private void InitializeComponent() // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(21, 238); + this.label6.Location = new System.Drawing.Point(37, 238); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(44, 13); this.label6.TabIndex = 14; @@ -205,7 +209,7 @@ private void InitializeComponent() // label7 // this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(29, 206); + this.label7.Location = new System.Drawing.Point(45, 206); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(36, 13); this.label7.TabIndex = 15; @@ -213,7 +217,7 @@ private void InitializeComponent() // // btnClear // - this.btnClear.Location = new System.Drawing.Point(230, 322); + this.btnClear.Location = new System.Drawing.Point(260, 419); this.btnClear.Name = "btnClear"; this.btnClear.Size = new System.Drawing.Size(85, 25); this.btnClear.TabIndex = 16; @@ -229,7 +233,7 @@ private void InitializeComponent() this.pnlFFFAnswer.Controls.Add(this.btnFFFC); this.pnlFFFAnswer.Controls.Add(this.btnFFFB); this.pnlFFFAnswer.Controls.Add(this.btnFFFA); - this.pnlFFFAnswer.Location = new System.Drawing.Point(121, 231); + this.pnlFFFAnswer.Location = new System.Drawing.Point(137, 231); this.pnlFFFAnswer.Name = "pnlFFFAnswer"; this.pnlFFFAnswer.Size = new System.Drawing.Size(228, 85); this.pnlFFFAnswer.TabIndex = 17; @@ -296,11 +300,52 @@ private void InitializeComponent() this.btnFFFA.UseVisualStyleBackColor = true; this.btnFFFA.Click += new System.EventHandler(this.btnFFFA_Click); // + // txtNote + // + this.txtNote.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtNote.Location = new System.Drawing.Point(87, 322); + this.txtNote.Multiline = true; + this.txtNote.Name = "txtNote"; + this.txtNote.Size = new System.Drawing.Size(349, 75); + this.txtNote.TabIndex = 18; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(16, 325); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(65, 13); + this.label8.TabIndex = 19; + this.label8.Text = "Explanation:"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(242, 206); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(48, 13); + this.label9.TabIndex = 20; + this.label9.Text = "Q Value:"; + this.label9.Visible = false; + // + // textBox2 + // + this.textBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.textBox2.Location = new System.Drawing.Point(296, 199); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(140, 26); + this.textBox2.TabIndex = 21; + this.textBox2.Visible = false; + // // frmQuestionAdd // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(438, 358); + this.ClientSize = new System.Drawing.Size(458, 456); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.label9); + this.Controls.Add(this.label8); + this.Controls.Add(this.txtNote); this.Controls.Add(this.pnlFFFAnswer); this.Controls.Add(this.btnClear); this.Controls.Add(this.label7); @@ -356,5 +401,9 @@ private void InitializeComponent() private System.Windows.Forms.Button btnFFFB; private System.Windows.Forms.Button btnFFFA; public System.Windows.Forms.Label lblAnswer; + private System.Windows.Forms.TextBox txtNote; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox textBox2; } } \ No newline at end of file diff --git a/MillionaireGameQEditor/AddQuestion.cs b/MillionaireGameQEditor/AddQuestion.cs index 251ed71..1545fdf 100644 --- a/MillionaireGameQEditor/AddQuestion.cs +++ b/MillionaireGameQEditor/AddQuestion.cs @@ -25,7 +25,7 @@ private void btnSave_Click(object sender, EventArgs e) { levelType = "Lvl1"; QEditor.c.Open(); - string str = String.Format(@"INSERT INTO questions_Level1 (Question, A, B, C, D, CorrectAnswer, Type) VALUES(@Question, @A, @B, @C, @D, @Correct, @Type)"); + string str = String.Format(@"INSERT INTO questions_Level1 (Question, A, B, C, D, CorrectAnswer, Type, Note) VALUES(@Question, @A, @B, @C, @D, @Correct, @Type, @Note)"); cmd = new SqlCommand(str, QEditor.c); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@A", txtA.Text); @@ -34,6 +34,7 @@ private void btnSave_Click(object sender, EventArgs e) cmd.Parameters.AddWithValue("@D", txtD.Text); cmd.Parameters.AddWithValue("@Correct", txtCorrect.Text); cmd.Parameters.AddWithValue("@Type", levelType); + cmd.Parameters.AddWithValue("@Note", txtNote.Text); cmd.ExecuteNonQuery(); QEditor.c.Close(); } @@ -41,7 +42,7 @@ private void btnSave_Click(object sender, EventArgs e) { levelType = "Lvl2"; QEditor.c.Open(); - string str = String.Format(@"INSERT INTO questions_Level2 (Question, A, B, C, D, CorrectAnswer, Type) VALUES(@Question, @A, @B, @C, @D, @Correct, @Type)"); + string str = String.Format(@"INSERT INTO questions_Level2 (Question, A, B, C, D, CorrectAnswer, Type, Note) VALUES(@Question, @A, @B, @C, @D, @Correct, @Type, @Note)"); cmd = new SqlCommand(str, QEditor.c); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@A", txtA.Text); @@ -50,6 +51,7 @@ private void btnSave_Click(object sender, EventArgs e) cmd.Parameters.AddWithValue("@D", txtD.Text); cmd.Parameters.AddWithValue("@Correct", txtCorrect.Text); cmd.Parameters.AddWithValue("@Type", levelType); + cmd.Parameters.AddWithValue("@Note", txtNote.Text); cmd.ExecuteNonQuery(); QEditor.c.Close(); } @@ -57,7 +59,7 @@ private void btnSave_Click(object sender, EventArgs e) { levelType = "Lvl3"; QEditor.c.Open(); - string str = String.Format(@"INSERT INTO questions_Level3 (Question, A, B, C, D, CorrectAnswer, Type) VALUES(@Question, @A, @B, @C, @D, @Correct, @Type)"); + string str = String.Format(@"INSERT INTO questions_Level3 (Question, A, B, C, D, CorrectAnswer, Type, Note) VALUES(@Question, @A, @B, @C, @D, @Correct, @Type, @Note)"); cmd = new SqlCommand(str, QEditor.c); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@A", txtA.Text); @@ -66,6 +68,7 @@ private void btnSave_Click(object sender, EventArgs e) cmd.Parameters.AddWithValue("@D", txtD.Text); cmd.Parameters.AddWithValue("@Correct", txtCorrect.Text); cmd.Parameters.AddWithValue("@Type", levelType); + cmd.Parameters.AddWithValue("@Note", txtNote.Text); cmd.ExecuteNonQuery(); QEditor.c.Close(); } @@ -73,7 +76,7 @@ private void btnSave_Click(object sender, EventArgs e) { levelType = "Lvl4"; QEditor.c.Open(); - string str = String.Format(@"INSERT INTO questions_Level4 (Question, A, B, C, D, CorrectAnswer, Type) VALUES(@Question, @A, @B, @C, @D, @Correct, @Type)"); + string str = String.Format(@"INSERT INTO questions_Level4 (Question, A, B, C, D, CorrectAnswer, Type, Note) VALUES(@Question, @A, @B, @C, @D, @Correct, @Type, @Note)"); cmd = new SqlCommand(str, QEditor.c); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@A", txtA.Text); @@ -82,6 +85,7 @@ private void btnSave_Click(object sender, EventArgs e) cmd.Parameters.AddWithValue("@D", txtD.Text); cmd.Parameters.AddWithValue("@Correct", txtCorrect.Text); cmd.Parameters.AddWithValue("@Type", levelType); + cmd.Parameters.AddWithValue("@Note", txtNote.Text); cmd.ExecuteNonQuery(); QEditor.c.Close(); } @@ -89,7 +93,7 @@ private void btnSave_Click(object sender, EventArgs e) { levelType = "Lvl0"; QEditor.c.Open(); - string str = String.Format(@"INSERT INTO questions_Level0 (Question, A, B, C, D, CorrectAnswer, Type) VALUES(@Question, @A, @B, @C, @D, @Correct, @Type)"); + string str = String.Format(@"INSERT INTO questions_Level0 (Question, A, B, C, D, CorrectAnswer, Type, Note) VALUES(@Question, @A, @B, @C, @D, @Correct, @Type, @Note)"); cmd = new SqlCommand(str, QEditor.c); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@A", txtA.Text); @@ -98,6 +102,7 @@ private void btnSave_Click(object sender, EventArgs e) cmd.Parameters.AddWithValue("@D", txtD.Text); cmd.Parameters.AddWithValue("@Correct", lblAnswer.Text); cmd.Parameters.AddWithValue("@Type", levelType); + cmd.Parameters.AddWithValue("@Note", txtNote.Text); cmd.ExecuteNonQuery(); QEditor.c.Close(); } diff --git a/MillionaireGameQEditor/EditQuestion.Designer.cs b/MillionaireGameQEditor/EditQuestion.Designer.cs index 669d91d..1e60e1f 100644 --- a/MillionaireGameQEditor/EditQuestion.Designer.cs +++ b/MillionaireGameQEditor/EditQuestion.Designer.cs @@ -53,13 +53,15 @@ private void InitializeComponent() this.btnFFFC = new System.Windows.Forms.Button(); this.btnFFFB = new System.Windows.Forms.Button(); this.btnFFFA = new System.Windows.Forms.Button(); + this.label9 = new System.Windows.Forms.Label(); + this.txtNote = new System.Windows.Forms.TextBox(); this.pnlFFFAnswer.SuspendLayout(); this.SuspendLayout(); // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(11, 19); + this.label1.Location = new System.Drawing.Point(24, 19); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(49, 13); this.label1.TabIndex = 0; @@ -68,7 +70,7 @@ private void InitializeComponent() // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(46, 76); + this.label2.Location = new System.Drawing.Point(59, 76); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(14, 13); this.label2.TabIndex = 1; @@ -77,7 +79,7 @@ private void InitializeComponent() // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(46, 101); + this.label3.Location = new System.Drawing.Point(59, 101); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(14, 13); this.label3.TabIndex = 2; @@ -86,7 +88,7 @@ private void InitializeComponent() // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(46, 126); + this.label4.Location = new System.Drawing.Point(59, 126); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(14, 13); this.label4.TabIndex = 3; @@ -95,7 +97,7 @@ private void InitializeComponent() // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(45, 151); + this.label5.Location = new System.Drawing.Point(58, 151); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(15, 13); this.label5.TabIndex = 4; @@ -104,7 +106,7 @@ private void InitializeComponent() // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(19, 181); + this.label6.Location = new System.Drawing.Point(32, 181); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(41, 13); this.label6.TabIndex = 5; @@ -113,7 +115,7 @@ private void InitializeComponent() // txtQuestion // this.txtQuestion.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtQuestion.Location = new System.Drawing.Point(66, 12); + this.txtQuestion.Location = new System.Drawing.Point(79, 12); this.txtQuestion.Multiline = true; this.txtQuestion.Name = "txtQuestion"; this.txtQuestion.Size = new System.Drawing.Size(357, 53); @@ -122,7 +124,7 @@ private void InitializeComponent() // txtA // this.txtA.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtA.Location = new System.Drawing.Point(66, 69); + this.txtA.Location = new System.Drawing.Point(79, 69); this.txtA.Name = "txtA"; this.txtA.Size = new System.Drawing.Size(357, 24); this.txtA.TabIndex = 7; @@ -130,7 +132,7 @@ private void InitializeComponent() // txtB // this.txtB.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtB.Location = new System.Drawing.Point(66, 94); + this.txtB.Location = new System.Drawing.Point(79, 94); this.txtB.Name = "txtB"; this.txtB.Size = new System.Drawing.Size(357, 24); this.txtB.TabIndex = 8; @@ -138,7 +140,7 @@ private void InitializeComponent() // txtC // this.txtC.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtC.Location = new System.Drawing.Point(66, 119); + this.txtC.Location = new System.Drawing.Point(79, 119); this.txtC.Name = "txtC"; this.txtC.Size = new System.Drawing.Size(357, 24); this.txtC.TabIndex = 9; @@ -146,7 +148,7 @@ private void InitializeComponent() // txtD // this.txtD.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtD.Location = new System.Drawing.Point(66, 144); + this.txtD.Location = new System.Drawing.Point(79, 144); this.txtD.Name = "txtD"; this.txtD.Size = new System.Drawing.Size(357, 24); this.txtD.TabIndex = 10; @@ -160,7 +162,7 @@ private void InitializeComponent() "B", "C", "D"}); - this.txtCorrect.Location = new System.Drawing.Point(66, 174); + this.txtCorrect.Location = new System.Drawing.Point(79, 174); this.txtCorrect.MaxLength = 1; this.txtCorrect.Name = "txtCorrect"; this.txtCorrect.Size = new System.Drawing.Size(80, 26); @@ -168,7 +170,7 @@ private void InitializeComponent() // // txtId // - this.txtId.Location = new System.Drawing.Point(149, 294); + this.txtId.Location = new System.Drawing.Point(162, 387); this.txtId.Name = "txtId"; this.txtId.ReadOnly = true; this.txtId.Size = new System.Drawing.Size(59, 20); @@ -177,7 +179,7 @@ private void InitializeComponent() // label7 // this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(127, 297); + this.label7.Location = new System.Drawing.Point(140, 390); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(16, 13); this.label7.TabIndex = 13; @@ -186,7 +188,7 @@ private void InitializeComponent() // btnSave // this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnSave.Location = new System.Drawing.Point(321, 265); + this.btnSave.Location = new System.Drawing.Point(334, 358); this.btnSave.Name = "btnSave"; this.btnSave.Size = new System.Drawing.Size(102, 23); this.btnSave.TabIndex = 14; @@ -196,7 +198,7 @@ private void InitializeComponent() // // btnCancel // - this.btnCancel.Location = new System.Drawing.Point(321, 292); + this.btnCancel.Location = new System.Drawing.Point(334, 385); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(102, 23); this.btnCancel.TabIndex = 15; @@ -205,7 +207,7 @@ private void InitializeComponent() // // txtLevel // - this.txtLevel.Location = new System.Drawing.Point(268, 294); + this.txtLevel.Location = new System.Drawing.Point(281, 387); this.txtLevel.Name = "txtLevel"; this.txtLevel.ReadOnly = true; this.txtLevel.Size = new System.Drawing.Size(47, 20); @@ -214,7 +216,7 @@ private void InitializeComponent() // label8 // this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(229, 297); + this.label8.Location = new System.Drawing.Point(242, 390); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(33, 13); this.label8.TabIndex = 17; @@ -228,7 +230,7 @@ private void InitializeComponent() this.pnlFFFAnswer.Controls.Add(this.btnFFFC); this.pnlFFFAnswer.Controls.Add(this.btnFFFB); this.pnlFFFAnswer.Controls.Add(this.btnFFFA); - this.pnlFFFAnswer.Location = new System.Drawing.Point(163, 174); + this.pnlFFFAnswer.Location = new System.Drawing.Point(176, 174); this.pnlFFFAnswer.Name = "pnlFFFAnswer"; this.pnlFFFAnswer.Size = new System.Drawing.Size(228, 85); this.pnlFFFAnswer.TabIndex = 18; @@ -290,11 +292,31 @@ private void InitializeComponent() this.btnFFFA.Text = "A"; this.btnFFFA.UseVisualStyleBackColor = true; // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(8, 268); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(65, 13); + this.label9.TabIndex = 21; + this.label9.Text = "Explanation:"; + // + // txtNote + // + this.txtNote.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtNote.Location = new System.Drawing.Point(79, 265); + this.txtNote.Multiline = true; + this.txtNote.Name = "txtNote"; + this.txtNote.Size = new System.Drawing.Size(357, 75); + this.txtNote.TabIndex = 20; + // // frmEditQuestion // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(440, 324); + this.ClientSize = new System.Drawing.Size(448, 418); + this.Controls.Add(this.label9); + this.Controls.Add(this.txtNote); this.Controls.Add(this.pnlFFFAnswer); this.Controls.Add(this.label8); this.Controls.Add(this.txtLevel); @@ -352,5 +374,7 @@ private void InitializeComponent() private System.Windows.Forms.Button btnFFFB; private System.Windows.Forms.Button btnFFFA; public System.Windows.Forms.Label lblAnswer; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox txtNote; } } \ No newline at end of file diff --git a/MillionaireGameQEditor/EditQuestion.cs b/MillionaireGameQEditor/EditQuestion.cs index 8916292..69bb72a 100644 --- a/MillionaireGameQEditor/EditQuestion.cs +++ b/MillionaireGameQEditor/EditQuestion.cs @@ -23,7 +23,7 @@ private void btnSave_Click(object sender, EventArgs e) QEditor.c.Open(); if (txtLevel.Text == "Lvl1") { - cmd = new SqlCommand("UPDATE questions_Level1 SET Question=@Question,A = @A,B = @B,C = @C,D = @D,CorrectAnswer = @Correct,Type = @Type WHERE Id = @Id", QEditor.c); + cmd = new SqlCommand("UPDATE questions_Level1 SET Question=@Question,A = @A,B = @B,C = @C,D = @D,CorrectAnswer = @Correct,Type = @Type,Note = @Note WHERE Id = @Id", QEditor.c); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@A", txtA.Text); cmd.Parameters.AddWithValue("@B", txtB.Text); @@ -31,12 +31,13 @@ private void btnSave_Click(object sender, EventArgs e) cmd.Parameters.AddWithValue("@D", txtD.Text); cmd.Parameters.AddWithValue("@Correct", txtCorrect.Text); cmd.Parameters.AddWithValue("@Type", txtLevel.Text); + cmd.Parameters.AddWithValue("@Note", txtNote.Text); cmd.Parameters.AddWithValue("@Id", txtId.Text); cmd.ExecuteNonQuery(); } else if (txtLevel.Text == "Lvl2") { - cmd = new SqlCommand("UPDATE questions_Level2 SET Question=@Question,A = @A,B = @B,C = @C,D = @D,CorrectAnswer = @Correct,Type = @Type WHERE Id = @Id", QEditor.c); + cmd = new SqlCommand("UPDATE questions_Level2 SET Question=@Question,A = @A,B = @B,C = @C,D = @D,CorrectAnswer = @Correct,Type = @Type,Note = @Note WHERE Id = @Id", QEditor.c); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@A", txtA.Text); cmd.Parameters.AddWithValue("@B", txtB.Text); @@ -44,12 +45,13 @@ private void btnSave_Click(object sender, EventArgs e) cmd.Parameters.AddWithValue("@D", txtD.Text); cmd.Parameters.AddWithValue("@Correct", txtCorrect.Text); cmd.Parameters.AddWithValue("@Type", txtLevel.Text); + cmd.Parameters.AddWithValue("@Note", txtNote.Text); cmd.Parameters.AddWithValue("@Id", txtId.Text); cmd.ExecuteNonQuery(); } else if (txtLevel.Text == "Lvl3") { - cmd = new SqlCommand("UPDATE questions_Level3 SET Question=@Question,A = @A,B = @B,C = @C,D = @D,CorrectAnswer = @Correct,Type = @Type WHERE Id = @Id", QEditor.c); + cmd = new SqlCommand("UPDATE questions_Level3 SET Question=@Question,A = @A,B = @B,C = @C,D = @D,CorrectAnswer = @Correct,Type = @Type,Note = @Note WHERE Id = @Id", QEditor.c); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@A", txtA.Text); cmd.Parameters.AddWithValue("@B", txtB.Text); @@ -57,12 +59,13 @@ private void btnSave_Click(object sender, EventArgs e) cmd.Parameters.AddWithValue("@D", txtD.Text); cmd.Parameters.AddWithValue("@Correct", txtCorrect.Text); cmd.Parameters.AddWithValue("@Type", txtLevel.Text); + cmd.Parameters.AddWithValue("@Note", txtNote.Text); cmd.Parameters.AddWithValue("@Id", txtId.Text); cmd.ExecuteNonQuery(); } else if (txtLevel.Text == "Lvl4") { - cmd = new SqlCommand("UPDATE questions_Level4 SET Question=@Question,A = @A,B = @B,C = @C,D = @D,CorrectAnswer = @Correct,Type = @Type WHERE Id = @Id", QEditor.c); + cmd = new SqlCommand("UPDATE questions_Level4 SET Question=@Question,A = @A,B = @B,C = @C,D = @D,CorrectAnswer = @Correct,Type = @Type,Note = @Note WHERE Id = @Id", QEditor.c); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@A", txtA.Text); cmd.Parameters.AddWithValue("@B", txtB.Text); @@ -70,12 +73,13 @@ private void btnSave_Click(object sender, EventArgs e) cmd.Parameters.AddWithValue("@D", txtD.Text); cmd.Parameters.AddWithValue("@Correct", txtCorrect.Text); cmd.Parameters.AddWithValue("@Type", txtLevel.Text); + cmd.Parameters.AddWithValue("@Note", txtNote.Text); cmd.Parameters.AddWithValue("@Id", txtId.Text); cmd.ExecuteNonQuery(); } else if (txtLevel.Text == "Lvl0") { - cmd = new SqlCommand("UPDATE questions_Level0 SET Question=@Question,A = @A,B = @B,C = @C,D = @D,CorrectAnswer = @Correct,Type = @Type WHERE Id = @Id", QEditor.c); + cmd = new SqlCommand("UPDATE questions_Level0 SET Question=@Question,A = @A,B = @B,C = @C,D = @D,CorrectAnswer = @Correct,Type = @Type,Note = @Note WHERE Id = @Id", QEditor.c); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@A", txtA.Text); cmd.Parameters.AddWithValue("@B", txtB.Text); @@ -83,6 +87,7 @@ private void btnSave_Click(object sender, EventArgs e) cmd.Parameters.AddWithValue("@D", txtD.Text); cmd.Parameters.AddWithValue("@Correct", lblAnswer.Text); cmd.Parameters.AddWithValue("@Type", txtLevel.Text); + cmd.Parameters.AddWithValue("@Note", txtNote.Text); cmd.Parameters.AddWithValue("@Id", txtId.Text); cmd.ExecuteNonQuery(); } diff --git a/MillionaireGameQEditor/Properties/AssemblyInfo.cs b/MillionaireGameQEditor/Properties/AssemblyInfo.cs index 479822d..8b91c2f 100644 --- a/MillionaireGameQEditor/Properties/AssemblyInfo.cs +++ b/MillionaireGameQEditor/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.46.0")] -[assembly: AssemblyFileVersion("1.0.46.0")] +[assembly: AssemblyVersion("1.0.48.0")] +[assembly: AssemblyFileVersion("1.0.48.0")]