예제 #1
0
        public LegData Clone()
        {
            LegData ld = (LegData)this.MemberwiseClone();

            ld.Id = null;
            return(ld);
        }
예제 #2
0
        /***********************************************************
         *
         * Check for valid IB positions
         *
         * ********************************************************/

        private async Task CheckForValidPositions()
        {
            List <LegData> ib = await frmPos.FetchIBPositions();

            foreach (DataGridViewRow r in dgvCloseTrade.Rows)
            {
                bool bFound = false;

                LegData leg = (LegData)r.DataBoundItem;
                foreach (var l in ib)
                {
                    if (leg.LocalSymbol == l.LocalSymbol)
                    {
                        bFound = true;
                        break;
                    }
                }
                if (!bFound)
                {
                    r.DefaultCellStyle.BackColor    = Utils.colRED;
                    lbMissingRemotePosition.Visible = true;
                    m_bInvalidPositions             = true;
                }
            }
        }
예제 #3
0
        /******************************************************
         *
         * A leg column has changed, so handle it
         *
         * ***************************************************/

        internal void LegStatusChangeHandler(LegData leg, int col)
        {
            Program.frmMain.LegStatusChanged(this, leg, col);
        }