public FileConflictResolution ResolveFileConflict(string message) { if (_overwriteAll) { return(FileConflictResolution.OverwriteAll); } if (_ignoreAll) { return(FileConflictResolution.IgnoreAll); } FileConflictResolution resolution = Helpers.DispatchInvokeIfNecessary(() => { var window = new FileConflictDialog { Message = message }; bool?result = _host.ShowDialog(null, window); return((result == null || result == false) ? FileConflictResolution.Ignore : window.UserSelection); }); _overwriteAll = (resolution == FileConflictResolution.OverwriteAll); _ignoreAll = (resolution == FileConflictResolution.IgnoreAll); return(resolution); }
public FileConflictResolution ResolveFileConflict(string message) { if (_overwriteAll) { return FileConflictResolution.OverwriteAll; } if (_ignoreAll) { return FileConflictResolution.IgnoreAll; } FileConflictResolution resolution = Helpers.DispatchInvokeIfNecessary(() => { var window = new FileConflictDialog { Message = message }; bool? result = _host.ShowDialog(null, window); return (result == null || result == false) ? FileConflictResolution.Ignore : window.UserSelection; }); _overwriteAll = (resolution == FileConflictResolution.OverwriteAll); _ignoreAll = (resolution == FileConflictResolution.IgnoreAll); return resolution; }