-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from africanmathsinitiative/master
Pulling changes updated by Stephen
- Loading branch information
Showing
2 changed files
with
58 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
Public Class ucrReceiverMultiple | ||
Public Overrides Sub AddSelected() | ||
Dim objItem As Object | ||
Dim tempObjects(Selector.lstAvailableVariable.SelectedItems.Count - 1) As Object | ||
|
||
Selector.lstAvailableVariable.SelectedItems.CopyTo(tempObjects, 0) | ||
For Each objItem In tempObjects | ||
lstSelectedVariables.Items.Add(objItem) | ||
Selector.lstAvailableVariable.Items.Remove(objItem) | ||
Next | ||
End Sub | ||
|
||
Public Overrides Sub RemoveSelected() | ||
Dim objItem As Object | ||
Dim tempObjects(lstSelectedVariables.SelectedItems.Count - 1) As Object | ||
|
||
lstSelectedVariables.SelectedItems.CopyTo(tempObjects, 0) | ||
For Each objItem In tempObjects | ||
Selector.lstAvailableVariable.Items.Add(objItem) | ||
lstSelectedVariables.Items.Remove(objItem) | ||
Next | ||
End Sub | ||
Public Class ucrReceiverMultiple | ||
Public Overrides Sub AddSelected() | ||
Dim objItem As Object | ||
Dim tempObjects(Selector.lstAvailableVariable.SelectedItems.Count - 1) As Object | ||
|
||
Selector.lstAvailableVariable.SelectedItems.CopyTo(tempObjects, 0) | ||
For Each objItem In tempObjects | ||
lstSelectedVariables.Items.Add(objItem) | ||
Selector.lstAvailableVariable.Items.Remove(objItem) | ||
Next | ||
End Sub | ||
|
||
Public Overrides Sub RemoveSelected() | ||
Dim objItem As Object | ||
Dim tempObjects(lstSelectedVariables.SelectedItems.Count - 1) As Object | ||
|
||
If lstSelectedVariables.SelectedItems.Count > 0 Then | ||
lstSelectedVariables.SelectedItems.CopyTo(tempObjects, 0) | ||
For Each objItem In tempObjects | ||
Selector.lstAvailableVariable.Items.Add(objItem) | ||
lstSelectedVariables.Items.Remove(objItem) | ||
Next | ||
Else | ||
MsgBox("There is nothing to remove", vbInformation, "Selection message") | ||
End If | ||
End Sub | ||
End Class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
Public Class ucrReceiverSingle | ||
Public Overrides Sub AddSelected() | ||
Dim objItem As Object | ||
Dim tempObjects(Selector.lstAvailableVariable.SelectedItems.Count - 1) As Object | ||
Public Class ucrReceiverSingle | ||
Public Overrides Sub AddSelected() | ||
Dim objItem As Object | ||
If txtReceiverSingle.Text = "" Then | ||
Dim tempObjects(Selector.lstAvailableVariable.SelectedItems.Count - 1) As Object | ||
|
||
Selector.lstAvailableVariable.SelectedItems.CopyTo(tempObjects, 0) | ||
For Each objItem In tempObjects | ||
txtReceiverSingle.Text = objItem | ||
Selector.lstAvailableVariable.Items.Remove(objItem) | ||
Next | ||
Else | ||
MsgBox("Receiver takes only one variable", vbInformation, "Selection message") | ||
|
||
End If | ||
End Sub | ||
|
||
Public Overrides Sub RemoveSelected() | ||
Dim objItem As Object | ||
Dim tempObjects(0) As Object | ||
|
||
If txtReceiverSingle.Text <> "" Then | ||
tempObjects(0) = txtReceiverSingle.Text | ||
For Each objItem In tempObjects | ||
Selector.lstAvailableVariable.Items.Add(objItem) | ||
txtReceiverSingle.Text = Nothing | ||
Next | ||
Else | ||
MsgBox("There is nothing to remove", vbInformation, "Selection message") | ||
End If | ||
End Sub | ||
End Class | ||
|
||
Selector.lstAvailableVariable.SelectedItems.CopyTo(tempObjects, 0) | ||
For Each objItem In tempObjects | ||
txtReceiverSingle.Text = objItem | ||
Selector.lstAvailableVariable.Items.Remove(objItem) | ||
Next | ||
End Sub | ||
|
||
Public Overrides Sub RemoveSelected() | ||
Dim objItem As Object | ||
Dim tempObjects(0) As Object | ||
If txtReceiverSingle.Text <> "" Then | ||
tempObjects(0) = txtReceiverSingle.Text | ||
For Each objItem In tempObjects | ||
Selector.lstAvailableVariable.Items.Add(objItem) | ||
txtReceiverSingle.Text = Nothing | ||
Next | ||
End If | ||
End Sub | ||
End Class |