Exemplo n.º 1
0
        /// <summary>
        /// Create a new log from a file name.
        /// </summary>
        /// <param name="logFileName">The file name.</param>
        static public IFCImportLog CreateLog(string logFileName)
        {
            IFCImportLog importLog = new IFCImportLog();

            try
            {
                importLog.OpenLog(logFileName);
                importLog.WriteLine("<A NAME=\"Warnings and Errors\"></A>Warnings and Errors");
                importLog.WriteLine("");
            }
            catch
            {
                // TODO: potentially alert user if log file can't be created.
            }
            return(importLog);
        }
Exemplo n.º 2
0
        static private bool CreateLogInternal(IFCImportLog importLog, string logFileName)
        {
            try
            {
                importLog.OpenLog(logFileName);
            }
            catch
            {
                return(false);
            }

            if (importLog.LoggingEnabled)
            {
                importLog.WriteLine("<A NAME=\"Warnings and Errors\"></A>Warnings and Errors");
                importLog.WriteLine("");
                return(true);
            }

            return(false);
        }
      static private bool CreateLogInternal(IFCImportLog importLog, string logFileName)
      {
         try
         {
            importLog.OpenLog(logFileName);
         }
         catch
         {
            return false;
         }

         if (importLog.LoggingEnabled)
         {
            importLog.WriteLine("<A NAME=\"Warnings and Errors\"></A>Warnings and Errors");
            importLog.WriteLine("");
            return true;
         }

         return false;
      }
Exemplo n.º 4
0
 /// <summary>
 /// Create a new log from a file name.
 /// </summary>
 /// <param name="logFileName">The file name.</param>
 static public IFCImportLog CreateLog(string logFileName)
 {
     IFCImportLog importLog = new IFCImportLog();
     try
     {
         importLog.OpenLog(logFileName);
         importLog.WriteLine("<A NAME=\"Warnings and Errors\"></A>Warnings and Errors");
         importLog.WriteLine("");
     }
     catch
     {
         // TODO: potentially alert user if log file can't be created.
     }
     return importLog;
 }