-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
OptionsDialog.vb
61 lines (52 loc) · 1.42 KB
/
OptionsDialog.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
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
Public Class OptionsDialog
Public Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
Public Sub New(rows As Integer, columns As Integer, depth As Integer)
Me.New()
Me.Rows = rows
Me.Columns = columns
Me.Depth = depth
End Sub
Public Property Rows() As Integer
Get
Return CInt(RowsComboBox.SelectedItem)
End Get
Set(Value As Integer)
For index = 0 To RowsComboBox.Items.Count - 1
If CInt(RowsComboBox.Items(index)) = Value Then
RowsComboBox.SelectedIndex = index
Exit For
End If
Next
End Set
End Property
Public Property Columns() As Integer
Get
Return CInt(ColumnsComboBox.SelectedItem)
End Get
Set(Value As Integer)
For index = 0 To ColumnsComboBox.Items.Count - 1
If CInt(ColumnsComboBox.Items(index)) = Value Then
ColumnsComboBox.SelectedIndex = index
Exit For
End If
Next
End Set
End Property
Public Property Depth() As Integer
Get
Return CInt(PiecesComboBox.SelectedItem)
End Get
Set(Value As Integer)
For index = 0 To PiecesComboBox.Items.Count - 1
If CInt(PiecesComboBox.Items(index)) = Value Then
PiecesComboBox.SelectedIndex = index
Exit For
End If
Next
End Set
End Property
End Class