Пример #1
0
 private void createButton_Click(object sender, EventArgs e)
 {
     try
     {
         CreateDeviceForm createForm = new CreateDeviceForm(activeIoTHubConnectionString, MAX_COUNT_OF_DEVICES);
         createForm.ShowDialog();    // Modal window
         UpdateListOfDevices();
     }
     catch (Exception ex)
     {
         MessageBox.Show(String.Format("Unable to create new device. Please verify your connection strings.\n{0}", ex.Message), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #2
0
 private void createButton_Click(object sender, EventArgs e)
 {
     try
     {
         CreateDeviceForm createForm = new CreateDeviceForm(activeIoTHubConnectionString, MAX_COUNT_OF_DEVICES);
         createForm.ShowDialog();    // Modal window
         UpdateListOfDevices();
     }
     catch (Exception ex)
     {
         MessageBox.Show(String.Format("Unable to create new device. Please verify your connection strings.\n{0}", ex.Message), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }