示例#1
0
        public override IDisposable ConflictPrompt(ConflictPromptConfig config)
        {
            var vm = new ConflictDialogViewModel
            {
                //no properties which we can set here from config currently
            };

            vm.Base.Add(config.Conflict.Base);
            vm.LocalVersion.Add(config.Conflict.Mine);
            vm.Theirs.Add(config.Conflict.Theirs);

            vm.SubmitConflictCommand = new Command(() =>
                                                   config.OnAction?.Invoke(new ConflictPromptResult(vm.WasOk, vm.SelectedConflict))
                                                   );

            /* Excerpt from previous Handle OK Click Event
             * e.Handled = true;
             * WasOk = !((Button)sender).IsCancel;
             * Close();
             */

            var dlg = new ConflictDialog()
            {
                DataContext = vm
            };

            dlg.ShowDialog();
示例#2
0
 public abstract IDisposable ConflictPrompt(ConflictPromptConfig config);