当前位置: 首页>>代码示例>>C#>>正文


C# Instrument.GetValidOrderFeeds方法代码示例

本文整理汇总了C#中Instrument.GetValidOrderFeeds方法的典型用法代码示例。如果您正苦于以下问题:C# Instrument.GetValidOrderFeeds方法的具体用法?C# Instrument.GetValidOrderFeeds怎么用?C# Instrument.GetValidOrderFeeds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Instrument的用法示例。


在下文中一共展示了Instrument.GetValidOrderFeeds方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetOrderFeedByName

        /// <summary>
        /// Helper function for finding an OrderFeed given a gateway name
        /// </summary>
        OrderFeed GetOrderFeedByName(Instrument instr, string gateway)
        {
            foreach (OrderFeed oFeed in instr.GetValidOrderFeeds())
            {
                if (oFeed.Name.Equals(gateway))
                {
                    return oFeed;
                }
            }

            return (OrderFeed)null;
        }
开发者ID:adajinjin,项目名称:CodeSamples_TTAPI_CSharp,代码行数:15,代码来源:TTAPIFunctions.cs

示例2: populateOrderFeedDropDown

 /// <summary>
 /// populate the OrderFeed drop down menu.
 /// </summary>
 /// <remarks>
 /// comboBoxOrderFeed DisplayMember is set to Name to display the OrderFeed's Name property.
 /// </remarks>
 /// <param name="instrument">Instrument to find valid order feeds.</param>
 private void populateOrderFeedDropDown(Instrument instrument)
 {
     comboBoxOrderFeed.Items.Clear();
     foreach (OrderFeed orderFeed in instrument.GetValidOrderFeeds())
     {
         comboBoxOrderFeed.Items.Add(orderFeed);
     }
 }
开发者ID:adajinjin,项目名称:CodeSamples_TTAPI_CSharp,代码行数:15,代码来源:frmSubmitOrder.cs

示例3: updateInstrument

        /// <summary>
        /// Update the instrument information in the grid.
        /// </summary>
        /// <param name="instrument">Instrument</param>
        private void updateInstrument(Instrument instrument)
        {
            for (int i = 1; i < dataGridViewSpreadDetails.Columns.Count; i++)
            {
                //get the instrument which is a hidden row
                InstrumentKey instrKey = (InstrumentKey)dataGridViewSpreadDetails.Rows[(int)FieldType.HiddenObject].Cells[i].Value;
                if (instrument.Key == instrKey)
                {
                    string instrName = instrument.GetFormattedName(InstrumentNameFormat.Full);
                    dataGridViewSpreadDetails.Rows[(int)FieldType.Contract].Cells[i].Value = instrName;

                    DataGridViewComboBoxCell combo = (DataGridViewComboBoxCell)dataGridViewSpreadDetails.Rows[(int)FieldType.OrderFeedCombo].Cells[i];
                    combo.DisplayStyle = DataGridViewComboBoxDisplayStyle.DropDownButton;

                    string selectedOrderFeed = (string)combo.Value;
                    combo.Items.Clear();
                    combo.Value = "";
                    foreach (var feed in instrument.GetValidOrderFeeds())
                    {
                        combo.Items.Add(feed.ConnectionKey.GatewayKey.Name);
                    }

                    if (!String.IsNullOrEmpty(selectedOrderFeed) && combo.Items.Contains(selectedOrderFeed))
                    {
                        combo.Value = selectedOrderFeed;
                    }
                }
            }
        }
开发者ID:adajinjin,项目名称:CodeSamples_TTAPI_CSharp,代码行数:33,代码来源:SpreadDetailsForm.cs


注:本文中的Instrument.GetValidOrderFeeds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。