-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmSettings.vb
36 lines (30 loc) · 1.49 KB
/
frmSettings.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Public Class frmSettings
Private Sub frmSettings_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim BoundWidth As Integer = Screen.PrimaryScreen.Bounds.Width
Dim BoundHeight As Integer = Screen.PrimaryScreen.Bounds.Height
Dim X As Integer = BoundWidth - Me.Width
Dim Y As Integer = BoundHeight - Me.Height
Me.Location = New Point(X / 2, Y / 2)
txtScoreboardName.Text = frmScoreboard.ScoreboardName
txtHomeTeam.Text = frmScoreboard.HomeTeamName
txtAwayTeam.Text = frmScoreboard.AwayTeamName
txtCountdownFrom.Text = frmScoreboard.CountdownFrom
chkPlayBuzzerAtZeros.Checked = frmScoreboard.PlayBuzzerAtZeros
End Sub
Private Sub btnOK_Click(sender As System.Object, e As System.EventArgs) Handles btnOK.Click
btnApply_Click(sender, e)
Me.Close()
End Sub
Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click
Me.Close()
End Sub
Private Sub btnApply_Click(sender As System.Object, e As System.EventArgs) Handles btnApply.Click
frmScoreboard.ScoreboardName = txtScoreboardName.Text
frmScoreboard.HomeTeamName = txtHomeTeam.Text
frmScoreboard.AwayTeamName = txtAwayTeam.Text
frmScoreboard.CountdownFrom = txtCountdownFrom.Text
frmScoreboard.PlayBuzzerAtZeros = chkPlayBuzzerAtZeros.Checked
frmScoreboard.UpdateNames()
frmScoreboard.ResetClock()
End Sub
End Class