Ejemplo n.º 1
0
 void AppState_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName == "TraceEnabled")
     {
         if (AppState.TraceEnabled)
         {
             if (m_linguaTraceListener == null)
             {
                 m_linguaTraceListener = new LinguaTraceListener(Dispatcher, WriteTraceLine);
                 LinguaTrace.TraceSource.Listeners.Add(m_linguaTraceListener);
             }
         }
         else
         {
             if (m_linguaTraceListener != null)
             {
                 LinguaTrace.TraceSource.Listeners.Remove(m_linguaTraceListener);
                 m_linguaTraceListener = null;
             }
         }
     }
 }
Ejemplo n.º 2
0
 void AppState_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName == "TraceEnabled")
     {
         if (AppState.TraceEnabled)
         {
             if (m_linguaTraceListener == null)
             {
                 m_linguaTraceListener = new LinguaTraceListener(Dispatcher, WriteTraceLine);
                 LinguaTrace.TraceSource.Listeners.Add(m_linguaTraceListener);
             }
         }
         else
         {
             if (m_linguaTraceListener != null)
             {
                 LinguaTrace.TraceSource.Listeners.Remove(m_linguaTraceListener);
                 m_linguaTraceListener = null;
             }
         }
     }
 }