/[msmoney_db_parser]/trunk/libmsmoney_unittest/Program.cs
ViewVC logotype

Diff of /trunk/libmsmoney_unittest/Program.cs

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

revision 6 by william, Fri Sep 18 11:21:45 2015 UTC revision 7 by william, Fri Sep 18 12:16:52 2015 UTC
# Line 1  Line 1 
1  using System;  using System;
2    using libmsmoneyfile;
3    using System.IO;
4    using System.Windows.Forms;
5    using Enterprise.Logging;
6    
7  namespace libmsmoney_unittest  namespace libmsmoney_unittest
8  {  {
9          class Program          class Program
10          {          {
11                    const string msmoney_file1 = "/home/william/temp/msmoney/My Money.mny";
12                    const string msmoney_file2 = "/home/william/temp/msmoney/My Money Backup 0.mbf";
13                    const string msmoney_file3 = "/home/william/temp/msmoney/My Money.M14";
14    
15                    const string msmoney_file = msmoney_file2;
16    
17                    static void Log_OnFlush(object sender, LoggerOnFlushEventArgs e) { OnLogFlush(e.Buffer); }
18                    static void OnLogFlush(string logmessage)
19                    {
20                            //if (this.IsDisposed) { return; }
21                            ////UpdateStatus(logmessage);
22                            ////UpdateLogOutput(logmessage);
23                            //Application.DoEvents();
24                    }
25                    static void create_log()
26                    {
27                            string log_path = Application.StartupPath;
28                            string log_filename = string.Format("{0}.log", typeof(Program).Assembly.GetName().Name);
29                            FileInfo log_file = new FileInfo(string.Format(@"{0}\{1}", log_path, log_filename));
30                            gLog.CreateLog(log_file.FullName, false, LogLevel.kLogLevel_All_NoProgress, new EventHandler<LoggerOnFlushEventArgs>(Log_OnFlush));
31                    }
32                  public static void Main (string[] args)                  public static void Main (string[] args)
33                  {                  {
34                          Console.WriteLine ("Hello World!");                          create_log ();
35                            IMSMoneyFile file = MSMoneyFile.OpenMSMoneyFile (msmoney_file);
36                  }                  }
37          }          }
38  }  }

Legend:
Removed from v.6  
changed lines
  Added in v.7

  ViewVC Help
Powered by ViewVC 1.1.22