/**************************************************************** * Public Functions **/ public void UpdateDevices () { List<DeviceData> test = new List<DeviceData>(); foreach (DeviceData i in m_devices) { DeviceData device = new DeviceData(i.Name); device.UpdateStatus(i.DeviceStatus); test.Add(device); } m_scrollerDevices.ItemsSource = test; m_scrollerDevices.UpdateLayout(); }
/// <summary> /// Getting the list of detected bluetooth devices /// </summary> /// <param name="p_devices"></param> private void OnFetchedKreyosDevices (List<string> p_devices) { m_devices.Clear(); if (p_devices != null && p_devices.Count > 0) { m_devices = new List<DeviceData>(); foreach (string name in p_devices) { DeviceData device = new DeviceData(name); device.Index = m_devices.Count; m_devices.Add(device); } this.UpdateDevices(); } }