LESs/RemovePopup.xaml.cs
/// <summary>
/// Called when the restore from backup button is clicked
/// </summary>
Called when the restore from backup button is clicked
Called when the restore from backup button is clicked
void RemoveBackupButton_Click(object sender, RoutedEventArgs e)
        {
            if (VersionComboBox.SelectedItem == null)
                return;
            string FinalBackupPath = Path.Combine(Location, "LESsBackup", (string)VersionComboBox.SelectedItem);
            int FilesCopied = 0;
            foreach (string path in Directory.GetFiles(FinalBackupPath, "*.*", SearchOption.AllDirectories))
            {
                File.Copy(path, path.Replace(FinalBackupPath, Location), true);
                FilesCopied += 1;
            }
            MessageBox.Show($"Restored {FilesCopied} files. LESs has been removed from League of Legends!");
        }
void RemoveBackupButton_Click ( object sender , RoutedEventArgs e ) { if ( VersionComboBox . SelectedItem == null ) return ; string FinalBackupPath = Path . Combine ( Location , " " , ( string ) VersionComboBox . SelectedItem ) ; int FilesCopied = 0 ; foreach ( string path in Directory . GetFiles ( FinalBackupPath , " " , SearchOption . AllDirectories ) ) { File . Copy ( path , path . Replace ( FinalBackupPath , Location ) , true ) ; FilesCopied += 1 ; } MessageBox . Show ( $" Restored  { FilesCopied }  files. LESs has been removed from League of Legends! " ) ; }
Called when the restore from backup button is clicked
Called when the restore from backup button is clicked
//Copy the files from the LESsBackup into the league folder, with the same directory structure
sender
object
e
RoutedEventArgs