Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Client initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeCasterNL committed Jul 21, 2022
1 parent 55a069b commit 79b66d1
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ private async Task ReadDeviceInfoAsync()

SetStatus(GoodWeStatus.Authorized);

_client = client;

var firstPlant = plantList.Data.list?.FirstOrDefault();

if (firstPlant?.inverters?.Any() != true)
Expand All @@ -112,7 +114,6 @@ private async Task ReadDeviceInfoAsync()
plantComboBox.ValueMember = nameof(AddressWithInverters.id);
plantComboBox.DisplayMember = nameof(AddressWithInverters.DisplayString);

_client = client;
plantComboBox.DataSource = plantList.Data.list;

plantComboBox.SelectedIndex = 0;
Expand All @@ -132,8 +133,6 @@ private async void PlantComboBox_SelectedValueChanged(object sender, EventArgs e

if (plantComboBox.SelectedItem == null)
{
_client = null;

SetStatus(GoodWeStatus.Uninitialized);

return;
Expand Down

0 comments on commit 79b66d1

Please sign in to comment.