Exemplo n.º 1
0
 private void updateDeviceButton_Click(object sender, EventArgs e)
 {
     try
     {
         string           selectedDeviceId = devicesGridView.CurrentRow.Cells[0].Value.ToString();
         RegistryManager  registryManager  = RegistryManager.CreateFromConnectionString(activeIoTHubConnectionString);
         DeviceUpdateForm updateForm       = new DeviceUpdateForm(registryManager, MAX_COUNT_OF_DEVICES, selectedDeviceId);
         updateForm.ShowDialog(this);
         updateForm.Dispose();
         updateDevicesGridView();
         registryManager.CloseAsync();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 2
0
 private void updateDeviceButton_Click(object sender, EventArgs e)
 {
     try
     {
         string selectedDeviceId = devicesGridView.CurrentRow.Cells[0].Value.ToString();
         RegistryManager registryManager = RegistryManager.CreateFromConnectionString(activeIoTHubConnectionString);
         DeviceUpdateForm updateForm = new DeviceUpdateForm(registryManager, MAX_COUNT_OF_DEVICES, selectedDeviceId);
         updateForm.ShowDialog(this);
         updateForm.Dispose();
         updateDevicesGridView();
         registryManager.CloseAsync();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }