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

Annotation of /trunk/libmsmoney_unittest/Program.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12 - (hide annotations) (download)
Fri Sep 18 13:51:08 2015 UTC (4 years, 2 months ago) by william
File size: 1245 byte(s)


1 william 4 using System;
2 william 7 using libmsmoneyfile;
3     using System.IO;
4     using System.Windows.Forms;
5     using Enterprise.Logging;
6 william 4
7     namespace libmsmoney_unittest
8     {
9 william 6 class Program
10 william 4 {
11 william 7 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 william 12 const string msmoney_file = msmoney_file1;
16 william 7
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 william 4 public static void Main (string[] args)
33     {
34 william 7 create_log ();
35 william 8 var data = MSMoneyFile.ParseMSMoneyFile (msmoney_file);
36 william 4 }
37     }
38     }

  ViewVC Help
Powered by ViewVC 1.1.22