Exemplo n.º 1
0
        public RediMain()
        {
            TradeLink.API.TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
            {
                tls = new TradeLink.Common.TLServer_WM();
            }
            else
            {
                tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            }

            tl = new ServerRedi(tls);
            if (Properties.Settings.Default.AccountsAvailable != string.Empty)
            {
                tl.Accounts = Properties.Settings.Default.AccountsAvailable.Split(',');
                debug("Advertising static accounts: " + tl.Accounts);
            }
            TrackEnabled = Util.TrackUsage();
            Program      = PROGRAM;
            InitializeComponent();
            tl.TickDebugVerbose        = Properties.Settings.Default.TickDebuggingVerbose;
            tl.isAddingFuturesEXSpace  = Properties.Settings.Default.isAddingFuturesEXSpace;
            tl.FuturesEXchanges        = new List <string>(Properties.Settings.Default.FuturesEXchanges.Split(','));
            tl.isPaperTradeEnabled     = Properties.Settings.Default.PaperTrade;
            tl.isPaperTradeUsingBidAsk = Properties.Settings.Default.PaperTradeBidAsk;
            tl.VerboseDebugging        = Properties.Settings.Default.VerboseDebugging;
            tl.SendDebug         += new TradeLink.API.DebugDelegate(tl_SendDebug);
            tl.AutoConvertToSmart = Properties.Settings.Default.AutoConvertToSmartForAvailable;

            FormClosing += new FormClosingEventHandler(RediMain_FormClosing);
        }
Exemplo n.º 2
0
        public SterMain()
        {
            TrackEnabled = Util.TrackUsage();
            Program      = PROGRAM;
            InitializeComponent();
            _dc.Parent  = this;
            _dc.Dock    = DockStyle.Fill;
            ContextMenu = new ContextMenu();
            ContextMenu.MenuItems.Add("account", new EventHandler(setaccount));
            ContextMenu.MenuItems.Add("report", new EventHandler(report));
            try
            {
                TradeLink.API.TLServer tls;
                if (Properties.Settings.Default.TLClientAddress == string.Empty)
                {
                    tls = new TradeLink.Common.TLServer_WM();
                }
                else
                {
                    tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
                }

                tl = new ServerSterling(tls, Properties.Settings.Default.Sleep, Properties.Settings.Default.OrderSleep, debug);
                tl.UseServerStops           = Properties.Settings.Default.UseServerStops;
                tl.MinLotSize               = Properties.Settings.Default.MinLotSize;
                tl.PostSymSubscribeWait     = Properties.Settings.Default.PostSymbolSubscribeWait;
                tl.AutoSubscribeOrderSymbol = Properties.Settings.Default.AutosubscribeOrderSym;
                tl.OversellSplit            = Properties.Settings.Default.OversellSplit;
                tl.RegSHOShorts             = Properties.Settings.Default.RegSHOShorts;
                tl.LimitPositionUpdates     = Properties.Settings.Default.PositionUpdateLimit;
                tl.isPaperTradeUsingBidAsk  = Properties.Settings.Default.PaperTradeUseBidAsk;
                tl.isPaperTradeEnabled      = Properties.Settings.Default.PaperTrade;
                tl.UseXmlMode               = Properties.Settings.Default.UseXMLQuotes;
                tl.AutoCapAccounts          = Properties.Settings.Default.AutoCapitilizeAccounts;
                tl.CoverEnabled             = Properties.Settings.Default.CoverEnabled;
                tl.Accounts                     = Properties.Settings.Default.defaultaccount.Split(',');
                tl.CancelWait                   = Properties.Settings.Default.CancelWait;
                tl.VerboseDebugging             = Properties.Settings.Default.VerboseDebugging;
                tl.FixOrderDecimalPlace         = Properties.Settings.Default.FixOrderDecimalPlaces;
                tl.IgnoreOutOfOrderTicks        = Properties.Settings.Default.IgnoreOutOfOrderTicks;
                tl.AutosetUnsetId               = Properties.Settings.Default.AutoSeUnsetId;
                tl.SendCancelOnReject           = Properties.Settings.Default.SendCancelOnRejects;
                tl.SendCancelOnError            = Properties.Settings.Default.SendCancelOnError;
                tl.UseSubscribedSymbolForNotify = Properties.Settings.Default.UseSubscribedSymbolForNotify;
                tl.UseSterlingTickBuffer        = Properties.Settings.Default.SterlingTickBuffering;

                tl.EnableImbalancesAndHalts = Properties.Settings.Default.EnableImbalancesAndHalts;
                tl.Start();
            }
            catch (Exception ex)
            {
                const string URL = @"http://code.google.com/p/tradelink/wiki/SterConfig";
                debug("problem connecting to sterling...");
                debug("please check guide at: " + URL);
                System.Diagnostics.Process.Start(URL);
                debug(ex.Message + ex.StackTrace);
            }
            toolStrip1.BackColor = BackColor;
            FormClosing         += new FormClosingEventHandler(SterMain_FormClosing);
        }
        public ServerBlackwoodMain()
        {
            TLServer tl;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
                tl = new TLServer_WM();
            else
                tl = new TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            _con = new ServerBlackwood(tl);
            _con.VerbuseDebugging = Properties.Settings.Default.VerboseDebugging;

            //TrackEnabled = Util.TrackUsage(); *Previously used for PracPlay click tracking
            //Program = PROGRAM;                *Previously used for PracPlay click tracking
            InitializeComponent();
            _con.BWConnectedEvent += new BWConnectedEventHandler(_con_BWConnectedEvent);
            _con.SendDebug += new DebugDelegate(_dw.GotDebug);

            StatusHandler = new DisplayStatusHandler(DisplayStatus);

            Location = Properties.Settings.Default.wlocation;

            //Avoid painting window off screen.
            Point screen = new Point (SystemInformation.VirtualScreen.Bottom,SystemInformation.VirtualScreen.Right) ;
            if (this.Top > screen.X - this.Height | this.Left > screen.Y - this.Width)
            {
                this.Location = new Point(300, 300);
            }
        }
Exemplo n.º 4
0
        public IQFeedFrm()
        {
            TradeLink.API.TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
                tls = new TradeLink.Common.TLServer_WM();
            else
                tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            
            TrackEnabled = Util.TrackUsage();
            Program = PROGRAM;
            InitializeComponent();
            this.FormClosing += IQFeedFrm_FormClosing;
            _helper = new IQFeedHelper(tls);
            _helper.IgnoreAfterTimeWithBefore = Properties.Settings.Default.IgnoreAfterTimeWithBefore;
            _helper.IfBeforeTimeUseIgnoreAfter = Properties.Settings.Default.IfBeforeTimeUseIgnoreAfter;
            _helper.isPaperTradeEnabled = Properties.Settings.Default.PaperTrade;
            _helper.isPaperTradeUsingBidAsk = Properties.Settings.Default.PaperTradeUsesBidAsk;
            _helper.DtnPath = Properties.Settings.Default.DtnPath;
            _helper.port = Properties.Settings.Default.Port;
            _helper.ReleaseDeadSymbols = Properties.Settings.Default.ReleaseDeadSymbols;
            _helper.MktCodes = parsemkts(Properties.Resources.marketcenters);
            _helper.SendDebug += new DebugDelegate(_helper_SendDebug);
            _helper.Connected += new IQFeedHelper.booldel(_helper_Connected);
            _helper.SaveRawData = Properties.Settings.Default.SaveRawFeed;
            _helper.ReportLatency = Properties.Settings.Default.ReportLatency;
            _helper.IgnoreOutOfOrderTick = Properties.Settings.Default.IgnoreOutofOrderTicks;

        }
Exemplo n.º 5
0
        public RediMain()
        {
            TradeLink.API.TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
                tls = new TradeLink.Common.TLServer_WM();
            else
                tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);

            tl = new ServerRedi(tls);
            if (Properties.Settings.Default.AccountsAvailable != string.Empty)
            {
                tl.Accounts = Properties.Settings.Default.AccountsAvailable.Split(',');
                debug("Advertising static accounts: " + tl.Accounts);
            }
            TrackEnabled = Util.TrackUsage();
            Program = PROGRAM;
            InitializeComponent();
            tl.TickDebugVerbose = Properties.Settings.Default.TickDebuggingVerbose;
            tl.isAddingFuturesEXSpace = Properties.Settings.Default.isAddingFuturesEXSpace;
            tl.FuturesEXchanges = new List<string>(Properties.Settings.Default.FuturesEXchanges.Split(','));
            tl.isPaperTradeEnabled = Properties.Settings.Default.PaperTrade;
            tl.isPaperTradeUsingBidAsk = Properties.Settings.Default.PaperTradeBidAsk;
            tl.VerboseDebugging = Properties.Settings.Default.VerboseDebugging;
            tl.SendDebug += new TradeLink.API.DebugDelegate(tl_SendDebug);
            tl.AutoConvertToSmart = Properties.Settings.Default.AutoConvertToSmartForAvailable;

            FormClosing += new FormClosingEventHandler(RediMain_FormClosing);
        }
Exemplo n.º 6
0
        public EsignalMain()
        {
            TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
                tls = new TLServer_WM();
            else
                tls = new TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);

            TrackEnabled = Util.TrackUsage();
            Program = PROGRAM;
            InitializeComponent();
            tl = new EsignalServer(tls);
            // set defaults
            tl.isPaperTradeEnabled = Properties.Settings.Default.PaperTrade;
            tl.isPaperTradeUsingBidAsk = Properties.Settings.Default.PaperTradeUseBidAsk;
            tl.AllowSendInvalidBars = Properties.Settings.Default.AllowSendOfInvalidBars;
            tl.DefaultBarsBack = Properties.Settings.Default.DefaultBarsBack;
            tl.VerboseDebugging = Properties.Settings.Default.VerboseDebugging;
            tl.ReleaseBarHistoryAfteRequest = Properties.Settings.Default.ReleaseBarHistoryAfterSending;
            tl.ReleaseDeadSymbols = Properties.Settings.Default.ReleaseDeadSymbols;
            tl.WaitBetweenEvents = Properties.Settings.Default.WaitBetweenEvents;
            tl.BarRequestsGetAllData = Properties.Settings.Default.BarRequestsuseAllData;
            // send debug messages to log file
            tl.GotDebug += new DebugFullDelegate(debug);
            debug("Started " + PROGRAM + Util.TLVersion());
            // attempt to connect to esignal
            _ok_Click(null, null);
            // handle connector exits
            FormClosing += new FormClosingEventHandler(EsignalMain_FormClosing);
        }
Exemplo n.º 7
0
        public GBTradeLink()
        {
            TrackEnabled = Util.TrackUsage();
            Program = PROGRAM;

            InitializeComponent();

            TradeLink.API.TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
                tls = new TradeLink.Common.TLServer_WM();
            else
                tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            try
            {
            GB = new GrayBox(tls,this.lstStatusList,this.bt_Connect);
            }
            catch (Exception ex)
            {
                const string URL = @"http://code.google.com/p/tradelink/wiki/HoldBrosGrayBox";
                debug("problem connecting to graybox...");
                debug("please check guide at: " + URL);
                System.Diagnostics.Process.Start(URL);
                debug(ex.Message + ex.StackTrace);
            }

            UpdateLoginDetails();
            FormClosing += new FormClosingEventHandler(GBTradeLink_FormClosing);

            GB.Start();

            this.txtPasword.Focus() ;
        }
Exemplo n.º 8
0
        public IQFeedFrm()
        {
            TradeLink.API.TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
            {
                tls = new TradeLink.Common.TLServer_WM();
            }
            else
            {
                tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            }

            TrackEnabled = Util.TrackUsage();
            Program      = PROGRAM;
            InitializeComponent();
            this.FormClosing += IQFeedFrm_FormClosing;
            _helper           = new IQFeedHelper(tls);
            _helper.IgnoreAfterTimeWithBefore  = Properties.Settings.Default.IgnoreAfterTimeWithBefore;
            _helper.IfBeforeTimeUseIgnoreAfter = Properties.Settings.Default.IfBeforeTimeUseIgnoreAfter;
            _helper.isPaperTradeEnabled        = Properties.Settings.Default.PaperTrade;
            _helper.isPaperTradeUsingBidAsk    = Properties.Settings.Default.PaperTradeUsesBidAsk;
            _helper.DtnPath              = Properties.Settings.Default.DtnPath;
            _helper.port                 = Properties.Settings.Default.Port;
            _helper.ReleaseDeadSymbols   = Properties.Settings.Default.ReleaseDeadSymbols;
            _helper.MktCodes             = parsemkts(Properties.Resources.marketcenters);
            _helper.SendDebug           += new DebugDelegate(_helper_SendDebug);
            _helper.Connected           += new IQFeedHelper.booldel(_helper_Connected);
            _helper.SaveRawData          = Properties.Settings.Default.SaveRawFeed;
            _helper.ReportLatency        = Properties.Settings.Default.ReportLatency;
            _helper.IgnoreOutOfOrderTick = Properties.Settings.Default.IgnoreOutofOrderTicks;
        }
Exemplo n.º 9
0
        public SterMain()
        {
            TrackEnabled = Util.TrackUsage();
            Program = PROGRAM;
            InitializeComponent();
            _dc.Parent = this;
            _dc.Dock = DockStyle.Fill;
            ContextMenu = new ContextMenu();
            ContextMenu.MenuItems.Add("account", new EventHandler(setaccount));
            ContextMenu.MenuItems.Add("report", new EventHandler(report));
            try
            {
                TradeLink.API.TLServer tls;
                if (Properties.Settings.Default.TLClientAddress == string.Empty)
                {
                    tls = new TradeLink.Common.TLServer_WM();

                }
                else
                    tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);

                tl = new ServerSterling(tls, Properties.Settings.Default.Sleep,Properties.Settings.Default.OrderSleep,debug);
                tl.UseServerStops = Properties.Settings.Default.UseServerStops;
                tl.MinLotSize = Properties.Settings.Default.MinLotSize;
                tl.PostSymSubscribeWait = Properties.Settings.Default.PostSymbolSubscribeWait;
                tl.AutoSubscribeOrderSymbol = Properties.Settings.Default.AutosubscribeOrderSym;
                tl.OversellSplit = Properties.Settings.Default.OversellSplit;
                tl.RegSHOShorts = Properties.Settings.Default.RegSHOShorts;
                tl.LimitPositionUpdates = Properties.Settings.Default.PositionUpdateLimit;
                tl.isPaperTradeUsingBidAsk = Properties.Settings.Default.PaperTradeUseBidAsk;
                tl.isPaperTradeEnabled = Properties.Settings.Default.PaperTrade;
                tl.UseXmlMode = Properties.Settings.Default.UseXMLQuotes;
                tl.AutoCapAccounts = Properties.Settings.Default.AutoCapitilizeAccounts;
                tl.CoverEnabled = Properties.Settings.Default.CoverEnabled;
                tl.Accounts = Properties.Settings.Default.defaultaccount.Split(',');
                tl.CancelWait = Properties.Settings.Default.CancelWait;
                tl.VerboseDebugging = Properties.Settings.Default.VerboseDebugging;
                tl.FixOrderDecimalPlace = Properties.Settings.Default.FixOrderDecimalPlaces;
                tl.IgnoreOutOfOrderTicks = Properties.Settings.Default.IgnoreOutOfOrderTicks;
                tl.AutosetUnsetId = Properties.Settings.Default.AutoSeUnsetId;
                tl.SendCancelOnReject = Properties.Settings.Default.SendCancelOnRejects;
                tl.SendCancelOnError = Properties.Settings.Default.SendCancelOnError;
                tl.UseSubscribedSymbolForNotify = Properties.Settings.Default.UseSubscribedSymbolForNotify;
                tl.UseSterlingTickBuffer = Properties.Settings.Default.SterlingTickBuffering;
                
                tl.EnableImbalancesAndHalts = Properties.Settings.Default.EnableImbalancesAndHalts;
                tl.Start();
            }
            catch (Exception ex)
            {
                const string URL = @"http://code.google.com/p/tradelink/wiki/SterConfig";
                debug("problem connecting to sterling...");
                debug("please check guide at: " + URL);
                System.Diagnostics.Process.Start(URL);
                debug(ex.Message+ex.StackTrace);
            }
            toolStrip1.BackColor = BackColor;
            FormClosing += new FormClosingEventHandler(SterMain_FormClosing);
        }
Exemplo n.º 10
0
        public ServerDBFXMain()
        {
            TradeLink.API.TLServer tl;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
                tl = new TLServer_WM();
            else
                tl = new TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            _dbfx = new ServerDBFX(tl);

            TrackEnabled = Util.TrackUsage();
            Program = PROGRAM;
            InitializeComponent();
            _dbfx.SendDebug += new TradeLink.API.DebugFullDelegate(_dbfx_SendDebug);
            FormClosing += new FormClosingEventHandler(ServerDBFXMain_FormClosing);
        }
Exemplo n.º 11
0
 public ServerMBMain()
 {
     TradeLink.API.TLServer tls;
     if (Properties.Settings.Default.TLClientAddress == string.Empty)
         tls = new TradeLink.Common.TLServer_WM();
     else
         tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
     tl = new ServerMB(tls);
     TrackEnabled = Util.TrackUsage();
     Program = PROGRAM;
     InitializeComponent();
     tl.SendDebugEvent+=new DebugDelegate(debug);
     tl.LoginEvent += new VoidDelegate(tl_LoginEvent);
     FormClosing += new FormClosingEventHandler(ServerMBMain_FormClosing);
 }
Exemplo n.º 12
0
        public ServerMBMain()
        {
            TradeLink.API.TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
                tls = new TradeLink.Common.TLServer_WM();
            else
                tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            tl = new ServerMB(tls);
            tl.VerboseDebugging = Properties.Settings.Default.VerboseDebugging;
            TrackEnabled = Util.TrackUsage();
            Program = PROGRAM;
            InitializeComponent();
            tl.SendDebugEvent += new DebugDelegate(debug);
            tl.LoginEvent += new VoidDelegate(tl_LoginEvent);
            FormClosing += new FormClosingEventHandler(ServerMBMain_FormClosing);
				_verbon.Text = "Verbose " + (tl.VerboseDebugging ? "ON" : "OFF");  //pmh 9/15/12 - let the button tell the story.
		  }
Exemplo n.º 13
0
        void start()
        {
            debug("starting setup...");
            s = new TLServer_IP(IPUtil.LOCALHOST, IPUtil.TLDEFAULTTESTPORT, 0, 100000);
            s.VerboseDebugging = true;
            s.SendDebugEvent += new DebugDelegate(debug);
            s.newProviderName = Providers.TradeLink;
            s.Start(5,200,true);
            Assert.IsTrue(s.isStarted);
            // make sure we select our own loopback, if other servers are running
            c = new TLClient_IP(TLClient_IP.GetEndpoints(s.Port,new string[] { System.Net.IPAddress.Loopback.ToString() }),0,"tlclient",0,0,debugc,true);
            c.VerboseDebugging = true;

            // create a second client to verify order and fill copying work
            //c2 = new TLClient_IP(TLClient_IP.GetEndpoints(IPUtil.TLDEFAULTTESTPORT, new string[] { System.Net.IPAddress.Loopback.ToString() }), 0, "tlclient2", 0, 0, debug);


            // register server events (so server can process orders)
            s.newSendOrderRequest += new OrderDelegateStatus(tl_gotSrvFillRequest);

            // setup client events
            c.gotFill += new FillDelegate(tlclient_gotFill);
            c.gotOrder += new OrderDelegate(tlclient_gotOrder);
            c.gotTick += new TickDelegate(tlclient_gotTick);
            c.gotImbalance += new ImbalanceDelegate(c_gotImbalance);
            c.gotFeatures += new MessageTypesMsgDelegate(c_gotFeatures);
            c.GotConnectEvent += new Int32Delegate(c_GotConnectEvent);
            c.GotDisconnectEvent += new Int32Delegate(c_GotDisconnectEvent);
            
            
            // setup second client events to check copying
            //c2.gotFill += new FillDelegate(c2_gotFill);
            //c2.gotOrder += new OrderDelegate(c2_gotOrder);
            //c2.gotTick += new TickDelegate(c2_gotTick);
            debug("ending setup.");
            startt = DateTime.Now;

            // prepare to playback ticks continuously
            bw = new System.ComponentModel.BackgroundWorker();
            bw.DoWork += new System.ComponentModel.DoWorkEventHandler(bw_DoWork);
            bw.RunWorkerAsync();
            debug("waiting for helper to start...");
            while (!_looping)
                sleep(50);
        }
Exemplo n.º 14
0
 public ServerMBMain()
 {
     TradeLink.API.TLServer tls;
     if (Properties.Settings.Default.TLClientAddress == string.Empty)
     {
         tls = new TradeLink.Common.TLServer_WM();
     }
     else
     {
         tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
     }
     tl           = new ServerMB(tls);
     TrackEnabled = Util.TrackUsage();
     Program      = PROGRAM;
     InitializeComponent();
     tl.SendDebugEvent += new DebugDelegate(debug);
     tl.LoginEvent     += new VoidDelegate(tl_LoginEvent);
     FormClosing       += new FormClosingEventHandler(ServerMBMain_FormClosing);
 }
Exemplo n.º 15
0
        public ServerRithmicMain()
        {
            InitializeComponent();
            FormClosing += new FormClosingEventHandler(ServerRithmicMain_FormClosing);

            TradeLink.API.TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
            {
                tls = new TradeLink.Common.TLServer_WM();
            }
            else
                tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            sr = new ServerRithmic(tls, debug);
            sr.AdmPt = Properties.Settings.Default.sAdmCnnctPt;
            sr.TsConnectPt = Properties.Settings.Default.sTsCnnctPt;
            sr.MarketDataPt = Properties.Settings.Default.sMdCnnctPt;

            if ((user.Text!=string.Empty) && (pass.Text!=string.Empty))
                go();
        }
Exemplo n.º 16
0
        public GBTradeLink()
        {
            TrackEnabled = Util.TrackUsage();
            Program      = PROGRAM;

            InitializeComponent();



            TradeLink.API.TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
            {
                tls = new TradeLink.Common.TLServer_WM();
            }
            else
            {
                tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            }
            try
            {
                GB = new GrayBox(tls, this.lstStatusList, this.bt_Connect);
            }
            catch (Exception ex)
            {
                const string URL = @"http://code.google.com/p/tradelink/wiki/HoldBrosGrayBox";
                debug("problem connecting to graybox...");
                debug("please check guide at: " + URL);
                System.Diagnostics.Process.Start(URL);
                debug(ex.Message + ex.StackTrace);
            }


            UpdateLoginDetails();
            FormClosing += new FormClosingEventHandler(GBTradeLink_FormClosing);



            GB.Start();

            this.txtPasword.Focus();
        }
Exemplo n.º 17
0
 public ServerMBMain()
 {
     TradeLink.API.TLServer tls;
     if (Properties.Settings.Default.TLClientAddress == string.Empty)
     {
         tls = new TradeLink.Common.TLServer_WM();
     }
     else
     {
         tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
     }
     tl = new ServerMB(tls);
     tl.VerboseDebugging = Properties.Settings.Default.VerboseDebugging;
     TrackEnabled        = Util.TrackUsage();
     Program             = PROGRAM;
     InitializeComponent();
     tl.SendDebugEvent += new DebugDelegate(debug);
     tl.LoginEvent     += new VoidDelegate(tl_LoginEvent);
     FormClosing       += new FormClosingEventHandler(ServerMBMain_FormClosing);
     _verbon.Text       = "Verbose " + (tl.VerboseDebugging ? "ON" : "OFF");                //pmh 9/15/12 - let the button tell the story.
 }
Exemplo n.º 18
0
        public ServerRithmicMain()
        {
            InitializeComponent();
            FormClosing += new FormClosingEventHandler(ServerRithmicMain_FormClosing);

            TradeLink.API.TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
            {
                tls = new TradeLink.Common.TLServer_WM();
            }
            else
            {
                tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            }
            sr              = new ServerRithmic(tls, debug);
            sr.AdmPt        = Properties.Settings.Default.sAdmCnnctPt;
            sr.TsConnectPt  = Properties.Settings.Default.sTsCnnctPt;
            sr.MarketDataPt = Properties.Settings.Default.sMdCnnctPt;

            if ((user.Text != string.Empty) && (pass.Text != string.Empty))
            {
                go();
            }
        }
Exemplo n.º 19
0
 string features()
 {
     string s = string.Empty;
     foreach (MessageTypes mt in cfeatures)
         s += mt.ToString() + " ";
     return s;
 }