コード例 #1
0
        /// <summary>
        /// 新增套利单控件。
        /// </summary>
        /// <param name="autoTrader"></param>
        private void AddArbitrageOrderControl(AutoTrader autoTrader)
        {
            if (ExistArbitrageOrderControl(autoTrader.TraderIdentify) == false)
            {
                ArbitrageOrderControl orderControl = CreateArbitrageOrderControl(autoTrader);

                this.panelOrderContainer.Controls.Add(orderControl);
                m_orderControlList.Add(orderControl);
                orderControl.Initialize();
            }
            else
            {
                Debug.Assert(false);
            }
        }
コード例 #2
0
        /// <summary>
        /// 创建套利单控件。
        /// </summary>
        /// <param name="arbitrageOrder"></param>
        /// <returns></returns>
        private ArbitrageOrderControl CreateArbitrageOrderControl(AutoTrader autoTrader)
        {
            ArbitrageOrderControl orderItemControl = new ArbitrageOrderControl(autoTrader);

            orderItemControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            orderItemControl.Dock        = System.Windows.Forms.DockStyle.Top;
            orderItemControl.Location    = new System.Drawing.Point(0, 0);
            orderItemControl.Name        = "arbitrageItemControl1";
            orderItemControl.Size        = new System.Drawing.Size(836, 153);
            orderItemControl.TabIndex    = 0;

            orderItemControl.Initialize();

            return(orderItemControl);
        }