//context menu sui file in ricezione (cancella un file ricevuto correttamente)
        private void Receiving_files_menu_delete_click(object sender, RoutedEventArgs e)
        {
            if (listReceivingFiles.SelectedIndex == -1)
            {
                return;
            }
            ReceivingFile rf = listReceivingFiles.SelectedItem as ReceivingFile;

            if (rf.File_state == Constants.FILE_STATE.PROGRESS)
            {
                this.ShowMessageAsync("Ops", "Attendi il completamento del file");
            }
            else
            {
                FilesToReceive.Remove(rf);
            }
        }
        //context menu sui file in ricezione (cancella tutti i file ricevuti correttamente)
        private void Receiving_files_menu_all_delete_click(object sender, RoutedEventArgs e)
        {
            List <ReceivingFile> tmp = new List <ReceivingFile>();

            foreach (ReceivingFile rf in FilesToReceive)
            {
                if (rf.File_state == Constants.FILE_STATE.ERROR || rf.File_state == Constants.FILE_STATE.COMPLETED || rf.File_state == Constants.FILE_STATE.CANCELED)
                {
                    tmp.Add(rf);
                }
            }
            if (tmp.Count == 0)
            {
                this.ShowMessageAsync("Ops", "Non ci sono file da archiviare.");
            }
            foreach (ReceivingFile rf in tmp)
            {
                FilesToReceive.Remove(rf);
            }
        }