Esempio 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();
 }
Esempio n. 2
0
 public string ToString(Manager manager)
 {
     return manager.Translate( TextKey, Parameters );
 }
Esempio n. 3
0
 public XmlSerializer(Manager manager)
 {
     Tree = manager.Tree;
 }
Esempio n. 4
0
 public string ToString(Manager manager)
 {
     return(manager.Translate(TextKey, Parameters));
 }
Esempio n. 5
0
 public HtmlWriter(Manager manager)
 {
     Manager = manager;
 }
Esempio n. 6
0
 public static string GetText(Manager manager)
 {
     var textWriter = new CommonLibs.ExceptionManager.TextWriter( manager );
     return textWriter.GetString();
 }
Esempio n. 7
0
 public override string ToString()
 {
     return(Manager.Translate_DefaultImplementation(TextKey, Parameters));
 }
Esempio n. 8
0
 public TextWriter(Manager manager)
 {
     Manager = manager;
 }
Esempio 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();
 }
Esempio 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();
        }
Esempio n. 11
0
 public JsonSerializer(Manager manager)
 {
     Tree = manager.Tree;
 }
Esempio 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;
 }