private void FindAvailableNetworks_Load(object sender, EventArgs e) { this.Show(); pair = new TstatPairing(); try { List<Network> networks = pair.GetAvailableThermostats().FindAll(StartsWithThermostat); if (networks.Count == 0) { Debug.Write("Could not find any thermostats."); } //lbAvailableTstats.Items.Clear(); lbAvailableTstats.DataSource = networks; lbAvailableTstats.DisplayMember = "NetworkSSID"; } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
private void getThermostats() { if(pair == null) pair = new TstatPairing(); try { List<Network> networks = pair.GetAvailableThermostats().FindAll(StartsWithThermostat); if (networks.Count == 0) { Debug.Write("Could not find any thermostats."); } //lbAvailableTstats.Items.Clear(); lbAvailableTstats.DataSource = networks; lbAvailableTstats.DisplayMember = "NetworkSSID"; } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
public ShowVisibleNetworks() { this.pair = new TstatPairing(); InitializeComponent(); }
public ShowVisibleNetworks(TstatPairing pair) { this.pair = pair; InitializeComponent(); }
public CurrentNetwork(TstatPairing obj) { InitializeComponent(); pair = obj; }
public ConnectToHomeNetwork(JsonNetwork net, TstatPairing pair) { InitializeComponent(); this.pair = pair; this.currentNetwork = net; }
public ConnectToHomeNetwork() { InitializeComponent(); this.pair = new TstatPairing(); }