Beispiel #1
0
        public Offers(O2GTableManager mTblMgr)
        {
            while (mTblMgr.getStatus() != O2GTableManagerStatus.TablesLoaded && mTblMgr.getStatus() != O2GTableManagerStatus.TablesLoadFailed)
            {
                Thread.Sleep(50);
            }
            O2GOffersTable   table    = (O2GOffersTable)mTblMgr.getTable(O2GTableType.Offers);
            OffersListener   listener = new OffersListener();
            O2GOfferTableRow row      = null;

            table.subscribeUpdate(O2GTableUpdateType.Insert, listener);
            table.subscribeUpdate(O2GTableUpdateType.Update, listener);
            try
            {
                mTblMgr.lockUpdates();
                for (int ii = 0; ii < table.Count; ii++)
                {
                    row = table.getRow(ii);

                    foreach (O2GTableColumn CurrentColumn in table.Columns)
                    {
                        if (CurrentColumn.ID == "Instrument")
                        {
                            CurrencyList.Add(row.getCell(1).ToString());
                        }
                    }
                }
            }
            finally
            {
                mTblMgr.unlockUpdates();
            }
            table.unsubscribeUpdate(O2GTableUpdateType.Insert, listener);
            table.unsubscribeUpdate(O2GTableUpdateType.Update, listener);
        }
Beispiel #2
0
        public Offers(MainForm CurrentForm, O2GTableManager mTblMgr)
        {
            CreateTable();

            CurrentForm.PopulateTable(OffersTable);

            while (mTblMgr.getStatus() != O2GTableManagerStatus.TablesLoaded && mTblMgr.getStatus() != O2GTableManagerStatus.TablesLoadFailed)
            {
                Thread.Sleep(50);
            }
            O2GOffersTable   table    = (O2GOffersTable)mTblMgr.getTable(O2GTableType.Offers);
            OffersListener   listener = new OffersListener();
            O2GOfferTableRow row      = null;

            for (int i = 0; i < table.Count; i++)
            {
                DataRow CurrentRow = OffersTable.NewRow();
                OffersTable.Rows.Add(CurrentRow);
            }

            CurrentForm.GetTableData(table, listener, row, mTblMgr);
        }