private async Task RefreshLB()
        {
            DynamicControls.ResetUpdateAndDLUI(txtDLSaveTitle, txtDLSaveDescription, cmbDLSaveRegion, txtDLSaveType, txtDLHasExtData, txtDLCount, txtDLUploader, lbFilesIncludedInDownload);
            DynamicControls.ResetUpdateAndDLUI(txtMUSaveTitle, txtMUSaveDescription, cmbMUSaveRegion, txtMUSaveType, txtMUHasExtData, null, null, lbMySaveSlotsInGameFolder);
            DynamicControls.ResetUploadUI(txtSaveTitle, txtSaveDescription, cmbSaveRegion, txtHasExtData, lbSaveSlotsInGameFolder, lbGameSavesInDevice);

            await LoadSaves();
        }
        private async void MenuItemUpdate_Click(object sender, RoutedEventArgs e)
        {
            if (lbMyGameSaves.SelectedIndex == -1)
            {
                return;
            }
            else
            {
                if (lbMyGameSaves.HasItems && lbMyGameSaves.SelectedIndex >= 0)
                {
                    if (!txtMUSaveTitle.Text.Equals(""))
                    {
                        if (!txtMUSaveDescription.Equals(""))
                        {
                            if (cmbMUSaveRegion.SelectedIndex >= 0)
                            {
                                isOtherProcRunning      = true;
                                gridMyUploads.IsEnabled = false;
                                TabSaves.IsEnabled      = false;

                                //AGREGAR FilePath = FTPitem.FullName, al listMyGameSaves (desde el ftp) para poder saber desde donde debo recobrar los archivos para hacer upload y luego update.
                                listMyGameSaves[lbMyGameSaves.SelectedIndex].FilePath = await Mega.DownloadFilesAsyncForUpdate(listMyGameSaves[lbMyGameSaves.SelectedIndex].FileName, Constants.TempFolder, PBNotifyProgress, lblNotifyProgress);

                                if (listMyGameSaves[lbMyGameSaves.SelectedIndex].FilePath != null && await FTP.DownloadFilesToLocal(txtDeviceIPAddress.Text, listMyGameSaves[lbMyGameSaves.SelectedIndex].FilePath, txtMUSaveTitle.Text, txtMUSaveDescription.Text, SaveRegionMySaves, null, txtMUHasExtData, PBNotifyProgress, lblNotifyProgress))
                                {
                                    DynamicControls.ResetUploadUI(txtMUSaveTitle, txtMUSaveDescription, cmbMUSaveRegion, txtMUHasExtData, lbMySaveSlotsInGameFolder, lbMyGameSaves);
                                    await LoadSaves();
                                }
                                //Deleting TempFolder once the upload is done.
                                Misc.Dir.DeleteDir(Constants.TempFolder + System.IO.Path.DirectorySeparatorChar + "TempSaves");
                                gridMyUploads.IsEnabled = true;
                                TabSaves.IsEnabled      = true;
                            }
                            else
                            {
                                MessageBox.Show("Select the region for the save you are updating.");
                            }
                        }
                        else
                        {
                            MessageBox.Show("You must write a description for the save you want to update. Say % of completion, achievements unlocket, etc...");
                        }
                    }
                    else
                    {
                        MessageBox.Show("You must write a title for the save you want to update. Choose something brief and descriptive.");
                    }
                }
                else
                {
                    MessageBox.Show("You must select one save to update.");
                }
                isOtherProcRunning      = false;
                gridMyUploads.IsEnabled = true;
                TabSaves.IsEnabled      = true;
            }
        }
 private async void btnUpdateMySaves_Click(object sender, RoutedEventArgs e)
 {
     if (lbMyGameSaves.HasItems && lbMyGameSaves.SelectedIndex >= 0)
     {
         if (!txtMUSaveTitle.Text.Equals(""))
         {
             if (!txtMUSaveDescription.Equals(""))
             {
                 if (cmbMUSaveRegion.SelectedIndex >= 0)
                 {
                     isOtherProcRunning      = true;
                     gridMyUploads.IsEnabled = false;
                     TabSaves.IsEnabled      = false;
                     SavesClass SV = new SavesClass();
                     SV.FileName    = listMyGameSaves[lbMyGameSaves.SelectedIndex].FileName;
                     SV.Title       = txtMUSaveTitle.Text;
                     SV.Description = txtMUSaveDescription.Text;
                     SV.Region      = SaveRegionMySaves;
                     if (await Update.UpdateSaveInfo(SV, PBNotifyProgress, lblNotifyProgress))
                     {
                         DynamicControls.ResetUploadUI(txtMUSaveTitle, txtMUSaveDescription, cmbMUSaveRegion, txtMUHasExtData, lbMySaveSlotsInGameFolder, lbMyGameSaves);
                         await LoadSaves();
                     }
                     gridMyUploads.IsEnabled = true;
                     TabSaves.IsEnabled      = true;
                 }
                 else
                 {
                     MessageBox.Show("Select the region for the save you are updating.");
                 }
             }
             else
             {
                 MessageBox.Show("You must write a description for the save you want to update. Say % of completion, achievements unlocket, etc...");
             }
         }
         else
         {
             MessageBox.Show("You must write a title for the save you want to update. Choose something brief and descriptive.");
         }
     }
     else
     {
         MessageBox.Show("You must select one save to update.");
     }
     isOtherProcRunning      = false;
     gridMyUploads.IsEnabled = true;
     TabSaves.IsEnabled      = true;
 }
 private async void btnUploadSave_Click(object sender, RoutedEventArgs e)
 {
     if (lbSaveSlotsInGameFolder.HasItems && lbSaveSlotsInGameFolder.SelectedIndex >= 0)
     {
         if (!txtSaveTitle.Text.Equals(""))
         {
             if (!txtSaveDescription.Equals(""))
             {
                 if (cmbSaveRegion.SelectedIndex >= 0)
                 {
                     isOtherProcRunning   = true;
                     gridUpload.IsEnabled = false;
                     TabSaves.IsEnabled   = false;
                     if (await FTP.DownloadFilesToLocal(txtDeviceIPAddress.Text, listSaveSlots[lbSaveSlotsInGameFolder.SelectedIndex].FilePath, txtSaveTitle.Text, txtSaveDescription.Text, SaveRegionUpload, SaveTypeUpload, txtHasExtData, PBNotifyProgress, lblNotifyProgress))
                     {
                         DynamicControls.ResetUploadUI(txtSaveTitle, txtSaveDescription, cmbSaveRegion, txtHasExtData, lbSaveSlotsInGameFolder, lbGameSavesInDevice);
                         await LoadSaves();
                     }
                     //Deleting TempFolder once the upload is done.
                     Misc.Dir.DeleteDir(Constants.TempFolder + System.IO.Path.DirectorySeparatorChar + "TempSaves");
                     gridUpload.IsEnabled = true;
                     TabSaves.IsEnabled   = true;
                 }
                 else
                 {
                     MessageBox.Show("Select the region for the save you are uploading.");
                 }
             }
             else
             {
                 MessageBox.Show("You must write a description for the save to upload. Say % of completion, achievements unlocket, etc...");
             }
         }
         else
         {
             MessageBox.Show("You must write a title for the save to upload. Choose something brief and descriptive.");
         }
     }
     else
     {
         MessageBox.Show("You must select one save slot to upload.");
     }
     isOtherProcRunning   = false;
     gridUpload.IsEnabled = true;
     TabSaves.IsEnabled   = true;
 }