Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.19 KB | None | 0 0
  1. '
  2.     ' ADD HERE THE EVENT HANDLERS FOR THE OK AND CANCEL BUTTONS OF THE MODIFICATION OF A TASK
  3.     '
  4.     Private Sub clickOk(sender As Object, e As EventArgs)
  5.         Dim result As Integer = MessageBox.Show("Are you sure you want to modify ?", "Confirmation", MessageBoxButtons.OKCancel)
  6.         If result = DialogResult.OK Then
  7.             With taskDisplayed
  8.                 .title = txtModifTitle.Text
  9.                 .description = txtModifDescr.Text
  10.                 If cboModifCat.SelectedIndex <> -1 Then
  11.                     .category = cboModifCat.SelectedIndex
  12.                 End If
  13.                 If chkModifDate.Checked Then
  14.                     .deadline = dateModif.Value
  15.                 End If
  16.             End With
  17.             CType(taskDisplayed.controls(0), Panel).Controls(0).Text = txtModifTitle.Text
  18.             displayTask(taskDisplayed, False)
  19.         End If
  20.     End Sub
  21.  
  22.     Private Sub clickCancel(sender As Object, e As EventArgs)
  23.         Dim result As Integer = MessageBox.Show("Are you sure you want to cancel ?", "Confirmation", MessageBoxButtons.OKCancel)
  24.         If result = DialogResult.OK Then
  25.             displayTask(taskDisplayed, False)
  26.         End If
  27.     End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement