private void HandleConflictWithDialog(SvnConflictEventArgs e)
        {
            using (MergeConflictHandlerDialog dlg = new MergeConflictHandlerDialog(e))
            {
                if (dlg.ShowDialog(Context) == DialogResult.OK)
                {
                    e.Choice = dlg.ConflictResolution;
                    bool applyToAll = dlg.ApplyToAll;
                    // modify the preferences based on the conflicted file type
                    if (applyToAll)
                    {
                        PropertyConflictResolutionChoice = e.Choice;
                        PromptOnPropertyConflict = false;
                        BinaryConflictResolutionChoice = e.Choice;
                        PromptOnBinaryConflict = false;
                        TextConflictResolutionChoice = e.Choice;
                        PromptOnTextConflict = false;
                    }
                    else
                    {
                        bool applyToType = dlg.ApplyToType;
                        if (applyToType)
                        {
                            if (e.ConflictType == SvnConflictType.Property)
                            {
                                PropertyConflictResolutionChoice = e.Choice;
                                PromptOnPropertyConflict = false;
                            }
                            else if (e.IsBinary)
                            {
                                BinaryConflictResolutionChoice = e.Choice;
                                PromptOnBinaryConflict = false;
                            }
                            else
                            {
                                TextConflictResolutionChoice = e.Choice;
                                PromptOnTextConflict = false;
                            }
                        }
                    }
                    // TODO handle merged file option
                }
                else
                {
                    // Aborts the current operation.
                    e.Cancel = true;
                }
            }

            AddToCurrentResolutions(e);
        }
Beispiel #2
0
        private void HandleConflictWithDialog(SvnConflictEventArgs e)
        {
            using (MergeConflictHandlerDialog dlg = new MergeConflictHandlerDialog(e))
            {
                if (dlg.ShowDialog(Context) == DialogResult.OK)
                {
                    e.Choice = dlg.ConflictResolution;
                    bool applyToAll = dlg.ApplyToAll;
                    // modify the preferences based on the conflicted file type
                    if (applyToAll)
                    {
                        PropertyConflictResolutionChoice = e.Choice;
                        PromptOnPropertyConflict = false;
                        BinaryConflictResolutionChoice = e.Choice;
                        PromptOnBinaryConflict = false;
                        TextConflictResolutionChoice = e.Choice;
                        PromptOnTextConflict = false;
                    }
                    else
                    {
                        bool applyToType = dlg.ApplyToType;
                        if (applyToType)
                        {
                            if (e.ConflictType == SvnConflictType.Property)
                            {
                                PropertyConflictResolutionChoice = e.Choice;
                                PromptOnPropertyConflict = false;
                            }
                            else if (e.IsBinary)
                            {
                                BinaryConflictResolutionChoice = e.Choice;
                                PromptOnBinaryConflict = false;
                            }
                            else
                            {
                                TextConflictResolutionChoice = e.Choice;
                                PromptOnTextConflict = false;
                            }
                        }
                    }
                    // TODO handle merged file option
                }
                else
                {
                    // Aborts the current operation.
                    e.Cancel = true;
                }
            }

            AddToCurrentResolutions(e);
        }