Made 9p command variable names consistent with the data object.
This commit is contained in:
parent
238cdbde71
commit
38083a1e2f
@ -23,8 +23,8 @@ namespace RecrownedAthenaeum.Tools.NinePatchTools
|
|||||||
commandArguments[1] = new EngineCommandArgument("-o", "defines path of output file.");
|
commandArguments[1] = new EngineCommandArgument("-o", "defines path of output file.");
|
||||||
commandArguments[2] = new EngineCommandArgument("-l", "left patch.", true);
|
commandArguments[2] = new EngineCommandArgument("-l", "left patch.", true);
|
||||||
commandArguments[3] = new EngineCommandArgument("-r", "right patch.", true);
|
commandArguments[3] = new EngineCommandArgument("-r", "right patch.", true);
|
||||||
commandArguments[4] = new EngineCommandArgument("-u", "up patch.", true);
|
commandArguments[4] = new EngineCommandArgument("-t", "top patch.", true);
|
||||||
commandArguments[5] = new EngineCommandArgument("-d", "down patch.", true);
|
commandArguments[5] = new EngineCommandArgument("-b", "bottom patch.", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Run(string[] arguments = null)
|
public override void Run(string[] arguments = null)
|
||||||
@ -44,9 +44,9 @@ namespace RecrownedAthenaeum.Tools.NinePatchTools
|
|||||||
outPath = imagePath.Substring(0, imagePath.Length - Path.GetExtension(imagePath).Length);
|
outPath = imagePath.Substring(0, imagePath.Length - Path.GetExtension(imagePath).Length);
|
||||||
}
|
}
|
||||||
if (IndexOfArgument("-l", arguments) + 1 >= arguments.Length || !int.TryParse(arguments[IndexOfArgument("-l", arguments) + 1], out leftBound)) throw new ArgumentException("Missing -l argument bound.");
|
if (IndexOfArgument("-l", arguments) + 1 >= arguments.Length || !int.TryParse(arguments[IndexOfArgument("-l", arguments) + 1], out leftBound)) throw new ArgumentException("Missing -l argument bound.");
|
||||||
if (IndexOfArgument("-r", arguments) + 1 >= arguments.Length || !Int32.TryParse(arguments[IndexOfArgument("-r", arguments) + 1], out rightBound)) throw new ArgumentException("Missing -r argument bound.");
|
if (IndexOfArgument("-r", arguments) + 1 >= arguments.Length || !int.TryParse(arguments[IndexOfArgument("-r", arguments) + 1], out rightBound)) throw new ArgumentException("Missing -r argument bound.");
|
||||||
if (IndexOfArgument("-u", arguments) + 1 >= arguments.Length || !int.TryParse(arguments[IndexOfArgument("-u", arguments) + 1], out topBound)) throw new ArgumentException("Missing -u argument bound.");
|
if (IndexOfArgument("-t", arguments) + 1 >= arguments.Length || !int.TryParse(arguments[IndexOfArgument("-t", arguments) + 1], out topBound)) throw new ArgumentException("Missing -u argument bound.");
|
||||||
if (IndexOfArgument("-d", arguments) + 1 >= arguments.Length || !int.TryParse(arguments[IndexOfArgument("-d", arguments) + 1], out bottomBound)) throw new ArgumentException("Missing -d argument bound.");
|
if (IndexOfArgument("-b", arguments) + 1 >= arguments.Length || !int.TryParse(arguments[IndexOfArgument("-b", arguments) + 1], out bottomBound)) throw new ArgumentException("Missing -d argument bound.");
|
||||||
|
|
||||||
NinePatchData npData = new NinePatchData(Path.GetFileName(imagePath), leftBound, rightBound, bottomBound, topBound);
|
NinePatchData npData = new NinePatchData(Path.GetFileName(imagePath), leftBound, rightBound, bottomBound, topBound);
|
||||||
string serialized = JsonConvert.SerializeObject(npData, Formatting.Indented);
|
string serialized = JsonConvert.SerializeObject(npData, Formatting.Indented);
|
||||||
|
Loading…
Reference in New Issue
Block a user