//context menu sui file in invio (cancella un file inviato correttamente)
        private void Sending_files_menu_delete_click(object sender, RoutedEventArgs e)
        {
            if (sendingFiles.SelectedIndex == -1)
            {
                return;
            }
            SendingFile sf = sendingFiles.SelectedItem as SendingFile;

            if (sf.File_state == Constants.FILE_STATE.PROGRESS || sf.File_state == Constants.FILE_STATE.ACCEPTANCE || sf.File_state == Constants.FILE_STATE.PREPARATION)
            {
                this.ShowMessageAsync("Ops", "Non puoi cancellare un file in invio.\nPremi annulla per fermarlo.");
            }
            else
            {
                FilesToSend.Remove(sf);
            }
        }
        //context menu sui file in invio (cancella tutti i file inviati correttamente)
        private void Sending_files_menu_all_delete_click(object sender, RoutedEventArgs e)
        {
            List <SendingFile> tmp = new List <SendingFile>();

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