コード例 #1
0
 /****************************************************************
  * 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();
 }
コード例 #2
0
        /// <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();
            }
        }