public LegData Clone() { LegData ld = (LegData)this.MemberwiseClone(); ld.Id = null; return(ld); }
/*********************************************************** * * 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; } } }
/****************************************************** * * A leg column has changed, so handle it * * ***************************************************/ internal void LegStatusChangeHandler(LegData leg, int col) { Program.frmMain.LegStatusChanged(this, leg, col); }