a/trunk/cforge/cforge/Program.cs | b/trunk/cforge/cforge/Program.cs | ||
---|---|---|---|
... |
... |
||
8 | namespace cforge |
8 | namespace cforge |
9 | { |
9 | { |
10 | class Program |
10 | class Program |
11 | { |
11 | { |
12 | static void Main(string[] args) |
12 | static void Main(string[] args) |
13 | { |
13 | { |
14 | |||
15 | |||
14 | Console.WriteLine(""); |
16 | Console.WriteLine(""); |
15 | Console.WriteLine(@"----------------------------------------------------------------------------"); |
17 | Console.WriteLine(@"----------------------------------------------------------------------------"); |
16 | Console.WriteLine("cforge started"); |
18 | Console.WriteLine("cforge started"); |
17 | Console.WriteLine(@"----------------------------------------------------------------------------"); |
19 | Console.WriteLine(@"----------------------------------------------------------------------------"); |
18 | Console.WriteLine(""); |
20 | Console.WriteLine(""); |
19 | 21 | if (Helper.EasyAttachEnabled()) |
|
22 | { |
||
23 | Console.WriteLine("Easy attach enabled. Now attach with debugger, and then press Enter here!"); |
||
24 | Console.ReadLine(); |
||
25 | } |
||
20 | 26 | ||
21 | if (args.Length == 1 && args[0].StartsWith("cforge:")) |
27 | if (args.Length == 1 && args[0].StartsWith("cforge:")) |
22 | { |
28 | { |
23 | // invokation via URL Handler: |
29 | // invokation via URL Handler: |
24 | // format is |
30 | // format is |
... |
... |
||
28 | String arg = args[0].Remove(0, "cforge:".Length); |
34 | String arg = args[0].Remove(0, "cforge:".Length); |
29 | List<string> newargs = new List<string>(); |
35 | List<string> newargs = new List<string>(); |
30 | 36 | ||
31 | String command = "--" + arg.Split(':')[0]; |
37 | String command = "--" + arg.Split(':')[0]; |
32 | newargs.Add(command); |
38 | newargs.Add(command); |
33 | string s = System.Uri.UnescapeDataString(arg.Remove(0, command.Length + 1)); |
39 | string s = System.Uri.UnescapeDataString(arg.Remove(0, arg.Split(':')[0].Length + 1)); |
34 | s = System.Uri.UnescapeDataString(s); |
40 | s = System.Uri.UnescapeDataString(s); |
35 | newargs.Add(s); |
41 | newargs.Add(s); |
36 | 42 | ||
37 | args = newargs.ToArray(); |
43 | args = newargs.ToArray(); |
38 | } |
44 | } |
... |
... |
||
123 | Console.WriteLine(@"----------------------------------------------------------------------------"); |
129 | Console.WriteLine(@"----------------------------------------------------------------------------"); |
124 | Console.WriteLine("cforge finished."); |
130 | Console.WriteLine("cforge finished."); |
125 | Console.WriteLine(@"----------------------------------------------------------------------------"); |
131 | Console.WriteLine(@"----------------------------------------------------------------------------"); |
126 | Console.WriteLine(""); |
132 | Console.WriteLine(""); |
127 | 133 | ||
128 | //Console.ReadLine(); |
134 | Console.ReadLine(); |
129 | } |
135 | } |
130 | 136 | ||
131 | static void ShowUsage() |
137 | static void ShowUsage() |
132 | { |
138 | { |
133 | // pad right 32 for description ;-) |
139 | // pad right 32 for description ;-) |