예제 #1
0
 private async void BtnTimeAdd_Click(object sender, EventArgs e)
 {
     try {
         if (!TimeSpan.TryParse(txtTime.Text, out TimeSpan times))
         {
             return;
         }
         await testManager.AddTime(times,
                                   c => lvClients.SelectedItems.ContainsKey(c.Id.ToString()));
     } catch (Exception ex) {
         MessageBox.Show("Error sending command, error: " + ex.Message, "Error", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
     }
 }