/[gr2lib]/trunk/gr2lib_UnitTest/Program.cs
ViewVC logotype

Diff of /trunk/gr2lib_UnitTest/Program.cs

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

--- trunk/gr2lib_UnitTest/Program.cs	2010/07/15 09:29:25	69
+++ trunk/gr2lib_UnitTest/Program.cs	2010/07/15 12:55:21	70
@@ -3,9 +3,11 @@
 using System.Text;
 
 using gr2lib.core;
+//using gr2lib.core.coretypes;
 using gr2lib.core.apiversion;
 using gr2lib.core.exceptions;
 using gr2lib.core.helpers;
+using gr2lib.core.coretypes.implementation;
 
 namespace gr2lib_UnitTest
 {
@@ -17,6 +19,7 @@
             string GrannyFilename = shared.GRANNY_TEST_FILE;
             try
             {
+                #region Check Granny2 API Version
                 // Setup access to check loaded Granny2 API Version
                 granny2apiversion apiversion = new granny2apiversion(shared.EXPECTED_API_VERSION);
 
@@ -35,8 +38,9 @@
                     // the loaded version matches
                     Console.WriteLine("Loaded granny2.dll: " + apiversion.apiversion.version);
                 }
-                
-                // parse commandline
+                #endregion
+
+                #region Parse Commandline
                 if (args.Length == 1)
                 {
                     GrannyFilename = args[0];
@@ -54,9 +58,29 @@
                 {
                     throw new System.IO.FileNotFoundException("Unable to find: " + GrannyFilename);
                 }
+                #endregion
+
+                #region test
+                unsafe
+                {
+
 
-                
+                    grnfileinfo info = grnfileinfo.ReadFromFile(GrannyFilename);
 
+                    Console.WriteLine();
+                    Console.WriteLine("Art Tool Data:");
+                    Console.WriteLine("\tTool Name: " + info.ArtToolInfo.FromArtToolName);
+                    Console.WriteLine("\tTool Version: " + string.Format("{0}.{1}", info.ArtToolInfo.ArtToolMajorRevision, info.ArtToolInfo.ArtToolMinorRevision));
+                    Console.WriteLine("\tTool Units Per Meter: " + info.ArtToolInfo.UnitsPerMeter);
+
+                    Console.WriteLine("\tTool Origin: " + string.Format("[{0},{1},{2}]", info.ArtToolInfo.Origin.X, info.ArtToolInfo.Origin.Y, info.ArtToolInfo.Origin.Z));
+                    Console.WriteLine("\tTool Right: " + string.Format("[{0},{1},{2}]", info.ArtToolInfo.Right.X, info.ArtToolInfo.Right.Y, info.ArtToolInfo.Right.Z));
+                    Console.WriteLine("\tTool Up: " + string.Format("[{0},{1},{2}]", info.ArtToolInfo.Up.X, info.ArtToolInfo.Up.Y, info.ArtToolInfo.Up.Z));
+                    Console.WriteLine("\tTool Back: " + string.Format("[{0},{1},{2}]", info.ArtToolInfo.Back.X, info.ArtToolInfo.Back.Y, info.ArtToolInfo.Back.Z));
+
+                    Console.WriteLine("\tTool ExtendedData: " + info.ArtToolInfo.ExtendedData);
+                }
+                #endregion
 
             }
             catch (granny2apiloadexception ex)
@@ -70,3 +94,4 @@
         }
     }
 }
+

 

  ViewVC Help
Powered by ViewVC 1.1.22