/[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

--- trunk/libmsmoney_unittest/Program.cs	2015/09/18 11:21:45	6
+++ trunk/libmsmoney_unittest/Program.cs	2015/09/18 12:16:52	7
@@ -1,12 +1,38 @@
 using System;
+using libmsmoneyfile;
+using System.IO;
+using System.Windows.Forms;
+using Enterprise.Logging;
 
 namespace libmsmoney_unittest
 {
 	class Program
 	{
+		const string msmoney_file1 = "/home/william/temp/msmoney/My Money.mny";
+		const string msmoney_file2 = "/home/william/temp/msmoney/My Money Backup 0.mbf";
+		const string msmoney_file3 = "/home/william/temp/msmoney/My Money.M14";
+
+		const string msmoney_file = msmoney_file2;
+
+		static void Log_OnFlush(object sender, LoggerOnFlushEventArgs e) { OnLogFlush(e.Buffer); }
+		static void OnLogFlush(string logmessage)
+		{
+			//if (this.IsDisposed) { return; }
+			////UpdateStatus(logmessage);
+			////UpdateLogOutput(logmessage);
+			//Application.DoEvents();
+		}
+		static void create_log()
+		{
+			string log_path = Application.StartupPath;
+			string log_filename = string.Format("{0}.log", typeof(Program).Assembly.GetName().Name);
+			FileInfo log_file = new FileInfo(string.Format(@"{0}\{1}", log_path, log_filename));
+			gLog.CreateLog(log_file.FullName, false, LogLevel.kLogLevel_All_NoProgress, new EventHandler<LoggerOnFlushEventArgs>(Log_OnFlush));
+		}
 		public static void Main (string[] args)
 		{
-			Console.WriteLine ("Hello World!");
+			create_log ();
+			IMSMoneyFile file = MSMoneyFile.OpenMSMoneyFile (msmoney_file);
 		}
 	}
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22