示例#1
0
            public void MakeDiffPangoMarkup()
            {
                var d      = new Differ();
                var differ = new SideBySideFullDiffBuilder(d);

                AddressNode pair;

                if (myDuplicateNode.Addresses.Count == 2)
                {
                    pair = myDuplicateNode.Addresses.First(x => x.IsMain != IsMain);
                    var diffRes = differ.BuildDiffModel(pair.Address.Address1c, Address.Address1c);
                    PangoText = PangoRender.RenderDiffLines(diffRes.NewText);
                }
                else
                {
                    if (IsMain)
                    {
                        PangoText = Address.Address1c;
                    }
                    else
                    {
                        pair = myDuplicateNode.Addresses.First(x => x.IsMain);
                        var diffRes = differ.BuildDiffModel(pair.Address.Address1c, Address.Address1c);
                        PangoText = PangoRender.RenderDiffLines(diffRes.NewText);
                    }
                }
            }
示例#2
0
        private void MakeDiffPangoMarkup()
        {
            var d       = new Differ();
            var differ  = new SideBySideFullDiffBuilder(d);
            var diffRes = differ.BuildDiffModel(OldValue, NewValue);

            OldPangoText = PangoRender.RenderDiffLines(diffRes.OldText);
            NewPangoText = PangoRender.RenderDiffLines(diffRes.NewText);
            isPangoMade  = true;
        }