Exemplo n.º 1
0
        private static void ProcessCommandLineArgs(IReadOnlyList <string> args)
        {
            if (args.Count == 0)
            {
                throw new ArgumentException("No file specified!");
            }
            imagePath = args[ImagePathArgIndex];

            // Optional command line arguments.
            widthPixels      = args.Count > 1 ? GetWidthPixelsArg(args) : MaxWidthPixels;
            brightnessType   = args.Count > 2 ? GetBrightnessTypeArg(args) : DefaultBrightnessType;
            invertBrightness = args.Count > 3 ? GetInvertBrightnessArg(args) : DefaultInvertBrightness;
        }
Exemplo n.º 2
0
 private Brightness(BrightnessType type, int value) : this()
 {
     Type  = type;
     Value = value;
 }