static void Main(string [] args) { for (int i = 0; i < args.Length; i++){ switch (args [i]){ case "-width": try { i++; width = Int32.Parse (args [i]); } catch { Console.WriteLine ("-width requires an int argument"); } break; case "-height": try { i++; height = Int32.Parse (args [i]); } catch { Console.WriteLine ("-height requires an int argument"); } break; case "-help": case "-h": Help (); break; default: if (url == null) url = args [i]; else if (output == null) output = args [i]; else Help (); break; } } if (url == null) Help (); if (output == null) output = "shot.png"; Application.Init(); Window w = new Window ("test"); wc = new WebControl (); wc.LoadUrl (args [0]); wc.Show (); wc.LocChange += WaitABit; wc.SetSizeRequest (1024, 768); w.Add (wc); w.ShowAll (); //GLib.Timeout.Add(700, new TimeoutHandler(MakeShot)); Application.Run(); }