static void Main(string [] args) { try { bool reporterror = true; if (args.Length >= 2) { pcmdsupport.ParseDBCMDLine dbcmdline = new pcmdsupport.ParseDBCMDLine(args [0]); pcmdsupport.ParseAccountsCMDLine accountscmdline = new pcmdsupport.ParseAccountsCMDLine(args [1]); if (!dbcmdline.InError && !accountscmdline.InError) { pshare ps = new pshare(); ps.Go(dbcmdline, accountscmdline, 2, args); Console.Write("Finished"); reporterror = false; } } if (reporterror) { Console.WriteLine("Command Line should be:-"); Console.Write("pshare " + pcmdsupport.ParseDBCMDLine.SupportedFormatString() + " " + pcmdsupport.ParseAccountsCMDLine.SupportedFormatString() + " [ticker,displayname,exchange,maxoi,maxvalue]"); } } catch (Exception e) { Console.Write(e.Message); } }
static void Main(string [] args) { try { bool reporterror = true; if (args.Length >= 2) { pcmdsupport.ParseDBCMDLine dbcmdline = new pcmdsupport.ParseDBCMDLine(args [0]); pcmdsupport.ParseAccountsCMDLine accountscmdline = new pcmdsupport.ParseAccountsCMDLine(args [1]); if (!dbcmdline.InError && !accountscmdline.InError) { pshare pg = new pshare(); pg.Go(dbcmdline, accountscmdline, 2, args); Console.Write("Finished"); reporterror = false; } } if (reporterror) { Console.WriteLine("Command Line should be:-"); Console.Write("pgen " + pcmdsupport.ParseDBCMDLine.SupportedFormatString() + " " + pcmdsupport.ParseAccountsCMDLine.SupportedFormatString() + " [tickerid,sharestartprice,shareendprice,gap,selloffset,numberbuyshares,pgenfilename]"); } } catch (Exception e) { Console.Write(e.Message); } }
static void Main(string [] args) { try { bool reporterror = true; if (args.Length == 3) { pcmdsupport.ParseDBCMDLine dbcmdline = new pcmdsupport.ParseDBCMDLine(args [0]); pcmdsupport.ParseAccountsCMDLine accountscmdline = new pcmdsupport.ParseAccountsCMDLine(args [1]); if (!dbcmdline.InError && !accountscmdline.InError) { pshare pg = new pshare(); reporterror = pg.Go(dbcmdline, accountscmdline, args [2]); Console.Write("Finished"); } } if (reporterror) { Console.WriteLine("Command Line should be:-"); Console.Write("pgendel " + pcmdsupport.ParseDBCMDLine.SupportedFormatString() + " " + pcmdsupport.ParseAccountsCMDLine.SupportedFormatString() + " tickerid"); } } catch (Exception e) { Console.WriteLine("Exception Thrown:-"); Console.Write(e.Message); } }