Ejemplo n.º 1
0
 public static string GetHtml(Manager manager, string rootNodeID)
 {
     var stringWriter = new StringWriter();
     var htmlWriter = new HtmlWriter( manager );
     htmlWriter.Write( stringWriter, rootNodeID );
     return stringWriter.ToString();
 }
Ejemplo n.º 2
0
 public string ToString(Manager manager)
 {
     return manager.Translate( TextKey, Parameters );
 }
Ejemplo n.º 3
0
 public XmlSerializer(Manager manager)
 {
     Tree = manager.Tree;
 }
Ejemplo n.º 4
0
 public string ToString(Manager manager)
 {
     return(manager.Translate(TextKey, Parameters));
 }
Ejemplo n.º 5
0
 public HtmlWriter(Manager manager)
 {
     Manager = manager;
 }
Ejemplo n.º 6
0
 public static string GetText(Manager manager)
 {
     var textWriter = new CommonLibs.ExceptionManager.TextWriter( manager );
     return textWriter.GetString();
 }
Ejemplo n.º 7
0
 public override string ToString()
 {
     return(Manager.Translate_DefaultImplementation(TextKey, Parameters));
 }
Ejemplo n.º 8
0
 public TextWriter(Manager manager)
 {
     Manager = manager;
 }
Ejemplo n.º 9
0
 internal static string GetElementValue(object value, Manager manager)
 {
     System.Diagnostics.Debug.Assert( value != null, "The 'Value' property of a node is not supposed to be null" );
     var valueTranslatable = value as TranslatableElement;
     if( valueTranslatable != null )
         return valueTranslatable.ToString( manager );
     else
         return value.ToString();
 }
Ejemplo n.º 10
0
        internal static string GetElementName(object nodeName, Manager manager)
        {
            System.Diagnostics.Debug.Assert( nodeName != null, "The 'Name' property of a node of type 'object' or 'field' is not supposed to be null." );
            System.Diagnostics.Debug.Assert( (nodeName.GetType() == typeof(string)) || (nodeName.GetType() == typeof(TranslatableElement)), "The 'Name' property is of an unknown type." );

            var translatable = nodeName as TranslatableElement;
            if( translatable != null )
                return translatable.ToString( manager );
            else
                return nodeName.ToString();
        }
Ejemplo n.º 11
0
 public JsonSerializer(Manager manager)
 {
     Tree = manager.Tree;
 }
Ejemplo n.º 12
0
 private void SetManager(Manager manager)
 {
     exceptionManager = manager;
     string text;
     if( manager == null )
         text = "";
     else
         text = CommonLibs.ExceptionManager.TextWriter.GetText( manager );
     //var textStream = new MemoryStream( (new UTF8Encoding()).GetBytes(text) );
     //var textRange = new TextRange( txtDocument.ContentStart, txtDocument.ContentEnd );
     //textRange.Load( textStream, System.Windows.DataFormats.Text );
     txtText.Text = text;
 }