mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[SabreTools, Feature, README] Better define user inputs
This commit is contained in:
@@ -236,8 +236,28 @@ namespace SabreTools.Library.Help
|
||||
// Add the pre-space first
|
||||
output += CreatePadding(pre);
|
||||
|
||||
// Preprocess the flags, if necessary
|
||||
string[] newflags = new string[_flags.Count];
|
||||
_flags.CopyTo(newflags);
|
||||
switch (_featureType)
|
||||
{
|
||||
case FeatureType.Int32:
|
||||
case FeatureType.Int64:
|
||||
case FeatureType.List:
|
||||
case FeatureType.String:
|
||||
for (int i = 0; i < newflags.Length; i++)
|
||||
{
|
||||
newflags[i] += "=";
|
||||
}
|
||||
break;
|
||||
case FeatureType.Flag:
|
||||
default:
|
||||
// No-op
|
||||
break;
|
||||
}
|
||||
|
||||
// Now add all flags
|
||||
output += String.Join(", ", _flags);
|
||||
output += String.Join(", ", newflags);
|
||||
|
||||
// If we have a midpoint set, check to see if the string needs padding
|
||||
if (midpoint > 0 && output.Length < midpoint)
|
||||
@@ -359,8 +379,28 @@ namespace SabreTools.Library.Help
|
||||
// Add the pre-space first
|
||||
output += CreatePadding(preAdjusted);
|
||||
|
||||
// Preprocess the flags, if necessary
|
||||
string[] newflags = new string[_flags.Count];
|
||||
_flags.CopyTo(newflags);
|
||||
switch (_featureType)
|
||||
{
|
||||
case FeatureType.Int32:
|
||||
case FeatureType.Int64:
|
||||
case FeatureType.List:
|
||||
case FeatureType.String:
|
||||
for (int i = 0; i < newflags.Length; i++)
|
||||
{
|
||||
newflags[i] += "=";
|
||||
}
|
||||
break;
|
||||
case FeatureType.Flag:
|
||||
default:
|
||||
// No-op
|
||||
break;
|
||||
}
|
||||
|
||||
// Now add all flags
|
||||
output += String.Join(", ", _flags);
|
||||
output += String.Join(", ", newflags);
|
||||
|
||||
// If we have a midpoint set, check to see if the string needs padding
|
||||
if (midpoint > 0 && output.Length < midpointAdjusted)
|
||||
|
||||
Reference in New Issue
Block a user