private void DisableButtons(CopyAction disableFlags) { if (disableFlags.HasFlag(CopyAction.Overwrite)) { Overwrite.IsEnabled = false; OverwriteAll.IsEnabled = false; OverwriteAllOlder.IsEnabled = false; } if (disableFlags.HasFlag(CopyAction.OverwriteOlder)) { OverwriteAllOlder.IsEnabled = false; } if (disableFlags.HasFlag(CopyAction.Resume)) { Resume.IsEnabled = false; ResumeAll.IsEnabled = false; } if (disableFlags.HasFlag(CopyAction.Rename)) { Rename.IsEnabled = false; } }