Beispiel #1
0
        public ucTextMergeEditor(TextFileInformation fileInformation)
            : this()
        {
            this.fileInformation = fileInformation;
            toolStripButtonEnableEditing.Checked = false;
            toolStripButtonEnableEditing_CheckedChanged(toolStripButtonEnableEditing, new EventArgs());             // Apply default options

            SyntaxLanguage language = Utility.GetSyntaxLanguageForFileInformation(fileInformation);

            editorOriginal.Document.Language = language;
            editorResolved.Document.Language = language;

            if (fileInformation.PrevGenFile.HasContents == false)
            {
                displayAlgorithm = new TwoWayDiffDisplayAlgorithm(this);
                WarningText      =
                    "The previous version of the file seems to be missing. This merge is a 2 way merge," +
                    " so all changes must be examined to resolve the conflict.";
            }
            else
            {
                displayAlgorithm = new ThreeWayDiffDisplayAlgorithm(this);
            }

            Fill();
        }
        public ucTextMergeEditor()
        {
            InitializeComponent();
            editorResolved.Document.TextChanging += editorResolved_DocumentTextChanging;
            editorResolved.Document.TextChanged += editorResolved_DocumentTextChanged;
            editorResolved.Document.PreTextChanging += Document_PreTextChanging;

            displayAlgorithm = new NullDiffDisplayAlgorithm(this);
        }
Beispiel #3
0
        public ucTextMergeEditor()
        {
            InitializeComponent();
            editorResolved.Document.TextChanging    += editorResolved_DocumentTextChanging;
            editorResolved.Document.TextChanged     += editorResolved_DocumentTextChanged;
            editorResolved.Document.PreTextChanging += Document_PreTextChanging;

            displayAlgorithm = new NullDiffDisplayAlgorithm(this);
        }
        public ucTextMergeEditor(TextFileInformation fileInformation)
            : this()
        {
            this.fileInformation = fileInformation;
            toolStripButtonEnableEditing.Checked = false;
            toolStripButtonEnableEditing_CheckedChanged(toolStripButtonEnableEditing, new EventArgs()); // Apply default options

            SyntaxLanguage language = Utility.GetSyntaxLanguageForFileInformation(fileInformation);
            editorOriginal.Document.Language = language;
            editorResolved.Document.Language = language;

            if (fileInformation.PrevGenFile.HasContents == false)
            {
                displayAlgorithm = new TwoWayDiffDisplayAlgorithm(this);
                WarningText =
                    "The previous version of the file seems to be missing. This merge is a 2 way merge," +
                    " so all changes must be examined to resolve the conflict.";
            }
            else
                displayAlgorithm = new ThreeWayDiffDisplayAlgorithm(this);

            Fill();
        }