blob: 8441db7313173036cb5d8dc7b85c3e7adf73c402 (
plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
Imports System.IO
Public Class frmOptions
Private Sub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.Click
Me.Close()
End Sub
' Set the check boxes to the correct state. Checked or unchecked
Private Sub frmOptions_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim file_path As String = Application.StartupPath
Try
If My.Settings.StartupUpdate = 1 Then
check_updateCheck.CheckState = CheckState.Checked
Else
check_updateCheck.CheckState = CheckState.Unchecked
End If
If My.Settings.UseUsersDefaultSettings = 1 Then
check_userDefaultSettings.CheckState = CheckState.Checked
Else
check_userDefaultSettings.CheckState = CheckState.Unchecked
End If
If My.Settings.ReadDVDatStartup = 1 Then
check_readDVDWindow.CheckState = CheckState.Checked
Else
check_readDVDWindow.CheckState = CheckState.Unchecked
End If
Catch ex As Exception
MessageBox.Show("ERROR: " & ex.ToString)
End Try
End Sub
' Handle the event when a user clicks on the check box. Save the new setting.
Private Sub check_updateCheck_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles check_updateCheck.CheckedChanged
If check_updateCheck.CheckState = 1 Then
Try
My.Settings.StartupUpdate = 1
Catch Ex As Exception
MessageBox.Show("ERROR: " & Ex.ToString)
End Try
Else
Try
My.Settings.StartupUpdate = 0
Catch Ex As Exception
MessageBox.Show("ERROR: " & Ex.ToString)
End Try
End If
End Sub
Private Sub check_userDefaultSettings_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles check_userDefaultSettings.CheckedChanged
If check_userDefaultSettings.CheckState = 1 Then
Try
My.Settings.UseUsersDefaultSettings = 1
Catch Ex As Exception
MessageBox.Show("ERROR: " & Ex.ToString)
End Try
Else
Try
My.Settings.UseUsersDefaultSettings = 0
Catch Ex As Exception
MessageBox.Show("ERROR: " & Ex.ToString)
End Try
End If
End Sub
Private Sub check_readDVDWindow_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles check_readDVDWindow.CheckedChanged
If check_readDVDWindow.CheckState = 1 Then
Try
My.Settings.ReadDVDatStartup = 1
Catch Ex As Exception
MessageBox.Show("ERROR: " & Ex.ToString)
End Try
Else
Try
My.Settings.ReadDVDatStartup = 0
Catch Ex As Exception
MessageBox.Show("ERROR: " & Ex.ToString)
End Try
End If
End Sub
End Class
|