Пример #1
0
		public virtual void Send(FIXSecurityDefinitionRequest request)
		{
		}
		public FIXSecurityDefinitionRequestEventArgs(FIXSecurityDefinitionRequest securityDefinitionRequest)
		{
			this.SecurityDefinitionRequest = securityDefinitionRequest;
		}
Пример #3
0
		public virtual void SendSecurityDefinitionRequest(FIXSecurityDefinitionRequest request)
		{
			if (this.IsConnected)
			{
				this.application.Send(request);
			}
			else
			{
				if (this.j4t4Wyi2Ea == null)
					return;
				this.j4t4Wyi2Ea(new ProviderErrorEventArgs((IProvider)this, -1, -1, BeAEwTZGlZaeOmY5cm.J00weU3cM6(3698)));
			}
		}
Пример #4
0
 public void Init(IInstrumentProvider provider, FIXSecurityDefinitionRequest request)
 {
   this.provider = provider;
   this.request = request;
 }
Пример #5
0
 public FIXSecurityDefinitionRequestEventArgs(FIXSecurityDefinitionRequest securityDefinitionRequest)
 {
     this.SecurityDefinitionRequest = securityDefinitionRequest;
 }
Пример #6
0
    private void btnRequest_Click(object sender, EventArgs e)
    {
      if (!((IProvider) this.provider).IsConnected)
      {
        if (MessageBox.Show((IWin32Window) this, ((IProvider) this.provider).Name + " is not connected. Do you want to connect?", "Connect " + ((IProvider) this.provider).Name, MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
          return;
        Global.ProviderHelper.Connect((IProvider) this.provider);
        if (!((IProvider) this.provider).IsConnected)
        {
					int num = (int) MessageBox.Show((IWin32Window) this, "Unable to connect to " + ((IProvider) this.provider).Name, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
          return;
        }
      }
      FIXSecurityDefinitionRequest request = new FIXSecurityDefinitionRequest((int) ((IProvider) this.provider).Id == 19 ? "0" : Guid.NewGuid().ToString(), 3);
      if (this.chbFilter_InstrumentType.Checked)
				request.SecurityType = APITypeConverter.InstrumentType.Convert((OpenQuant.API.InstrumentType) this.cbxFilter_InstrumentTypes.SelectedItem);
      if (this.chbFilter_Exchange.Checked)
				request.SecurityExchange = this.tbxFilter_Exchange.Text.Trim();
      if (this.chbFilter_Symbol.Checked)
				request.Symbol = this.tbxFilter_Symbol.Text.Trim();
      ProcessRequestForm processRequestForm = new ProcessRequestForm();
      processRequestForm.Init(this.provider, request);
      if (processRequestForm.ShowDialog((IWin32Window) this) == DialogResult.OK)
      {
        List<FIXSecurityDefinition> list = new List<FIXSecurityDefinition>((IEnumerable<FIXSecurityDefinition>) processRequestForm.GetSecurityDefinitions());
        list.RemoveAll((Predicate<FIXSecurityDefinition>) (definition => !APITypeConverter.InstrumentType.CanConvert(definition.SecurityType)));
        this.UpdateSecurityDefinitionList(list.ToArray());
      }
      processRequestForm.Dispose();
      this.btnCheckAll.Enabled = true;
      this.btnUncheckAll.Enabled = true;
      this.btnImport.Enabled = true;
    }