private void DebugNoteDiff() { if (_noteDiffSelection == null) { _noteDiffSelection = SelectedNote; } else { var d1 = Tuple.Create(SelectedNote.Text, SelectedNote.Title, SelectedNote.Tags.OrderBy(p => p).ToList(), SelectedNote.Path); var d2 = Tuple.Create(_noteDiffSelection.Text, _noteDiffSelection.Title, _noteDiffSelection.Tags.OrderBy(p => p).ToList(), _noteDiffSelection.Path); _noteDiffSelection = null; ConflictWindow.Show(Repository, Owner, SelectedNote.UniqueName, d1, d2); } }
public static void Show(NoteRepository repo, Window owner, string noteid, Tuple <string, string, List <string>, DirectoryPath> left, Tuple <string, string, List <string>, DirectoryPath> right) { var vm = new ConflictWindowViewmodel(); vm.Text1 = left.Item1; vm.Text2 = right.Item1; vm.Title1 = left.Item2; vm.Title2 = right.Item2; vm.Tags1 = left.Item3; vm.Tags2 = right.Item3; vm.Path1 = left.Item4.StrSerialize(); vm.Path2 = right.Item4.StrSerialize(); var win = new ConflictWindow(repo, noteid, left, right) { DataContext = vm }; win.Show(); }
public void ShowConflictResolutionDialog(string uuid, string txt0, string ttl0, List <string> tgs0, DirectoryPath ndp0, string txt1, string ttl1, List <string> tgs1, DirectoryPath ndp1) { ConflictWindow.Show(Repository, Owner, uuid, Tuple.Create(txt0, ttl0, tgs0, ndp0), Tuple.Create(txt1, ttl1, tgs1, ndp1)); }