Пример #1
0
        void Connect()
        {
            try
            {
                this.Log("Data feed initialization");
                this.fixConnectionStringBuilder.Address          = this.m_address.Text;
                this.fixConnectionStringBuilder.Username         = this.m_username.Text;
                this.fixConnectionStringBuilder.Password         = this.m_password.Text;
                this.fixConnectionStringBuilder.Port             = Convert.ToInt32(this.m_port.Text);
                this.fixConnectionStringBuilder.SecureConnection = this.m_ssl.Checked;
                var connectionString = this.fixConnectionStringBuilder.ToString();
                var dataFeed         = new DataFeed(connectionString);
                dataFeed.Logon      += this.OnLogon;
                dataFeed.Logout     += this.OnLogout;
                dataFeed.SymbolInfo += this.OnSymbolInfo;
                this.Log("Connecting...");
                dataFeed.Start();
                this.datafeed = dataFeed;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            this.ApplyConnectingState();
        }
Пример #2
0
 void Run(DataFeed feed)
 {
     this.CheckCancel();
     this.Log("Starting data feed");
     if (feed.Start(30000))
     {
         this.Log("Data feed is started");
         this.GetSymbols(feed);
         this.GetQuotes(feed);
     }
     else
     {
         this.Log("Couldn't start data feed");
     }
 }