Changeset 750 for xmlTools/trunk/posUpdate
- Timestamp:
- Mar 27, 2013, 5:13:41 PM (12 years ago)
- Location:
- xmlTools/trunk/posUpdate
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
xmlTools/trunk/posUpdate/ParametersParser.cs
r742 r750 12 12 class ParametersParser 13 13 { 14 private static string globalFileName ="";15 private static string globalElement ="";16 private static string globalParentElement ="";14 private static string globalFileName = ""; 15 private static string globalElement = ""; 16 private static string globalParentElement = ""; 17 17 private static bool globalNoBackups = false; 18 18 … … 149 149 } 150 150 151 [Verb] 152 public static void showErrTypes() 153 { 154 Array values = Enum.GetValues(typeof(Program.appErrors)); 155 156 foreach (Program.appErrors val in values) 157 { 158 Console.WriteLine(Enum.GetName(typeof(Program.appErrors),val) + " : " + (int)val); 159 } 160 } 161 151 162 // Global Parameters 152 163 [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.")] -
xmlTools/trunk/posUpdate/Program.cs
r746 r750 11 11 class Program 12 12 { 13 public static readonly string toolsVersion = "0.8 c";14 private static appErrors lastError ;13 public static readonly string toolsVersion = "0.8d"; 14 private static appErrors lastError = appErrors.NO_ERROR; 15 15 16 16 public enum appErrors 17 17 { 18 18 // 1-19 Errors with input parameters 19 NO_ERROR = 0, 19 20 ERROR_PARAMS = 1, 20 21 FILE_NOT_FOUND = 2, 21 ELEMENT_NOT_SPECIFIED =3,22 ELEMENT_NOT_FOUND =4,22 ELEMENT_NOT_SPECIFIED = 3, 23 ELEMENT_NOT_FOUND = 4, 23 24 // 20-199 General application errors 24 BACKUPS_ALREADY_EXISTS =20,25 BACKUPS_ALREADY_EXISTS = 20, 25 26 NUMBER_VALUES_TO_REPLACE_NE_AVAILABLE_VALUES = 21, 26 INVALID_POSITIONS_RANGE =22,27 INVALID_POSITIONS_RANGE = 22, 27 28 // 200-299 Patch operations errors 28 29 PATCH_ADDTO_PROCESS_ERROR = 200, 29 30 PATCH_REMOVE_PROCESS_ERROR = 201, 30 PATCH_COMMAND_PROCESS_ERROR =202,31 PATCH_ELEMENT_NOT_FOUND =203,32 PATCH_ADDTO_ERROR_PARSING_XML =204,33 PATCH_COMMAND_NOT_FOUND =20531 PATCH_COMMAND_PROCESS_ERROR = 202, 32 PATCH_ELEMENT_NOT_FOUND = 203, 33 PATCH_ADDTO_ERROR_PARSING_XML = 204, 34 PATCH_COMMAND_NOT_FOUND = 205 34 35 } 35 36 36 public static void printAppError(appErrors error, string description, bool exitApp=false){ 37 Console.Error.WriteLine("Error Code: "+(int)error); 37 public static void printAppError(appErrors error, string description, bool exitApp = false) 38 { 39 Console.Error.WriteLine("Error Code: " + (int)error); 38 40 Console.Error.WriteLine(description); 39 41 … … 51 53 { 52 54 //We use a command parse library due to its advantages 53 CLAP.Parser.RunConsole<ParametersParser>(args); 55 appErrors result = (appErrors)CLAP.Parser.RunConsole<ParametersParser>(args); 56 if (result != appErrors.NO_ERROR) 57 { 58 lastError = result; 59 } 54 60 return (int)lastError; 55 61 } -
xmlTools/trunk/posUpdate/xmlTools.csproj.user
r745 r750 2 2 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 3 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> 4 <StartArguments> patchfile -filename:TRAM-knockdown.oni-patch</StartArguments>4 <StartArguments>versions</StartArguments> 5 5 </PropertyGroup> 6 6 <PropertyGroup> … … 15 15 </PropertyGroup> 16 16 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> 17 <StartArguments>replaceal l -element:FirstLevel -value:0 -nobackups -filename:"C:\Users\home\Documents\Visual Studio 2012\Projects\posUpdate\posUpdate\bin\Debug\%2a.xml"</StartArguments>17 <StartArguments>replacealsl -element:FirstLevel -value:0 -nobackups -filename:"C:\Users\home\Documents\Visual Studio 2012\Projects\posUpdate\posUpdate\bin\Debug\%2a.xml"</StartArguments> 18 18 </PropertyGroup> 19 19 </Project>
Note:
See TracChangeset
for help on using the changeset viewer.