/[xmltv_parser]/trunk/xmltv_parser/main.cs
ViewVC logotype

Diff of /trunk/xmltv_parser/main.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 62 by william, Fri Mar 8 14:24:17 2013 UTC revision 68 by william, Sat Mar 9 01:28:31 2013 UTC
# Line 18  namespace xmltv_parser Line 18  namespace xmltv_parser
18    
19      public partial class main : Form      public partial class main : Form
20      {      {
         //bool form_closing = false;  
         //private IXMLTVRuntimeInstance xmltv;  
         private bool IsUnix  
         {  
             get { return System.Environment.OSVersion.Platform == PlatformID.Unix; }  
         }  
   
21          public main()          public main()
22          {          {
23              InitializeComponent();              InitializeComponent();
24              ListViewSorter Sorter = new ListViewSorter();              ListViewSorter Sorter = new ListViewSorter();
25              lstPrograms.ListViewItemSorter = Sorter;              lstPrograms.ListViewItemSorter = Sorter;
   
26              string log_path = Application.StartupPath;              string log_path = Application.StartupPath;
27              string log_filename = string.Format("{0}.log", typeof(main).Assembly.GetName().Name);              string log_filename = string.Format("{0}.log", typeof(main).Assembly.GetName().Name);
28              gLog.CreateLog(string.Format(@"{0}\{1}", log_path, log_filename), false, LogLevel.kLogLevel_All_NoProgress, new EventHandler<LoggerOnFlushEventArgs>(Log_OnFlush));              gLog.CreateLog(string.Format(@"{0}\{1}", log_path, log_filename), false, LogLevel.kLogLevel_All_NoProgress, new EventHandler<LoggerOnFlushEventArgs>(Log_OnFlush));
29              gLog.SetLogLevel(gLog.LogLevel & ~LogLevel.kLogLevel_VerboseDebug);  #if DEBUG
30                LogLevel gLevel = gLog.LogLevel;
31                gLevel |= LogLevel.kLogLevel_VerboseDebug; // this slows things down alot
32                gLevel |= LogLevel.kLogLevel_Debug;            
33                gLog.SetLogLevel(gLevel);
34    #else
35                LogLevel gLevel = LogLevel.kLogLevel_Default; // set the default log level: Info, Warn, Error, Debug
36                // it is OK for kLogLevel_Debug to be set in Release mode ... must of the chatty messages are from kLogLevel_VerboseDebug
37                gLevel &= ~LogLevel.kLogLevel_VerboseDebug; // ensure this is not set            
38                gLog.SetLogLevel(gLevel);
39    #endif
40    
41    
42              gLog.ReportProgressEvent += new EventHandler<ReportProgressEventArgs>(gLog_ReportProgress);              gLog.ReportProgressEvent += new EventHandler<ReportProgressEventArgs>(gLog_ReportProgress);
43          }          }
44    

Legend:
Removed from v.62  
changed lines
  Added in v.68

  ViewVC Help
Powered by ViewVC 1.1.22