Ejemplo n.º 1
0
 private static bool TryToLoadThemeList(TmNode node)
 {
     //FIXME - need to load as much as possible on exception.
     if (node == null)
         return false;
     Trace.TraceInformation("{0}: Start building node {1}", DateTime.Now, node.Name); Stopwatch time = Stopwatch.StartNew(); 
     try
     {
         //FIXME: do I need to do any locking on this node?
         node.Build();
     }
     catch (Exception ex)
     {
         string msg = string.Format("Error Loading Theme\nMessage: {0}\nMethod: {1}", ex.Message, ex.TargetSite);
         MessageBox.Show(msg, "oh, no!");
         return false;
     }
     time.Stop(); Trace.TraceInformation("{0}: Done building node {1} - Elapsed Time: {2}", DateTime.Now, node.Name, time.Elapsed);
     return true;
 }