void ProdRestartGridCtrl::ResetGrid() { static const int maxRestart = 16; productionRestartTimes.ReAlloc(maxRestart); SetRowCount(maxRestart + 1); SetColCount(2); SetCenteredText(0, 1, "Restart Time" ); CString sRowHeader; for (int i = 0; i < maxRestart; i++) { int row = i + 1; sRowHeader.Format("%d", row); SetCenteredText(row, 0, sRowHeader ); if (i > productionRestartTimes.UpperBound()) productionRestartTimes[i] = nullReal; SetCell(row, 1, new ProdRestartTimeGridCell(i)); } SetEditMode(); SetBorderThickness(4); AutoSize(); SetColSize(1, GetColSize(1) + 15); UpdateAllRows(); }
void DiaGridView::OnInitialUpdate() { // Call the base class OnInitialUpdate. This call is // essential for grid specific intialization (In // contrast to GXInit which performs application specific // intialization) CGXGridView::OnInitialUpdate(); // Disable Undo mechanism for the following commands. // Objective Grid has a built in Undo/Redo architecture // that can be disabled/enabled with this call. // We disable it here so that users are not able to // rollback changes that we make in code. GetParam()->EnableUndo(FALSE); CMFCDiaDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); if (!pDoc) return; m_entities = pDoc->getDrawEntities(); SetRowCount(0); SetColCount(5); SetValueRange(CGXRange(0, 1), "figure type"); SetValueRange(CGXRange(0, 2), "center x"); SetValueRange(CGXRange(0, 3), "center y"); SetValueRange(CGXRange(0, 4), "line type"); SetValueRange(CGXRange(0, 5), "line color"); // Re-enable undo mechanism GetParam()->EnableUndo(TRUE); }
BOOL CDrawInfo::SetRect( CRect rc ) { ////////////////////////////////////////////////////////////////////////// // 设置列宽 SetColCount(INFO_COL_COUNT); if (GetColCount() > 1) { ColInfoStruct sColInfo; sColInfo.nWidth = (rc.Width() - INFO_LAST_COL_WIDTH) / (GetColCount() - 1); for (int i = 0; i < GetColCount() - 1; i++) { SetColInfo(i, &sColInfo); } sColInfo.nWidth = rc.Width() - sColInfo.nWidth * (GetColCount() - 1); SetColInfo(GetColCount()-1, &sColInfo); } ////////////////////////////////////////////////////////////////////////// CDrawTableBase::SetRect(rc); rc.top = rc.top + GetRowCount() * INFO_ROW_HEIGHT + 1; m_pViewInfo->SetRect(rc); return TRUE; }
void GridViewGridControl::UpdateGrid(const DC_GridData* inGrid) { CWaitCursor w; // this can be time consuming gGrid = inGrid; if (gGrid == 0) { SetRowCount(2); SetColCount(2); SetCenteredText(0, 1, "Col1"); SetCenteredText(1, 0, "Row1"); SetCenteredText(1, 1, "no data"); AutoSize(); return; } int nRows = gGrid->xData.Size(); int nCols = gGrid->yData.Size(); SetRowCount(nRows + 1); SetColCount(nCols + 1); CString str; char tempStr[80]; int i; for (i = 0; i < nCols; i++) { gridFormat.RealToString(gGrid->yData[i], tempStr, 80); str = tempStr; SetCenteredText(0, i + 1, str); } for (i = 0; i < nRows; i++) { gridFormat.RealToString(gGrid->xData[i], tempStr, 80); str = tempStr; SetCenteredText(i + 1, 0, str); for (int j = 0; j < nCols; j++) SetCell(i + 1, j + 1, new GridViewValueCell(j, i, this)); } UpdateGridData(); lastWasNull = false; }
/** * @brief create a rollback segment by selecting columns from a tuple * @param target_list The columns to be selected * @param tuple The tuple to construct the RB * * TODO: Optimization can be done. We can save copying those columns that are *already * in the rollback segment created by the same transaction. What we need to do *is to add * a bitmap in the rollback segment indicating columns it contains. After that *we * can bypass these columns when making a new rollback segment. */ RBSegType RollbackSegmentPool::CreateSegmentFromTuple( const catalog::Schema *schema, const TargetList &target_list, const AbstractTuple *tuple) { PL_ASSERT(schema); PL_ASSERT(target_list.size() != 0); size_t col_count = target_list.size(); size_t header_size = pairs_start_offset + col_count * sizeof(ColIdOffsetPair); size_t data_size = 0; RBSegType rb_seg = nullptr; // First figure out the total size of the rollback segment data area for (auto &target : target_list) { auto col_id = target.first; data_size += schema->GetLength(col_id); } // Allocate the RBSeg rb_seg = (RBSegType)pool_.AllocateZeroes(header_size + data_size); PL_ASSERT(rb_seg); // Fill in the header SetNextPtr(rb_seg, nullptr); SetTimeStamp(rb_seg, MAX_CID); SetColCount(rb_seg, col_count); // Fill in the col_id & offset pair and set the data field size_t offset = 0; for (size_t idx = 0; idx < target_list.size(); ++idx) { auto &target = target_list[idx]; auto col_id = target.first; const bool is_inlined = schema->IsInlined(col_id); const bool is_inbytes = false; size_t inline_col_size = schema->GetLength(col_id); size_t allocate_col_size = (is_inlined) ? inline_col_size : schema->GetVariableLength(col_id); SetColIdOffsetPair(rb_seg, idx, target.first, offset); // Set the value char *value_location = GetColDataLocation(rb_seg, idx); Value value = tuple->GetValue(col_id); PL_ASSERT(schema->GetType(col_id) == value.GetValueType()); value.SerializeToTupleStorageAllocateForObjects( value_location, is_inlined, allocate_col_size, is_inbytes, &pool_); // Update the offset offset += inline_col_size; } return rb_seg; }
void CRGXDeskLogRows::initGrid() { GetParam()->EnableUndo(FALSE); SetRowCount(50); SetColCount(16); // // esimerkiksi r2s2 asetetaan valintalistaksi ! //pLainarivit->SetStyleRange(CGXRange(2, 2), CGXStyle() // .SetControl(GX_IDS_CTRL_TEXTFIT) // .SetChoiceList(_T("one\ntwo\nthree\nfour\nfive\nsix\nseven\neight"))); SetStyleRange(CGXRange(0,1), CGXStyle().SetValue("KS_Tunnus")); SetStyleRange(CGXRange(0,2), CGXStyle().SetValue("Aika")); SetStyleRange(CGXRange(0,3), CGXStyle().SetValue("AM")); SetStyleRange(CGXRange(0,4), CGXStyle().SetValue("LainaNr")); SetStyleRange(CGXRange(0,5), CGXStyle().SetValue("Tapahtuma")); SetStyleRange(CGXRange(0,6), CGXStyle().SetValue("Selite")); SetStyleRange(CGXRange(0,7), CGXStyle().SetValue("Siirrot")); SetStyleRange(CGXRange(0,8), CGXStyle().SetValue("VanhaLaina")); SetStyleRange(CGXRange(0,9), CGXStyle().SetValue("UusiLaina")); SetStyleRange(CGXRange(0,10), CGXStyle().SetValue("Korot")); SetStyleRange(CGXRange(0,11), CGXStyle().SetValue("SHVMaksut")); SetStyleRange(CGXRange(0,12), CGXStyle().SetValue("Toimitusmaksut")); SetStyleRange(CGXRange(0,13), CGXStyle().SetValue("Pyöristys")); SetStyleRange(CGXRange(0,14), CGXStyle().SetValue("Maksettava")); SetStyleRange(CGXRange(0,15), CGXStyle().SetValue("Alijaama")); SetStyleRange(CGXRange(0,16), CGXStyle().SetValue("Ylijaama")); SetColWidth(0,0,0); // rivi# SetColWidth(1,1,17); // KS_Tunnus SetColWidth(2,2,100); // Aika SetColWidth(3,3,17); // AM SetColWidth(4,4,40); // LainaNr SetColWidth(5,5,25); // Tapahtuma SetColWidth(6,6,130); // Selite SetColWidth(7,7,60); // Summa SetColWidth(8,8,60); // VanhaLaina SetColWidth(9,9,60); // UusiLaina SetColWidth(10,10,50); // Korot SetColWidth(11,11,50); // SHVMaksut SetColWidth(12,12,50); // Toimitusmaksut SetColWidth(13,13,50); // Pyöristys SetColWidth(14,14,50); // Maksettava SetColWidth(15,15,50); // Alijaama SetColWidth(16,16,50); // Ylijaama SetStyleRange(CGXRange().SetCols(14), CGXStyle().SetInterior(RGB(255,255,192))); this->GetParam()->EnableSelection(FALSE); SetReadOnly(TRUE); GetParam()->EnableUndo(TRUE); SetFocus(); }
/////////////////////////////////////////////////////////////////////////// // Initialize: Initialize the grid // Inputs: // QueryImpRef refQueryFile The reference query object // from which records will be read. /////////////////////////////////////////////////////////////////////////// void CStreetSegmentBrowseGrid::Initialize( QueryImpRef refQueryFile_ ) { refQueryFile = refQueryFile_; CGXGridWnd::Initialize(); // Column headings: // CityStatePostcodeID, Predir, Street Name, Suffix, Postdir, StreetSegmentIDFirst, StreetSegmentCount SetColCount(ColumnCount); // View grids disallow UNDO. Don't turn this on, or warnings will // be issued when you try to re-run a job with a big grid. GetParam()->EnableUndo(FALSE); }
CDrawRStockTitle::CDrawRStockTitle(IHsUserDataCfg* pUserDefCfg, IHsColor* pColor, IHsFont* pFont) { ASSERT(pUserDefCfg && pColor && pFont); m_iUserDefCfg = pUserDefCfg; m_pColor = pColor; m_pFont = pFont; SetStyle(TABLE_STYLE_SCREEN | TABLE_WIDTH_CHANGABLE | TABLE_HEIGHT_CHANGABLE); SetRowCount(1); SetColCount(1); CreateCell("", 0, 0, 0, CELL_TIP); ReadFile(); m_pImageList = NULL; }
void GRaggedFloatTableData::RemoveAllCols() { itsCols->DeleteAll(); const JSize count = GetColCount(); SetColCount(0); if (itsBroadcast) { Broadcast(JTableData::ColsRemoved(1, count)); } ColsAdded(1); if (itsBroadcast) { Broadcast(JTableData::ColsInserted(1, 1)); } }
void ColorMapGridControl::Initialize() { SetColCount(5); SetRowCount(DC_ColorMap::maxCMcolors + 1); CString str; for (int i = 1; i <= DC_ColorMap::maxCMcolors; i++) { str.Format("%d", i); SetCenteredText(i, 0, str); SetCell(i , 1, new ValueCell(i - 1, 0, this)); SetCell(i , 2, new ValueCell(i - 1, 1, this)); SetCell(i , 3, new ValueCell(i - 1, 2, this)); SetCell(i , 4, new ColorCell(i - 1, this)); } SetColLabels(); }
void CDrawInfo::CreateSelf() { // 第一行第一列为股票名称 第二行第二列为股票代码 int nCellCount = m_ayInfoIndex.GetCount() + 2; int nRowCount = nCellCount / INFO_COL_COUNT + ((nCellCount%INFO_COL_COUNT)==0?0:1); // 向上取整 SetColCount(INFO_COL_COUNT); SetRowCount(nRowCount); SetRowHeight(INFO_ROW_HEIGHT); nCellCount = INFO_COL_COUNT * nRowCount; SetCellCount(nCellCount); int nCellIndex(0); int nAyIndex(0); CString str; InfoIndex* pInfoIndex = NULL; ////////////////////////////////////////////////////////////////////////// // 第一列 str = m_stkInfo.m_cStockName; // 股票名称 CreateCell(str, TEXT_COLOR_STOCKCODE, TEXT_FONT_FIXED, ITEM_TEXT_CENTER, CELL_BORDER_RIGHT | CELL_BORDER_BOTTOM, 0, nCellIndex++); str = m_stkInfo.m_ciStockCode.GetCode(); // 代码名称 CreateCell(str, TEXT_COLOR_STOCKNAME, TEXT_FONT_FIXED, ITEM_TEXT_CENTER, CELL_BORDER_RIGHT | CELL_BORDER_BOTTOM, 0, nCellIndex++); ////////////////////////////////////////////////////////////////////////// // 添加返回的数据 for (int y = 0; y < GetRowCount(); y++) { for (int x = 1; x < GetColCount() - 1; x++) { nCellIndex = PointToIndex(CPoint(x,y)); str = ""; if (nAyIndex < m_ayInfoIndex.GetCount()) { pInfoIndex = m_ayInfoIndex.GetAt(nAyIndex++); str = pInfoIndex->m_cTitle; } CreateCell(str, TEXT_COLOR_FIXEDNAME, TEXT_FONT_FIXED, ITEM_TEXT_CENTER, CELL_BORDER_RIGHT | CELL_BORDER_BOTTOM, 0, nCellIndex); } // 每一行最后一列单元格是按钮 nCellIndex = PointToIndex(CPoint(GetColCount()-1, y)); CreateCell("", TEXT_COLOR_FIXEDNAME, TEXT_FONT_FIXED, ITEM_TEXT_CENTER, CELL_BORDER_RIGHT | CELL_BORDER_BOTTOM, 0, nCellIndex); } }
void CRGXMainWndGrid::OnInitialUpdate() { CGXGridWnd/*CGXRecordWnd*/::OnInitialUpdate(); // Creates all objects and links them to the grid //GetParam()->EnableUndo(FALSE); //SetAccelArrowKey(TRUE); SetRowCount(256); SetColCount(17); //SetStyleRange(CGXRange(2, 2), CGXStyle() // .SetControl(GX_IDS_CTRL_TEXTFIT) // .SetChoiceList(_T("one\ntwo\nthree\nfour\nfive\nsix\nseven\neight")) // ); //GetParam()->EnableUndo(TRUE); // HUOM ! //initialisointi voidaan tehdä myös view-luokan (CPanttiView) OnInitialUpdate():ssa pLainaRS->m_pDatabase = theApp.GetDatabase(); this->GetParam()->EnableSelection(FALSE); SetColumnWidths(); //ChangeStandardStyle(CGXStyle() // .SetControl(GX_IDS_CTRL_STATIC) // .SetReadOnly(TRUE)); // // --- test --- setGridReadOnly(TRUE); /*SetStyleRange(CGXRange().SetCols(0,7), CGXStyle().SetReadOnly(TRUE)); SetStyleRange(CGXRange().SetCols(8,8), CGXStyle().SetReadOnly(FALSE).SetInterior(RGB(192,192,192))); SetStyleRange(CGXRange().SetCols(9,17), CGXStyle().SetReadOnly(TRUE)); */ }
void XYViewGridControl::UpdateXY(const DC_XYData* inXY) { SetColCount(3); SetCenteredText(0, 1, " X Data "); SetCenteredText(0, 2, " Y Data "); gXY = inXY; if (gXY == 0) { SetRowCount(2); SetCenteredText(1, 0, "1"); SetCenteredText(1, 1, "no data"); SetCenteredText(1, 2, "no data"); AutoSize(); return; } int nRows = gXY->Size(); SetRowCount(nRows + 1); CString str; for (int i = 0; i < nRows; i++) { str.Format("%d", i + 1); SetCenteredText(i + 1, 0, str); SetCell(i + 1, 1, new XYViewValueCell(true, i, this)); SetCell(i + 1, 2, new XYViewValueCell(false, i, this)); } UpdateXYData(); lastWasNull = false; }
BOOL CDrawRFinance::CreateSelf() { m_ayTitleInt.RemoveAll(); m_ayTitleStr.RemoveAll(); m_ayTitleInt.Add(COLUMN_FINANCE_REPORT_DATE); //38 报告期 m_ayTitleStr.Add("报告期"); m_ayTitleInt.Add(COLUMN_CAPITALIZATION_TOTAL); //1 总股本(万股) m_ayTitleStr.Add("总股本"); m_ayTitleInt.Add(COLUMN_CAPITALIZATION_PASS_A); //7 流通A股 m_ayTitleStr.Add("流通A股"); m_ayTitleInt.Add(COLUMN_FINANCE_ASSETS_YIELD); //37 净资收益率 m_ayTitleStr.Add("净资收益率"); m_ayTitleInt.Add(COLUMN_FINANCE_MAIN_INCOME); //20 主营收入 m_ayTitleStr.Add("主营收入"); m_ayTitleInt.Add(COLUMN_FINANCE_TOTAL_PROFIT); //28 利润总额 m_ayTitleStr.Add("利润总额"); m_ayTitleInt.Add(COLUMN_FINANCE_PER_UNPAID); //32 每股未分配 m_ayTitleStr.Add("每股未分配"); m_ayTitleInt.Add(COLUMN_CAPITALIZATION_NATIONAL); //2 国家股 m_ayTitleStr.Add("国家股"); m_ayTitleInt.Add(COLUMN_CAPITALIZATION_INITIATOR); //3 发起人法人股 m_ayTitleStr.Add("发起人法人股"); m_ayTitleInt.Add(COLUMN_CAPITALIZATION_CORPORATION); //4 法人股 m_ayTitleStr.Add("法人股"); m_ayTitleInt.Add(COLUMN_CAPITALIZATION_B); //5 B股 m_ayTitleStr.Add("B股"); m_ayTitleInt.Add(COLUMN_CAPITALIZATION_H); //6 H股 m_ayTitleStr.Add("H股"); m_ayTitleInt.Add(COLUMN_CAPITALIZATION_EMPLOYEE); //8 职工股 m_ayTitleStr.Add("职工股"); m_ayTitleInt.Add(COLUMN_FINANCE_TOTAL_ASSETS); //10 总资产 m_ayTitleStr.Add("总资产"); m_ayTitleInt.Add(COLUMN_FINANCE_CURRENT_ASSETS); //11 流动资产 m_ayTitleStr.Add("流动资产"); m_ayTitleInt.Add(COLUMN_FINANCE_CAPITAL_ASSETS); //12 固定资产 m_ayTitleStr.Add("固定资产"); m_ayTitleInt.Add(COLUMN_FINANCE_UNBODIED_ASSETS); //13 无形资产 m_ayTitleStr.Add("无形资产"); m_ayTitleInt.Add(COLUMN_FINANCE_CURRENT_LIABILITIES); //15 流动负债 m_ayTitleStr.Add("流动负债"); m_ayTitleInt.Add(COLUMN_FINANCE_LONG_LIABILITIES); //16 长期负债 m_ayTitleStr.Add("长期负债"); m_ayTitleInt.Add(COLUMN_FINANCE_CAPITAL_ACCFUND); //17 资本公积金 m_ayTitleStr.Add("资本公积金"); m_ayTitleInt.Add(COLUMN_FINANCE_PERSTOCK_ACCFUND); //18 每股公积金 m_ayTitleStr.Add("每股公积金"); m_ayTitleInt.Add(COLUMN_FINANCE_PARTNER_RIGHT); //19 股东权益 m_ayTitleStr.Add("股东权益"); m_ayTitleInt.Add(COLUMN_FINANCE_TAKING_PROFIT); //23 营业利润 m_ayTitleStr.Add("营业利润"); m_ayTitleInt.Add(COLUMN_FINANCE_YIELD); //24 投资收益 m_ayTitleStr.Add("投资收益"); m_ayTitleInt.Add(COLUMN_FINANCE_OTHER_INCOME); //26 营业外收支 m_ayTitleStr.Add("营业外收支"); m_ayTitleInt.Add(COLUMN_FINANCE_SCOT_PROFIT); //29 税后利润 m_ayTitleStr.Add("税后利润"); m_ayTitleInt.Add(COLUMN_FINANCE_RETAINED_PROFITS); //30 净利润 m_ayTitleStr.Add("净利润"); m_ayTitleInt.Add(COLUMN_FINANCE_PER_INCOME); //33 每股收益 m_ayTitleStr.Add("每股收益"); m_ayTitleInt.Add(COLUMN_FINANCE_PER_ASSETS); //34 每股净资产 m_ayTitleStr.Add("每股净资产"); m_ayTitleInt.Add(COLUMN_FINANCE_PARTNER_RIGHT_RATIO); //36 股东权益比 m_ayTitleStr.Add("股东权益比"); DWORD lItemStyle(-1); DWORD lCellStyle(-1); //////////////////////////// 第一列 ////////////////////////////////////// lItemStyle = ITEM_TEXT_LEFT; for (int i = 0; i < m_ayTitleInt.GetCount(); i++) { CreateCell(m_ayTitleStr.GetAt(i), TEXT_COLOR_FIXEDNAME, TEXT_FONT_FINANCE, lItemStyle); } //////////////////////////// 第二列 ////////////////////////////////////// lItemStyle = ITEM_TEXT_RIGHT; for (int i = 0; i < m_ayTitleInt.GetCount(); i++) { CreateCell("", TEXT_COLOR_FIXEDNAME, TEXT_FONT_FINANCE, lItemStyle); } SetRowCount(m_ayTitleInt.GetCount()); SetColCount(RFinance_COL); SetFixColCount(0); SetFixRowCount(0); SetRowHeight(RFinance_ROW_HEIGHT); return TRUE; }
void DataCaptureGridCtrl::ResetDataCaptureGrid() { // start with a clean slate dataCapture.DataCaptureCleanup(); // set type strings captureTypeStrings.Alloc(5); // always valid captureTypeStrings += "Pressure"; captureTypeStrings += "Flow"; captureTypeStrings += "Production"; if (!control.IsGas()) captureTypeStrings += "Test Zone"; if (control.IsUnconfined()) captureTypeStrings += "Water Table"; pressureCapTypeStrings.Alloc(3); pressureCapTypeStrings += "Test Zone"; pressureCapTypeStrings += "Observation Well"; pressureCapTypeStrings += "Superposition"; flowCapTypeStrings.Alloc(4); flowCapTypeStrings += "Well"; flowCapTypeStrings += "Formation"; flowCapTypeStrings += "Test Zone"; flowCapTypeStrings += "Wellbore Storage"; productionCapTypeStrings.Alloc(4); productionCapTypeStrings += "Well"; productionCapTypeStrings += "Formation"; productionCapTypeStrings += "Test Zone"; productionCapTypeStrings += "Wellbore Storage"; testZoneCapTypeStrings.Alloc(3); testZoneCapTypeStrings += "TZ Temp."; testZoneCapTypeStrings += "TZ Comp."; testZoneCapTypeStrings += "TZ Volume"; waterTableCapTypeStrings.Alloc(1); waterTableCapTypeStrings += "Observation Well"; int maxCol = 6; if (control.IsLayered()) { maxCol++; wellboreZoneStrings.Alloc(layerSpec.GetNWellboreZone()); for (int i = 0; i < wellBoreZones.Size(); i++) { const WellBoreZone& currZone = wellBoreZones[i]; if (!currZone.zoneIsPacker) wellboreZoneStrings += currZone.intervalID; } } if (control.Is1DRadial()) maxCol++; // make sure there are 20 blanks dataCaptureData.ReAlloc(dataCaptureData.Size() + 20); SetRowCount(dataCaptureData.AllocSize() + 1); SetColCount(maxCol); SetCenteredText(0, 1, "Well ID" ); SetCenteredText(0, 2, "Output Type" ); SetCenteredText(0, 3, "Sub-Type" ); int nextCol = 4; if (control.IsLayered()) SetCenteredText(0, nextCol++, "Wellbore Zone" ); SetCenteredText(0, nextCol++, "Radius" ); if (control.Is1DRadial()) SetCenteredText(0, nextCol++, "RadiusUnits" ); SetCenteredText(0, nextCol++, "Output Units" ); CString sRowHeader; for (int i = 0; i < dataCaptureData.AllocSize(); i++) { int row = i + 1; sRowHeader.Format("%d", row); SetCenteredText(row, 0, sRowHeader ); SetCell(row, 1, new DcapDesigGridCell(i)); SetCell(row, 2, new CaptureTypeGridCell(i)); SetCell(row, 3, new CaptureSubTypeGridCell(i)); nextCol = 4; if (control.IsLayered()) SetCell(row, nextCol++, new DcapWellboreZoneDesigGridCell(i)); SetCell(row, nextCol++, new DataCaptureRadiusGridCell(i)); if (control.Is1DRadial()) SetCell(row, nextCol++, new RadUnitsGridCell(i)); SetCell(row, nextCol++, new OutputUnitsGridCell(i)); // reset all data for (int j = 1; j < maxCol; j++) ResetCell(i + 1, j); } SetEditMode(); SetBorderThickness(4); AutoSize(); for (int j = 1; j < maxCol; j++) SetColSize(j, GetColSize(j) + 15); InvalidateAll(); }
void TestZoneCurveGridCtrl::ResetTestZoneCurveGrid() { // start with a clean slate sequence.SequenceCleanup(); // set type strings curveTypeStrings.Alloc(6); curveTypeMap.Alloc(6); // always valid curveTypeStrings += "Pressure"; curveTypeMap += TestZoneCurve::tzPressure; curveTypeStrings += "Flow"; curveTypeMap += TestZoneCurve::tzFlowRate; if (testZoneTemperatureVaries && control.IsLiquid()) { curveTypeStrings += "Temperature"; curveTypeMap += TestZoneCurve::tzTemperature; } if (testZoneCompressibilityVaries && control.IsLiquid()) { curveTypeStrings += "Compressibility"; curveTypeMap += TestZoneCurve::tzCompressibility; } if (testZoneVolumeVaries) { curveTypeStrings += "Volume Change"; curveTypeMap += TestZoneCurve::tzDeltaVolume; curveTypeStrings += "Volume"; curveTypeMap += TestZoneCurve::tzAbsVolume; } // curve file desigs if (control.UseCurveFiles()) { nsCurveFileStatics::testZoneBCCurveFile.GetIDs(curveFileDesigStrings); } else { curveFOOK = AppMenuC::GetFuncObjList(typeid(DO_Curve), curveFOStrings, curveFOData, " "); } // and sequences sequence.GetSequenceIDs(sequenceDesigStrings); // make sure there are 20 blanks testZoneCurves.ReAlloc(testZoneCurves.Size() + 20); SetRowCount(testZoneCurves.AllocSize() + 1); SetColCount(6); SetCenteredText(0, 1, "Type" ); if (control.UseCurveFiles()) SetCenteredText(0, 2, "Curve ID" ); else SetCenteredText(0, 2, "Curve Object" ); SetCenteredText(0, 3, "Start Sequence" ); SetCenteredText(0, 4, "End Sequence" ); SetCenteredText(0, 5, "Curve Data" ); CString sRowHeader; for (int i = 0; i < testZoneCurves.AllocSize(); i++) { int row = i + 1; sRowHeader.Format("%d", row); SetCenteredText(row, 0, sRowHeader ); SetCell(row, 1, new CurveTypeGridCell(i)); if (control.UseCurveFiles()) SetCell(row, 2, new CurveDesigGridCell(i)); else SetCell(row, 2, new CurveFOGridCell(i)); SetCell(row, 3, new StartSequenceDesigGridCell(i)); SetCell(row, 4, new EndSequenceDesigGridCell(i)); SetCell(row, 5, new TZDataGridCell(i)); // reset all data for (int j = 1; j < 6; j++) ResetCell(i + 1, j); } SetEditMode(); SetBorderThickness(4); AutoSize(); for (int j = 1; j < 6; j++) SetColSize(j, GetColSize(j) + 15); InvalidateAll(); }