OK, so this code is a list of objects in the blanket and you have to select an item and then choose a radio button. Be it or dislike and then vote again. Whenever you like or dislike votes and hits in the list of results, then all the votes should be increased. When I like and press the votes, nothing appears in the result box, but when I like dislike and I feel pressured to vote and overall it seems like I pressed and voted it Shows 1 for This program is going on throughout the whole time, so if I hit 3 times more often, it will not be updated in the list box until I dislike the dislike and vote. How do I show codes to vote and dislike votes?
This is my code:
Public class food surfform Dim Vote like integer (,) = new integer (for 0 3, 0 to 1) { } 'Load event of food survey form handles personal sub foodSurveyForm_Load (in the form of System.Object, E. System.EventArgs) handle handle MyBase.Load foodsComboBox.SelectedIndex = 0' Select the first meal in the list End Sub '(System As an e-System.EventArgs, as an object, FoodSurveyForm_Load personal sub-voteButton_Click handles the voteButton.Click Red Index as integer = foodsComboBox.SelectedIndex, 'A' If you like the statement then like RadiioButton.Checked vote and to dislike votes (index 0) + = 1 elseif dislikeRadioButton.Checked then vote (index, 1) + = 1 DisplayVotes () end then End sub subVideoViews ( ) Call 'DisplayVotes sub-process resultsListBox.Items.Clear ()' resultListBox resultsListB for header Ox.Items.Add ("Menu Item" & Control Chairs. Tab & amp; "Like" _ & Control Chairs. Tab & amp; "dislikes") for counting integer = 0 foodsComboBox.Items.Count as - 1 resultsListBox.Items.Add (foodsComboBox.Items (number) .toString & amp; ControlChars.Tab & amp; Vote (Count, 0) & amp; _ ControlChars Tab & amp; Vote count (count, 1)) Next count ending sub 'display vote end class' FoodSurveyForm
DisplayVotes () does, should go out of the block:
personal sub-voteButton_Click (as in this System.Object, E. System.EventArgs handles) voteButton.Click Red Index As an integer = foodsComboBox.SelectedIndex 'like to add and dislike the statement, then vote likeRadioButton.Checked then vote (Index 0) + = 1 elseif dislikeRadioButton.Checked then vote (index, 1) + = 1 hour Then DisplayVotes () End Sub
Comments
Post a Comment