public static void Main(string[] args) { if (args.Length < 3) { Console.WriteLine("Usage: SimpleInventory [loginfirstname] [loginlastname] [password]"); return; } SimpleInventory simple = new SimpleInventory(); simple.Connect(args[0], args[1], args[2]); simple.doStuff(); simple.Disconnect(); }
public static void Main(string[] args) { if (args.Length < 3) { Console.WriteLine("Usage: SimpleInventory [loginfirstname] [loginlastname] [password]"); return; } SimpleInventory simple = new SimpleInventory(); if (simple.Connect(args[0], args[1], args[2])) { if (simple.ConnectedSignal.WaitOne(TimeSpan.FromMinutes(1), false)) { simple.doStuff(); simple.Disconnect(); } } }