using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Text; using System.Linq; using System.Windows.Forms; namespace TeletraderProxy { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main(string [] args) { if (args.Length == 9) { //This version is intended to run from the commandLine //The nine "args" are the downstream username(TI server), downstream passwd // (TI), Teletrader UserName, and Teletrader password followed by database info. Database // info is taken care of within Form1.cs. When this was run in task-scheduler // at the designated time, the Gui is supposed to automatically appear with the methods responsible // for connecting to the TI server and starting the Teletrader subscription automatically. TradeIdeas.MarketDataProxy.Globals.downStreamUsername = args[0]; TradeIdeas.MarketDataProxy.Globals.downStreamPassword = args[1]; Login.setUserName(args[2]); Login.setPassword(args[3]); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1(args)); } else { //For now, this application also has the capacity to be run as a GUI, // When started from Visual studio,there are no args, thus this block of statments will be executed. // With this block of statements, the GUI appears, and the user manually connects to the // TI server by hitting the "TI connect" button. Then Teletrader is summoned by hitting // the "Start Teletrader Subscription" button after which the subscription begins and the streaming // data is sucessfully relayed to the TI servers...... // eventually this block of statements will be removed this beta. TradeIdeas.MarketDataProxy.Globals.downStreamUsername = "klewis1962"; TradeIdeas.MarketDataProxy.Globals.downStreamPassword = "12poiuyADGJxVn55"; Application.EnableVisualStyles(); // only for home use and convenience Application.SetCompatibleTextRenderingDefault(false); // only for home use and conveniece Login.setUserName("trade.ideas1"); //home use Login.setPassword("ti0510"); //home use Application.Run(new Form1()); // only for home use } } } }