private ItemStatus OnConflict(SyncConfiguration configuration, MetadataItem item, ItemStatus status) { var stat = status; if (Conflict != null) { var args = new SyncServiceConflictEventArgs(configuration, item, status); Conflict(this, args); stat = args.NewStatus; } return(stat); }
void syncService_Conflict(object sender, SyncServiceConflictEventArgs e) { // check if user selected to handle all subsequent conflicts in the same way if (AllNextConflictsCache.ContainsKey(e.Configuration.LocalFolder)) { e.NewStatus = AllNextConflictsCache[e.Configuration.LocalFolder]; return; } App.Current.Dispatcher.Invoke(new Action(delegate { ConflictWindow cf = new ConflictWindow(); cf.ShowDialog(e.Configuration, e.Item); e.NewStatus = cf.ItemStatus; })); }