private async void FixConflictByKeepAsIs(object parameter) { var listView = parameter as ListView; if (listView == null) { return; } var selectedList = new List <SyncInfoDetail>(); var usageHint = false; foreach (SyncInfoDetail detail in listView.SelectedItems) { if (detail.ConflictType == ConflictType.BothChanged || detail.ConflictType == ConflictType.BothNew) { detail.ConflictSolution = ConflictSolution.KeepAsIs; SyncDbUtils.SaveSyncInfoDetail(detail); selectedList.Add(detail); } else { usageHint = true; } } selectedList.ForEach(x => ConflictList.Remove(x)); if (!usageHint) { return; } var dialog = new ContentDialog { Title = _resourceLoader.GetString("SyncKeepAsIsHintTitle"), Content = new TextBlock { Text = _resourceLoader.GetString("SyncKeepAsIsHintDesc"), TextWrapping = TextWrapping.WrapWholeWords, Margin = new Thickness(0, 20, 0, 0) }, PrimaryButtonText = _resourceLoader.GetString("OK") }; await _dialogService.ShowAsync(dialog); }
private void FixConflictByRemote(object parameter) { var listView = parameter as ListView; if (listView == null) { return; } var selectedList = new List <SyncInfoDetail>(); foreach (SyncInfoDetail detail in listView.SelectedItems) { detail.ConflictSolution = ConflictSolution.PreferRemote; SyncDbUtils.SaveSyncInfoDetail(detail); selectedList.Add(detail); } selectedList.ForEach(x => ConflictList.Remove(x)); }