public void PushbulletGetDevices() { cboPushbulletDevices.Items.Clear(); cboPushbulletDevices.ResetText(); Pushbullet pushbullet = new Pushbullet(Config.PushbulletSettings); Config.PushbulletSettings.DeviceList = pushbullet.GetDeviceList(); if (Config.PushbulletSettings.DeviceList.Count > 0) { Config.PushbulletSettings.SelectedDevice = 0; cboPushbulletDevices.Enabled = true; Config.PushbulletSettings.DeviceList.ForEach(pbDevice => { if (!string.IsNullOrEmpty(pbDevice.Name)) { cboPushbulletDevices.Items.Add(pbDevice.Name); } }); cboPushbulletDevices.SelectedIndex = 0; } }
public void PushbulletGetDevices() { cboPushbulletDevices.Items.Clear(); cboPushbulletDevices.ResetText(); Pushbullet pushbullet = new Pushbullet(Config.PushbulletSettings); Config.PushbulletSettings.DeviceList = pushbullet.GetDeviceList(); if (Config.PushbulletSettings.DeviceList.Count > 0) { Config.PushbulletSettings.SelectedDevice = 0; cboPushbulletDevices.Enabled = true; Config.PushbulletSettings.DeviceList.ForEach(pbDevice => { cboPushbulletDevices.Items.Add(pbDevice.Name ?? Resources.UploadersConfigForm_LoadSettings_Invalid_device_name); }); cboPushbulletDevices.SelectedIndex = 0; } }