Esempio n. 1
0
 /// <summary>
 ///   Cat multiple images
 /// </summary>
 /// <param name = "mask">The permission mask.</param>
 /// <param name = "file">The file.</param>
 /// <returns>The result of the command.</returns>
 public static void Convert(IconUtilType inputType, String intputFile, TextWriter outputWriter = null, TextWriter errorWriter = null)
 {
     String type;
     switch(inputType) {
     case IconUtilType.Icns:
         type = "icns";
         break;
     case IconUtilType.Iconset:
         type = "iconset";
         break;
     default:
         throw new ArgumentException("Type must be either 'Icns' or 'Iconset'", "inputType");
     }
     String arguments = String.Format (CultureInfo.InvariantCulture, "--convert {0} \"{1}\"", type, intputFile);
     ProcessHelper helper = new ProcessHelper (Executable, arguments);
     helper.OutputWriter = outputWriter;
     helper.ErrorWriter = errorWriter;
     helper.Execute ();
 }
Esempio n. 2
0
        /// <summary>
        ///   Cat multiple images
        /// </summary>
        /// <param name = "mask">The permission mask.</param>
        /// <param name = "file">The file.</param>
        /// <returns>The result of the command.</returns>
        public static void Convert(IconUtilType inputType, String intputFile, TextWriter outputWriter = null, TextWriter errorWriter = null)
        {
            String type;

            switch (inputType)
            {
            case IconUtilType.Icns:
                type = "icns";
                break;

            case IconUtilType.Iconset:
                type = "iconset";
                break;

            default:
                throw new ArgumentException("Type must be either 'Icns' or 'Iconset'", "inputType");
            }
            String        arguments = String.Format(CultureInfo.InvariantCulture, "--convert {0} \"{1}\"", type, intputFile);
            ProcessHelper helper    = new ProcessHelper(Executable, arguments);

            helper.OutputWriter = outputWriter;
            helper.ErrorWriter  = errorWriter;
            helper.Execute();
        }