Ejemplo n.º 1
0
        private void HardwareController_DeviceRemoved(object sender, HardwareControllerEventArgs e)
        {
            if (_programmer == null)
            {
                return;
            }
            foreach (IChipProgrammer icp in e.ListOfDevices)
            {
                if (icp != _programmer)
                {
                    continue;
                }

                _programmer.Busy  -= BusyHandler;
                _programmer.Ready -= ReadyHandler;

                _programmer = null;

                SetNoProgrammerState();
                _programmersListIsRequested = true;
                _hardwareController.GetListOfDevicesInProgrammerMode(ProgrammersManagementProc);

                break;
            }
        }
Ejemplo n.º 2
0
        public void ProgrammersManagementProc(List <IChipProgrammer> progsList)
        {
            _programmersListIsRequested = false;
            if (_programmer != null)
            {
                return;
            }
            foreach (IChipProgrammer icp in progsList)
            {
                if (icp is IOneWireProgrammer)
                {
                    _programmer = icp as IOneWireProgrammer;

                    _programmer.Busy  += BusyHandler;
                    _programmer.Ready += ReadyHandler;


                    SetProgrammerReadyState();

                    return;
                }
            }
        }