void FillListBox()
 {
     if (this.InvokeRequired)
     {
         this.Invoke((MethodInvoker) delegate
         {
             FillListBox();
         });
         return;
     }
     else
     {
         bool inputsupported = false;
         listBox1.Items.Clear();
         var list = busylight.GetAttachedBusylightDeviceList();
         foreach (var s in list)
         {
             listBox1.Items.Add(s.ProductID + "  " + s.USBID + " " + s.FirmwareRelease + " " + "test");
             if (s.IsInputEventSupported)
             {
                 inputsupported = true;
             }
         }
         pnlKuandoBox.Visible = inputsupported;
     }
 }
        public void Load(IServiceProvider serviceProvider)
        {
            _notification = (INotificationService)serviceProvider.GetService(typeof(INotificationService));
            _timer.Stop();
            _timer.Elapsed += TimerElasped;


            busylight = new Busylight.SDK(true);

            //Check to see if they have one attached, else why load?
            var list = busylight.GetAttachedBusylightDeviceList();

            if (list.Length == 0)
            {
                //_notification.Notify("No Busy Light Detected. Stopping Status Light App Load", "Not Detected", NotificationType.Info,TimeSpan.FromSeconds(10));
                return;
            }

            //Lets look for a config file
            ConfigLoad();

            //got this far try to get a session and then a People manager instance so that we can watch a user's status
            try
            {
                _session = (Session)serviceProvider.GetService(typeof(Session));

                if (_session != null)
                {
                    try
                    {
                        _people = PeopleManager.GetInstance(_session);

                        if (_people != null)
                        {
                            StartWatch();
                        }
                    }
                    catch (Exception)
                    {
                        throw;
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }