Beispiel #1
0
        static void Main(string[] args)
        {
            CmdOptions.Touch();
            string tooltip;

            Dither.InitParams(out CmdOptions.options.param, out tooltip, out CmdOptions.options.name);
            Draw.SetPens(100);

            if (args.Length < 1)
            {
                Console.WriteLine("Warning: no command-line options, using default values!");
            }
            else
            {
                for (int i = 0; i < args.Length; i++)
                {
                    if (!string.IsNullOrEmpty(args[i]))
                    {
                        string opt = args[i];
                        if (!CmdOptions.options.ParseOption(args, ref i))
                        {
                            Console.WriteLine($"Warning: invalid option '{opt}'!");
                        }
                    }
                }
            }

            //--- do the job ---
            if (!wasComputed)
            {
                Compute();
            }
        }
Beispiel #2
0
        public Form1()
        {
            InitializeComponent();

            Draw.SetPens(100);
            string param;
            string name;

            Dither.InitParams(out param, out tooltip, out name);
            textParam.Text = param ?? "";
            Text          += " (" + rev + ") '" + name + '\'';

            newImage((Image)null);
        }