public void Connect(GSFIXConnectionOption o)
 {
     if (o.Rawdata == "")
     {
         if (OnError != null)
         {
             OnError("δ��ȷ���õ�½��֤��Ϣ", EventArgs.Empty);
         }
     }
     else
     {
         option = o;
         this._socketInitiator.start();
         Session session = Session.lookupSession(_ssnid);
         if ((session != null) && !session.isLoggedOn())
         {
             session.logon();
         }
     }
 }
Exemple #2
0
 private void SessionMenuItem_Click(object sender, EventArgs e)
 {
     if (!isconnected)
     {
         string logintype = "";
         switch (comboBox1.SelectedItem.ToString())
         {
             case "�����ʻ�":
                 logintype = "B";
                 break;
             case "�ʽ��ʻ�":
                 logintype = "Z";
                 break;
             case "�ͻ�����":
                 logintype = "C";
                 break;
             case "�ſ���":
                 logintype = "K";
                 break;
             case "������":
                 logintype = "X";
                 break;
             case "�ɶ�����":
                 logintype = "N";
                 break;
         }
         GSFIXConnectionOption option = new GSFIXConnectionOption(logintype, textBox4.Text, textBox5.Text);
         _quickFixWrapper.Connect(option);
     }
     else
     {
         _quickFixWrapper.Disconnect();
     }
 }