コード例 #1
0
ファイル: Form1.cs プロジェクト: radtek/Gradual
        private void btUnsubMData_Click(object sender, EventArgs e)
        {
            try
            {
                string reqID = cbRequestSent.Items[cbRequestSent.SelectedIndex].ToString();

                if (dctRequests.ContainsKey(reqID))
                {
                    FIXSubscription subscription = dctRequests[reqID];

                    Gradual.MDS.Adm.Lib.IServicoMdsAdm serv = Ativador.Get <IServicoMdsAdm>();

                    serv.CancelarAssinaturaMarketDataConflated(tcpConflatedSenderCompID,
                                                               subscription.Instrumento,
                                                               subscription.SecurityTye,
                                                               subscription.Product,
                                                               subscription.CFICode,
                                                               reqID);
                }
            }
            catch (Exception ex)
            {
                logger.Error("btUnsubMData_Click: " + ex.Message, ex);
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: radtek/Gradual
        private void btRecInterval_Click(object sender, EventArgs e)
        {
            Gradual.MDS.Adm.Lib.IServicoMdsAdm serv = Ativador.Get <IServicoMdsAdm>();



            //int seqIni = Convert.ToInt32(txtSeqNumIni.Text.Trim());
            //int seqFim = Convert.ToInt32(txtSeqNumFim.Text.Trim());

            //if (seqIni < 1)
            //{
            //    MessageBox.Show("SeqNum inicial invalido");
            //    return;
            //}

            //if (seqFim < seqIni)
            //{
            //    MessageBox.Show("SeqNum final invalido");
            //    return;
            //}

            if (serv != null)
            {
                //serv.RecoveryInterval(cmbChannelID.Items[cmbChannelID.SelectedIndex].ToString(), seqIni, seqFim);
                serv.PauseChannelIncremental("055");
                serv.PauseChannelIncremental("056");
                serv.PauseChannelIncremental("057");
                serv.PauseChannelIncremental("058");

                serv.ResumeChannelIncremental("055");
                serv.ResumeChannelIncremental("056");
                serv.ResumeChannelIncremental("057");
                serv.ResumeChannelIncremental("058");
            }
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: radtek/Gradual
        private void btDesativar_Click(object sender, EventArgs e)
        {
            Gradual.MDS.Adm.Lib.IServicoMdsAdm serv = Ativador.Get <IServicoMdsAdm>();

            if (serv != null)
            {
                serv.DesativarChannel(cmbChannelID.Items[cmbChannelID.SelectedIndex].ToString());
            }
        }
コード例 #4
0
ファイル: Form1.cs プロジェクト: radtek/Gradual
        private void btSeqReset_Click(object sender, EventArgs e)
        {
            Gradual.MDS.Adm.Lib.IServicoMdsAdm serv = Ativador.Get <IServicoMdsAdm>();

            if (serv != null)
            {
                serv.EnviarSequenceResetConflated(tcpConflatedSenderCompID, Convert.ToInt32(txtSeqNumIni.Text));
            }
        }
コード例 #5
0
ファイル: Form1.cs プロジェクト: radtek/Gradual
        private void btDesativConflated_Click(object sender, EventArgs e)
        {
            try
            {
                Gradual.MDS.Adm.Lib.IServicoMdsAdm serv = Ativador.Get <IServicoMdsAdm>();

                serv.DesativarChannelConflated(tcpConflatedSenderCompID);
            }
            catch (Exception ex)
            {
                logger.Error("btDesativConflated_Click: " + ex.Message, ex);
            }
        }
コード例 #6
0
ファイル: Form1.cs プロジェクト: radtek/Gradual
        private void btSubMarketData_Click(object sender, EventArgs e)
        {
            try
            {
                Gradual.MDS.Adm.Lib.IServicoMdsAdm serv = Ativador.Get <IServicoMdsAdm>();

                string secType = null;
                if (cbSecurityType.SelectedIndex != 0)
                {
                    secType = cbSecurityType.Items[cbSecurityType.SelectedIndex].ToString();
                }

                string product = null;

                if (cbProduct.SelectedIndex != 0)
                {
                    product = products[cbProduct.SelectedIndex];
                }

                string cfiCode = null;
                if (!String.IsNullOrEmpty(txtCFICode.Text))
                {
                    cfiCode = txtCFICode.Text;
                }

                if (serv != null)
                {
                    string reqID = serv.EnviarAssinaturaMarketDataConflated(
                        tcpConflatedSenderCompID,
                        txtInstrumento.Text.ToUpper().Trim(),
                        secType,
                        product,
                        cfiCode);

                    FIXSubscription subscription = new FIXSubscription();
                    subscription.CFICode     = cfiCode;
                    subscription.Instrumento = txtInstrumento.Text.ToUpper().Trim();
                    subscription.Product     = product;
                    subscription.ReqID       = reqID;
                    subscription.SecurityTye = secType;

                    cbRequestSent.Items.Add(reqID);
                    dctRequests.Add(reqID, subscription);
                }
            }
            catch (Exception ex)
            {
                logger.Error("btSubMarketData_Click: " + ex.Message, ex);
            }
        }
コード例 #7
0
ファイル: Form1.cs プロジェクト: radtek/Gradual
        private void btResend_Click(object sender, EventArgs e)
        {
            Gradual.MDS.Adm.Lib.IServicoMdsAdm serv = Ativador.Get <IServicoMdsAdm>();

            int seqIni = Convert.ToInt32(txtSeqNumIni.Text.Trim());
            int seqFim = Convert.ToInt32(txtSeqNumFim.Text.Trim());

            if (seqIni < 1)
            {
                MessageBox.Show("SeqNum inicial invalido");
                return;
            }

            if (seqFim < seqIni)
            {
                seqFim = 0;
            }

            if (serv != null)
            {
                serv.EnviarResendRequestConflated(tcpConflatedSenderCompID, seqIni, seqFim);
            }
        }