Ejemplo n.º 1
0
        private static string MakeHtmlForIncompatibleMove(IConflict conflict, string oldGuid, string elementGuid, XElement element)
        {
            var doc = new XmlDocument();

            doc.LoadXml(element.ToString());
            var sb = new StringBuilder("<head><style type='text/css'>");

            sb.Append(FieldWorkObjectContextGenerator.DefaultHtmlContextStyles(doc.DocumentElement));
            sb.Append("</style></head><body><div class='description'>");
            sb.Append(conflict.GetFullHumanReadableDescription());
            string className = element.Name.LocalName;
            var    classAttr = element.Attribute("class");

            if (classAttr != null)
            {
                className = classAttr.Value;
            }
            sb.Append(String.Format("</div><div> The object that was copied is a {0}:", className));
            sb.Append("</div><div class=\"description\">");
            sb.Append(new FwGenericHtmlGenerator().MakeHtml(doc.DocumentElement));
            sb.Append("</div><div>The original is ");
            MakeSilfwLink(oldGuid, sb);
            sb.Append("</div><div>The copy is ");
            MakeSilfwLink(elementGuid, sb);
            sb.Append("</div></body>");
            return(sb.ToString());
        }
		private static string MakeHtmlForIncompatibleMove(IConflict conflict, string oldGuid, string elementGuid, XElement element)
		{
			var doc = new XmlDocument();
			doc.LoadXml(element.ToString());
			var sb = new StringBuilder("<head><style type='text/css'>");
			sb.Append(FieldWorkObjectContextGenerator.DefaultHtmlContextStyles(doc.DocumentElement));
			sb.Append("</style></head><body><div class='description'>");
			sb.Append(conflict.GetFullHumanReadableDescription());
			string className = element.Name.LocalName;
			var classAttr = element.Attribute("class");
			if (classAttr != null)
				className = classAttr.Value;
			sb.Append(String.Format("</div><div> The object that was copied is a {0}:", className));
			sb.Append("</div><div class=\"description\">");
			sb.Append(new FwGenericHtmlGenerator().MakeHtml(doc.DocumentElement));
			sb.Append("</div><div>The original is ");
			MakeSilfwLink(oldGuid, sb);
			sb.Append("</div><div>The copy is ");
			MakeSilfwLink(elementGuid, sb);
			sb.Append("</div></body>");
			return sb.ToString();
		}
Ejemplo n.º 3
0
 public void WarningOccurred(IConflict warning)
 {
     _stream.WriteLine("warning: "+warning.GetFullHumanReadableDescription());
 }
Ejemplo n.º 4
0
 public void ConflictOccurred(IConflict conflict)
 {
     _stream.WriteLine(conflict.GetFullHumanReadableDescription());
 }
Ejemplo n.º 5
0
 public void WarningOccurred(IConflict warning)
 {
     _stream.WriteLine($"warning: {warning.GetFullHumanReadableDescription()}");
 }
Ejemplo n.º 6
0
 public void ConflictOccurred(IConflict conflict)
 {
     _stream.WriteLine(conflict.GetFullHumanReadableDescription());
 }