Ejemplo n.º 1
0
        public AdvancedPage(IInvoker aInvoker, NetworkAdapter aAdapter, IUpdateListener aUpdateListener, CpDeviceReprogramListRepeater aRepeater, VersionInfoReader aVersionReader, string aId, string aViewId)
            : base(aId, aViewId)
        {
            iLock    = new object();
            iInvoker = aInvoker;

            iDeviceListAdvanced = new List <CpDeviceAdvanced>();
            iAdvancedList       = new CpDeviceAdvancedList(aAdapter, aUpdateListener, aRepeater, aVersionReader, Added, Removed);
        }
Ejemplo n.º 2
0
        private void Removed(CpDeviceAdvancedList aList, CpDeviceAdvanced aDevice)
        {
            lock (iLock)
            {
                RemoveDevice(aDevice);

                aDevice.Changed         -= Changed;
                aDevice.ProgressChanged -= Progress;
                aDevice.MessageChanged  -= Message;
                iDeviceListAdvanced.Remove(aDevice);
            }
        }
Ejemplo n.º 3
0
        private void Added(CpDeviceAdvancedList aList, CpDeviceAdvanced aDevice)
        {
            lock (iLock)
            {
                iDeviceListAdvanced.Add(aDevice);
                iDeviceListAdvanced.Sort();
                int index = iDeviceListAdvanced.IndexOf(aDevice);

                AddDevice(aDevice, index);
                aDevice.Changed         += Changed;
                aDevice.ProgressChanged += Progress;
                aDevice.MessageChanged  += Message;
            }
        }