Esempio n. 1
0
        public LegData Clone()
        {
            LegData ld = (LegData)this.MemberwiseClone();

            ld.Id = null;
            return(ld);
        }
Esempio n. 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;
                }
            }
        }
Esempio n. 3
0
        /******************************************************
         *
         * A leg column has changed, so handle it
         *
         * ***************************************************/

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