public void RemoveSearch() { if (selectedPhonePos.Count != 0) { String cleanSelectedMAC = selectedMAC.Replace(":", ""); DatiDispositivo p = selectedPhonePos.First <DatiDispositivo>(); selectedPhonePos.Remove(p); if (Pacchetto.CntrlGlobal(selectedMAC)) { //hiddenPhone hiddenPhonePos.Add(p); } else { //visiblePhone phonePos.Add(p); } } }
public void SearchMac(string selected) { String cleanSelectedMAC = selected.Replace(":", ""); if (selected != "") { selectedMAC = selected; if (Pacchetto.CntrlGlobal(selectedMAC)) { //hiddenPhone foreach (DatiDispositivo p in scatterChart.Series[2].Values) { if (p.MAC_Address.CompareTo(cleanSelectedMAC) == 0) { hiddenPhonePos.Remove(p); selectedPhonePos.Add(p); break; } } } else { //visiblePhone foreach (DatiDispositivo p in scatterChart.Series[1].Values) { if (p.MAC_Address.CompareTo(cleanSelectedMAC) == 0) { phonePos.Remove(p); selectedPhonePos.Add(p); break; } } } } }