--- xmlTools/trunk/posUpdate/ParametersParser.cs 2013/03/26 02:30:48 742 +++ xmlTools/trunk/posUpdate/ParametersParser.cs 2013/05/08 21:52:38 861 @@ -11,9 +11,9 @@ namespace xmlTools // Define a class to receive parsed values class ParametersParser { - private static string globalFileName=""; - private static string globalElement=""; - private static string globalParentElement=""; + private static string globalFileName = ""; + private static string globalElement = ""; + private static string globalParentElement = ""; private static bool globalNoBackups = false; [Verb] @@ -50,11 +50,11 @@ namespace xmlTools public static void updateChainValues( [Parameter(Required = true, Description = "The new first value of the chain. All the chain will be updated based on this value")] string newValue, [Parameter(Description = "Value which have some kind of relation with -newVal \n Together with -newVal updates all the values based on the" + - "-newVal and another position specified on -valRelation parameter (basically starts with (newVal-valRelation) ) Is especially useful when" + + "-newvalue and another position specified on -valrelation parameter (basically starts with (newvalue-valrelation) ) Is especially useful when" + "updating multiple related chains (on different files), like multiple objects from one position to another. Don't use with -filename, because" + - "it will only update one file. \nExample: xmlTools.exe -newVal \"1 1 1\" -valRelation \"4 4 4\" -valElement Translation -valParentElement" + + "it will only update one file. \nExample: xmlTools.exe updatechainvalues -filename:OBANheli_body_center.xml -newvalue:\"1 1 1\" -valrelation:\"4 4 4\" -element:Translation -parelement:" + "OBANKeyFrame")] string valRelation, - [Parameter(Description = "Only update specific positions. Positions starts with 0, separted multiple positions with space. Example: valPositions=0 1 4")] [MoreThan(-1)] string valPositions + [Parameter(Description = "Only update specific positions. Positions starts with 0, separted multiple positions with space. Example: valpositions=\"0 1 4\"")] [MoreThan(-1)] string valPositions ) { initialChecks(); @@ -148,6 +148,17 @@ namespace xmlTools Console.WriteLine("\nWritten by s10k"); } + [Verb] + public static void showErrTypes() + { + Array values = Enum.GetValues(typeof(Program.appErrors)); + + foreach (Program.appErrors val in values) + { + Console.WriteLine(Enum.GetName(typeof(Program.appErrors),val) + " : " + (int)val); + } + } + // Global Parameters [Global(Description = "Filename to apply the operations (with patchFile specifies the patch filename). Wildcards accepted for multiple files. No filename = search all .xml files in current path.")] public static void fileName(