Browse Source

Wire new help text file to the parameter.

tags/v0.1
Starbeamrainbowlabs 3 years ago
parent
commit
524df8cbd7
2 changed files with 14 additions and 2 deletions
  1. 1
    1
      SpritePacker/Help.txt
  2. 13
    1
      SpritePacker/Program.cs

+ 1
- 1
SpritePacker/Help.txt View File

@@ -6,4 +6,4 @@ Usage:
6 6
 --help		Shows this help message.
7 7
 --version	Shows the version information.
8 8
 
9
-More information can be found at https://git.starbeamrainbowlabs.com/sbrl/SpritePacker
9
+More information can be found at https://git.starbeamrainbowlabs.com/sbrl/SpritePacker

+ 13
- 1
SpritePacker/Program.cs View File

@@ -2,6 +2,7 @@
2 2
 using System.Collections.Generic;
3 3
 using System.Windows.Markup;
4 4
 using System.IO;
5
+using System.Reflection;
5 6
 
6 7
 namespace SpritePacker
7 8
 {
@@ -15,7 +16,18 @@ namespace SpritePacker
15 16
 				switch(args[i])
16 17
 				{
17 18
 					case "--help":
18
-						Console.WriteLine("Help text coming soon!");
19
+						/*
20
+						string[] resFiles = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames();
21
+						foreach (string str in resFiles)
22
+							Console.WriteLine("[{0}]", str);
23
+						*/
24
+
25
+						Assembly asm = Assembly.GetExecutingAssembly();
26
+						Stream stream = asm.GetManifestResourceStream("SpritePacker.Help.txt");
27
+						StreamReader source = new StreamReader(stream);
28
+						Console.Write(source.ReadToEnd());
29
+						source.Dispose();
30
+						stream.Dispose();
19 31
 						return;
20 32
 					case "--version":
21 33
 						Console.WriteLine("Version text coming soon!");

Loading…
Cancel
Save