zOPER_EXPORT zSHORT OPERATION AEQ_RefreshAEQ( zVIEW vSubtask ) { RefreshCtrl( vSubtask, "ViewList" ); RefreshCtrl( vSubtask, "EntityList" ); RefreshCtrl( vSubtask, "AttributeList" ); return( 0 ); }
void CChartCtrl::OnPaint() { CPaintDC dc(this); // device context for painting if (!m_bMemDCCreated) { RefreshCtrl(); m_bMemDCCreated = true; } // Get Size of Display area CRect rect; GetClientRect(&rect); dc.BitBlt(0, 0, rect.Width(), rect.Height(), &m_BackgroundDC, 0, 0, SRCCOPY) ; // Draw the zoom rectangle if (m_bZoomEnabled && m_bLMouseDown) { CPen NewPen(PS_SOLID,1,RGB(255,255,255)); CPen* pOldPen = dc.SelectObject(&NewPen); dc.MoveTo(m_rectZoomArea.TopLeft()); dc.LineTo(m_rectZoomArea.right,m_rectZoomArea.top); dc.LineTo(m_rectZoomArea.BottomRight()); dc.LineTo(m_rectZoomArea.left,m_rectZoomArea.bottom); dc.LineTo(m_rectZoomArea.TopLeft()); dc.SelectObject(pOldPen); DeleteObject(NewPen); } }
void CBase_SampleChart::ClearPeak(const CBase_AnalysisSample* pSample, DWORD dwFlag) { EnableRefresh(false); if(dwFlag & FLAG_DATA_SOURCE) { CChartSerie* pSerie = GetMainSerie(); if(pSerie) pSerie->ClearSerie(); } // if(dwFlag & FLAG_POINTS_BEGIN) // { // if(m_pBeginPoints) m_pBeginPoints->ClearSerie(); // } // if(dwFlag & FLAG_POINTS_PEAK) // { // if(m_pPeakPoints) m_pPeakPoints->ClearSerie(); // } // if(dwFlag & FLAG_POINTS_END) // { // if(m_pEndPoints) m_pEndPoints->ClearSerie(); // } if(dwFlag & FLAG_LINES_BASE) { CChartLineSerie* pLine = NULL; for(int i=0; i<=m_arrBaseLines.GetUpperBound(); i++) { pLine = m_arrBaseLines.GetAt(i); if(pLine) RemoveSerie(pLine->GetSerieId()); } m_arrBaseLines.RemoveAll(); } if(dwFlag & FLAG_LINES_DIVIDEBASE) { CChartLineSerie* pLine = NULL; for(int i=0; i<=m_arrDivideBaseLines.GetUpperBound(); i++) { pLine = m_arrDivideBaseLines.GetAt(i); if(pLine) RemoveSerie(pLine->GetSerieId()); } m_arrDivideBaseLines.RemoveAll(); } DWORD dwFMask = dwFlag & FLAGMASK_STRINGS_ASSISTANT; if(dwFMask == FLAGMASK_STRINGS_ASSISTANT) { //同时都删除,才清空 CSuperChartString* pSerie = NULL; for(int i=0; i<=m_arrAssistants.GetUpperBound(); i++) { pSerie = m_arrAssistants.GetAt(i); if(pSerie) RemoveChartString(pSerie); } m_arrAssistants.RemoveAll(); } else if(dwFMask) { //否则,重画 RedrawPeak(pSample, FLAGMASK_STRINGS_ASSISTANT & ~dwFMask); } EnableRefresh(true); RefreshCtrl(); }
int CChartCtrl::Create(CWnd *pParentWnd, const RECT &rect, UINT nID, DWORD dwStyle) { int Result = CWnd::Create(CHARTCTRL_CLASSNAME, _T(""), dwStyle, rect, pParentWnd, nID); if (Result) RefreshCtrl(); return Result; }
void CChartCtrl::OnSize(UINT nType, int cx, int cy) { CWnd::OnSize(nType, cx, cy); // Force recreation of background DC if (m_BackgroundDC.GetSafeHdc() ) m_BackgroundDC.DeleteDC(); RefreshCtrl(); }
void CChartCtrl::RemoveAllSeries() { std::vector<CChartSerie*>::iterator iter = m_pSeriesList.begin(); for (iter; iter != m_pSeriesList.end(); iter++) { delete (*iter); } m_pSeriesList.clear(); RefreshCtrl(); }
void CChartCtrl::RemoveSerie(size_t Index) { size_t Count = m_pSeriesList.size(); if (Index>=Count) return; CChartSerie* pToDelete = m_pSeriesList[Index]; std::vector<CChartSerie*>::iterator it = m_pSeriesList.begin() + Index; m_pSeriesList.erase(it); if (pToDelete) { delete pToDelete; pToDelete = NULL; } RefreshCtrl(); }
zOPER_EXPORT zSHORT OPERATION OpIns_RefreshSelectButton( zVIEW vSubtask ) { zVIEW vEdWrk; zCHAR szCurrentType[ 5 ]; GetWorkView( &vEdWrk ); GetStringFromAttribute( szCurrentType /* Returned String */, vEdWrk /* View Id */, "OperListType" /* Entity Name */, "Type" /* Attribute Name */ ); if ( zstrcmp( szCurrentType, "Z" ) == 0 ) { MB_SetMessage( vSubtask, 0, "Press F1 for Help on the operation." ); } RefreshCtrl( vSubtask, "SelectButton" ); return( 0 ); }
///////////////////////////////////////////////////////////////////////////// // // OPERATION: zwTZCMRPTD_LoadNewAudittrail // ///////////////////////////////////////////////////////////////////////////// zOPER_EXPORT zSHORT /*DIALOG */ OPERATION zwTZCMRPTD_LoadNewAudittrail( zVIEW vSubtask ) { zVIEW vTZCMCPL; zVIEW vTZBRAU2O; zVIEW vParentWindow; zULONG ulZKey; zULONG ulZKeyCPLR; zCHAR szName[ 33 ]; zCHAR szControlText[40]; GetViewByName( &vTZCMCPL, "TZCMCPL", vSubtask, zLEVEL_TASK ); GetIntegerFromAttribute( (zPLONG) &ulZKey, vTZCMCPL, "CPLR", "ZKey" ); GetStringFromAttribute( szName, vTZCMCPL, "CPLR", "Name" ); if ( GetViewByName( &vTZBRAU2O, "TZBRAU2O", vSubtask, zLEVEL_TASK ) > 0 ) { GetIntegerFromAttribute( (zPLONG) &ulZKeyCPLR, vTZBRAU2O, "CPLR", "ZKey" ); if ( ulZKey == ulZKeyCPLR ) return( 0 ); else DropObjectInstance( vTZBRAU2O ); } if ( zwfnTZCMRPTD_LoadNewAudittrail( vSubtask, &vTZBRAU2O ) < 0 ) { return( -1 ); } GetStringFromAttribute( szName, vTZCMCPL, "CPL", "Name" ); zstrcpy( szControlText, " CPL: " ); zstrcat( szControlText, szName ); SetCtrlText( vSubtask, "txtCPL", szControlText ); GetParentWindow( &vParentWindow, vSubtask ); RefreshCtrl( vParentWindow, "lbCPLRList" ); return( 0 ); } // zwTZCMRPTD_LoadNewAudittrail
void CChartCtrl::OnMouseMove(UINT nFlags, CPoint point) { if (m_bRMouseDown && m_bPanEnabled) { if (point != m_PanAnchor) { GetLeftAxis()->PanAxis(m_PanAnchor.y,point.y); GetRightAxis()->PanAxis(m_PanAnchor.y,point.y); GetBottomAxis()->PanAxis(m_PanAnchor.x,point.x); GetTopAxis()->PanAxis(m_PanAnchor.x,point.x); RefreshCtrl(); m_PanAnchor = point; } } if (m_bLMouseDown && m_bZoomEnabled) { m_rectZoomArea.BottomRight() = point; Invalidate(); } CWnd::OnMouseMove(nFlags, point); }
void CChartCtrl::OnLButtonUp(UINT nFlags, CPoint point) { m_bLMouseDown = false; if (m_bZoomEnabled) { if ( (m_rectZoomArea.left > m_rectZoomArea.right) || (m_rectZoomArea.top > m_rectZoomArea.bottom)) { GetBottomAxis()->UndoZoom(); GetTopAxis()->UndoZoom(); GetLeftAxis()->UndoZoom(); GetRightAxis()->UndoZoom(); } else { CChartAxis* pBottom = GetBottomAxis(); double MinVal = 0; double MaxVal = 0; if (pBottom->IsInverted()) { MaxVal = pBottom->ScreenToValue(m_rectZoomArea.left); MinVal = pBottom->ScreenToValue(m_rectZoomArea.right); } else { MinVal = pBottom->ScreenToValue(m_rectZoomArea.left); MaxVal = pBottom->ScreenToValue(m_rectZoomArea.right); } pBottom->SetZoomMinMax(MinVal,MaxVal); CChartAxis* pLeft = GetLeftAxis(); if (pLeft->IsInverted()) { MaxVal = pLeft->ScreenToValue(m_rectZoomArea.bottom); MinVal = pLeft->ScreenToValue(m_rectZoomArea.top); } else { MinVal = pLeft->ScreenToValue(m_rectZoomArea.bottom); MaxVal = pLeft->ScreenToValue(m_rectZoomArea.top); } pLeft->SetZoomMinMax(MinVal,MaxVal); CChartAxis* pTop = GetTopAxis(); if (pTop->IsInverted()) { MaxVal = pTop->ScreenToValue(m_rectZoomArea.left); MinVal = pTop->ScreenToValue(m_rectZoomArea.right); } else { MinVal = pTop->ScreenToValue(m_rectZoomArea.left); MaxVal = pTop->ScreenToValue(m_rectZoomArea.right); } pTop->SetZoomMinMax(MinVal,MaxVal); CChartAxis* pRight = GetRightAxis(); if (pRight->IsInverted()) { MaxVal = pRight->ScreenToValue(m_rectZoomArea.bottom); MinVal = pRight->ScreenToValue(m_rectZoomArea.top); } else { MinVal = pRight->ScreenToValue(m_rectZoomArea.bottom); MaxVal = pRight->ScreenToValue(m_rectZoomArea.top); } pRight->SetZoomMinMax(MinVal,MaxVal); } RefreshCtrl(); } CWnd::OnLButtonUp(nFlags, point); }
//:DIALOG OPERATION //:RemoveAll ( VIEW vSubtask ) //: VIEW TZTENVRO REGISTERED AS TZTENVRO zOPER_EXPORT zSHORT OPERATION RemoveAll( zVIEW vSubtask ) { zVIEW TZTENVRO = 0; zSHORT RESULT; //:VIEW TZZOLODO REGISTERED AS TZZOLODO zVIEW TZZOLODO = 0; //:VIEW TZZOLODO_Hier BASED ON LOD TZZOLODO zVIEW TZZOLODO_Hier = 0; //:STRING ( 100 ) szEntityName zCHAR szEntityName[ 101 ] = { 0 }; //:SHORT sReturnLevel zSHORT sReturnLevel = 0; //:SHORT nRC zSHORT nRC = 0; //:INTEGER lAbsPos zLONG lAbsPos = 0; //:INTEGER lDataSourceZKey zLONG lDataSourceZKey = 0; RESULT = GetViewByName( &TZTENVRO, "TZTENVRO", vSubtask, zLEVEL_TASK ); RESULT = GetViewByName( &TZZOLODO, "TZZOLODO", vSubtask, zLEVEL_TASK ); //:CreateViewFromViewForTask( TZZOLODO, TZZOLODO, vSubtask ) CreateViewFromViewForTask( &TZZOLODO, TZZOLODO, vSubtask ); //:ResetView( TZZOLODO ) ResetView( TZZOLODO ); //:CreateViewFromViewForTask( TZZOLODO_Hier, TZZOLODO, vSubtask ) CreateViewFromViewForTask( &TZZOLODO_Hier, TZZOLODO, vSubtask ); //:szEntityName = "LOD_EntityParent" ZeidonStringCopy( szEntityName, 1, 0, "LOD_EntityParent", 1, 0, 101 ); //:lDataSourceZKey = TZTENVRO.TE_DBMS_Source.ZKey GetIntegerFromAttribute( &lDataSourceZKey, TZTENVRO, "TE_DBMS_Source", "ZKey" ); //:nRC = DefineHierarchicalCursor( TZZOLODO_Hier, "LOD_EntityParent" ) nRC = DefineHierarchicalCursor( TZZOLODO_Hier, "LOD_EntityParent" ); //:LOOP WHILE nRC >= zCURSOR_SET while ( nRC >= zCURSOR_SET ) { //: IF nRC = zCURSOR_SET_RECURSIVECHILD if ( nRC == zCURSOR_SET_RECURSIVECHILD ) { //: SetViewToSubobject( TZZOLODO_Hier, "LOD_EntityChild" ) SetViewToSubobject( TZZOLODO_Hier, "LOD_EntityChild" ); } //: END //: // Set up our temp view from the hier view. //: GetAbsolutePositionForEntity( lAbsPos, TZZOLODO_Hier, "LOD_EntityParent" ) GetAbsolutePositionForEntity( &lAbsPos, TZZOLODO_Hier, "LOD_EntityParent" ); //: SetCursorAbsolutePosition( szEntityName, TZZOLODO, lAbsPos ) SetCursorAbsolutePosition( szEntityName, TZZOLODO, lAbsPos ); //: IF szEntityName = "LOD_EntityParent" if ( ZeidonStringCompare( szEntityName, 1, 0, "LOD_EntityParent", 1, 0, 101 ) == 0 ) { //: SET CURSOR FIRST TZZOLODO.POD_Entity //: WHERE TZZOLODO.TE_DBMS_SourceForEntity.ZKey = lDataSourceZKey RESULT = SetCursorFirstEntity( TZZOLODO, "POD_Entity", "" ); if ( RESULT > zCURSOR_UNCHANGED ) { while ( RESULT > zCURSOR_UNCHANGED && ( CompareAttributeToInteger( TZZOLODO, "TE_DBMS_SourceForEntity", "ZKey", lDataSourceZKey ) != 0 ) ) { RESULT = SetCursorNextEntity( TZZOLODO, "POD_Entity", "" ); } } //: IF RESULT >= zCURSOR_SET if ( RESULT >= zCURSOR_SET ) { //: TZZOLODO.POD_Entity.SQL_JoinWithParent = "N" SetAttributeFromString( TZZOLODO, "POD_Entity", "SQL_JoinWithParent", "N" ); } //: END } //: END //: nRC = SetCursorNextEntityHierarchical( sReturnLevel, szEntityName, TZZOLODO_Hier ) nRC = SetCursorNextEntityHierarchical( (zPUSHORT) &sReturnLevel, szEntityName, TZZOLODO_Hier ); } //:END //:DropView( TZZOLODO_Hier ) DropView( TZZOLODO_Hier ); //:DropView( TZZOLODO ) DropView( TZZOLODO ); //:RefreshCtrl( vSubtask, "JoinCheck" ) RefreshCtrl( vSubtask, "JoinCheck" ); return( 0 ); // END }
//: VIEW TZZOLODO REGISTERED AS TZZOLODO zOPER_EXPORT zSHORT OPERATION EntityChanged( zVIEW vSubtask ) { zVIEW TZZOLODO = 0; zSHORT RESULT; //:VIEW TZTENVRO REGISTERED AS TZTENVRO zVIEW TZTENVRO = 0; //:SHORT nIsCheckedOut zSHORT nIsCheckedOut = 0; zSHORT lTempInteger_0; zSHORT lTempInteger_1; zCHAR szTempString_0[ 201 ]; zCHAR szTempString_1[ 2 ]; zCHAR szTempString_2[ 201 ]; RESULT = GetViewByName( &TZZOLODO, "TZZOLODO", vSubtask, zLEVEL_TASK ); RESULT = GetViewByName( &TZTENVRO, "TZTENVRO", vSubtask, zLEVEL_TASK ); //:nIsCheckedOut = ComponentIsCheckedOut( vSubtask, TZZOLODO, zSOURCE_LOD_META ) nIsCheckedOut = ComponentIsCheckedOut( vSubtask, TZZOLODO, zSOURCE_LOD_META ); //:IF nIsCheckedOut = 1 if ( nIsCheckedOut == 1 ) { //:// do not allow any input to the Join checkbox, if we are on the root //:// or if the currrent LOD entity is work or if the currrent LOD entity is derived //:IF TZZOLODO.ER_RelLinkRec EXISTS AND TZZOLODO.LOD_EntityParent.Work != "Y" lTempInteger_0 = CheckExistenceOfEntity( TZZOLODO, "ER_RelLinkRec" ); //: AND TZZOLODO.LOD_EntityParent.Derived != "Y" if ( lTempInteger_0 == 0 && CompareAttributeToString( TZZOLODO, "LOD_EntityParent", "Work", "Y" ) != 0 && CompareAttributeToString( TZZOLODO, "LOD_EntityParent", "Derived", "Y" ) != 0 ) { //:// Set the cursor to the POD_Entity for the current TE Source. //:SET CURSOR FIRST TZZOLODO.POD_Entity //: WHERE TZZOLODO.TE_DBMS_SourceForEntity.ZKey = TZTENVRO.TE_DBMS_Source.ZKey RESULT = SetCursorFirstEntity( TZZOLODO, "POD_Entity", "" ); if ( RESULT > zCURSOR_UNCHANGED ) { while ( RESULT > zCURSOR_UNCHANGED && ( CompareAttributeToAttribute( TZZOLODO, "TE_DBMS_SourceForEntity", "ZKey", TZTENVRO, "TE_DBMS_Source", "ZKey" ) != 0 ) ) { RESULT = SetCursorNextEntity( TZZOLODO, "POD_Entity", "" ); } } //:IF RESULT < zCURSOR_SET if ( RESULT < zCURSOR_SET ) { //:// POD_Entity doesn't exist so create one. //:CREATE ENTITY TZZOLODO.POD_Entity RESULT = CreateEntity( TZZOLODO, "POD_Entity", zPOS_AFTER ); //:TZZOLODO.POD_Entity.SQL_JoinWithParent = "N" SetAttributeFromString( TZZOLODO, "POD_Entity", "SQL_JoinWithParent", "N" ); //:INCLUDE TZZOLODO.TE_DBMS_SourceForEntity FROM TZTENVRO.TE_DBMS_Source RESULT = IncludeSubobjectFromSubobject( TZZOLODO, "TE_DBMS_SourceForEntity", TZTENVRO, "TE_DBMS_Source", zPOS_AFTER ); } //:END //:// not the root and not work and not derived //:SetCtrlState( vSubtask, "JoinCheck", zCONTROL_STATUS_ENABLED, TRUE ) SetCtrlState( vSubtask, "JoinCheck", zCONTROL_STATUS_ENABLED, TRUE ); //:ELSE } else { //:SetCtrlState( vSubtask, "JoinCheck", zCONTROL_STATUS_ENABLED, FALSE ) SetCtrlState( vSubtask, "JoinCheck", zCONTROL_STATUS_ENABLED, FALSE ); } //:END //:// Refresh checkbox and set the string being displayed. //:IF TZZOLODO.POD_Entity EXISTS lTempInteger_1 = CheckExistenceOfEntity( TZZOLODO, "POD_Entity" ); if ( lTempInteger_1 == 0 ) { //: TZZOLODO.LOD_EntityParent.WorkString = TZZOLODO.LOD_EntityParent.Name + //: " JOIN = " + TZZOLODO.POD_Entity.SQL_JoinWithParent GetStringFromAttribute( szTempString_0, TZZOLODO, "LOD_EntityParent", "Name" ); ZeidonStringConcat( szTempString_0, 1, 0, " JOIN = ", 1, 0, 201 ); GetVariableFromAttribute( szTempString_1, 0, 'S', 2, TZZOLODO, "POD_Entity", "SQL_JoinWithParent", "", 0 ); ZeidonStringConcat( szTempString_0, 1, 0, szTempString_1, 1, 0, 201 ); SetAttributeFromString( TZZOLODO, "LOD_EntityParent", "WorkString", szTempString_0 ); //:ELSE } else { //: TZZOLODO.LOD_EntityParent.WorkString = TZZOLODO.LOD_EntityParent.Name + " JOIN = N" GetStringFromAttribute( szTempString_2, TZZOLODO, "LOD_EntityParent", "Name" ); ZeidonStringConcat( szTempString_2, 1, 0, " JOIN = N", 1, 0, 201 ); SetAttributeFromString( TZZOLODO, "LOD_EntityParent", "WorkString", szTempString_2 ); } //:END } //:END //:RefreshCtrl( vSubtask, "JoinCheck" ) RefreshCtrl( vSubtask, "JoinCheck" ); //:RefreshCtrl( vSubtask, "edDescription" ) RefreshCtrl( vSubtask, "edDescription" ); //:RefreshCtrl( vSubtask, "cbDerived" ) RefreshCtrl( vSubtask, "cbDerived" ); //:RefreshCtrl( vSubtask, "cbWork" ) RefreshCtrl( vSubtask, "cbWork" ); return( 0 ); // END }
void CBase_SampleChart::RedrawPeakOnRealTime(const CBase_AnalysisSample* pSample, DWORD dwFlag, CBase_SampleChart::enumMode eMode, bool bRefresh) { if(!pSample) return; EnableRefresh(false); if(dwFlag & FLAG_DATA_SOURCE) { CChartSerie* pSerie = GetMainSerie(); if(pSerie) { pSerie->ClearSerie(); const CArray<CCurveDataSingle>& m_srcData = pSample->m_dataMainCurve.m_arrayData; if(m_srcData.GetUpperBound() > -1) { pSerie->m_vPoints.InitPoints(m_srcData.GetUpperBound()+1); structMinMaxInfo mmi; GetBottomAxis()->GetMinMax(mmi.minx, mmi.maxx); GetLeftAxis()->GetMinMax(mmi.miny, mmi.maxy); bool bNeed = mmi.minx==0 && mmi.miny == 0 && mmi.maxx == 0 && mmi.maxy == 0; for (int i=0; i<=m_srcData.GetUpperBound(); ++i) { double x = m_srcData[i].dX; double y = m_srcData[i].dY; pSerie->m_vPoints.AddPoint(x, y); if(mmi.minx > x) mmi.minx = x; if(mmi.maxx < x) mmi.maxx = x; if(mmi.miny > y) mmi.miny = y; if(mmi.maxy < y) mmi.maxy = y; } if(bNeed) { GetBottomAxis()->SetCoordinate(mmi.minx, mmi.maxx, COORDINATE_SET); GetLeftAxis()->SetCoordinate(mmi.miny, mmi.maxy, COORDINATE_SET); } } } } //const CPeakList* pPS = &pSample->m_cResultList; const CPeakList* pPS = &pSample->m_cPeakList; const CPeakList* pRT = &pSample->m_cAllRealTimePeakList; if(dwFlag & FLAG_LINES_BASE) { //首先删除全部,再重新绘画 if(eMode == MODE_SETALL) ClearPeak(pSample, FLAG_LINES_BASE); CChartLineSerie* pLine = NULL; for (int i=0; i<=pRT->m_cArrayData.GetUpperBound(); ++i) { pLine = CreateLineSerie(); pLine->SetColor(m_crBaseLines); pLine->m_vPoints.AddPoint(pRT->m_cArrayData[i].m_dataBegin.dX, pRT->m_cArrayData[i].m_dataBegin.dY); pLine->m_vPoints.AddPoint(pRT->m_cArrayData[i].m_dataEnd.dX, pRT->m_cArrayData[i].m_dataEnd.dY); pLine->m_dwDPFlag = NULL;//不能在数据处理的曲线选择列表框中出现 m_arrBaseLines.Add(pLine); } } if(dwFlag & FLAG_LINES_DIVIDEBASE) { CChartLineSerie* pLine = NULL; //首先删除全部,再重新绘画 if(eMode == MODE_SETALL) ClearPeak(pSample, FLAG_LINES_DIVIDEBASE); for (int i=0; i<=pSample->m_arrayVLines.GetUpperBound(); ++i) { const CBase_AnalysisSample::structLine& line = pSample->m_arrayVLines.GetAt(i); pLine = CreateLineSerie(); pLine->SetColor(m_crBaseLines); pLine->m_vPoints.AddPoint(line.begin.x, line.begin.y); pLine->m_vPoints.AddPoint(line.end.x, line.end.y); pLine->m_dwDPFlag = NULL;//不能在数据处理的曲线选择列表框中出现 m_arrDivideBaseLines.Add(pLine); } } if((dwFlag & FLAG_STRINGS_RESERVEDTIME) || (dwFlag & FLAG_STRINGS_CONCENTRATION) || (dwFlag & FLAG_STRINGS_COMPONENTNAME) || (dwFlag & FLAG_STRINGS_FMJ) || (dwFlag & FLAG_STRINGS_FG)) { //不管。首先删除全部,再重新绘画 if(eMode == MODE_SETALL) ClearPeak(pSample, FLAGMASK_STRINGS_ASSISTANT); CString t; int i_upper_bound = pRT->m_cArrayData.GetUpperBound(); for (int i=0; i<=i_upper_bound; ++i) { CString ass; const CPeakStandard& ps = pRT->m_cArrayData[i]; if(dwFlag & FLAG_STRINGS_RESERVEDTIME) ass += CParamCommon::TimeString(ps.m_dReserveTime) + _T("/"); if(dwFlag & FLAG_STRINGS_FMJ) { t.Format(_T("%.3f/"), ps.m_dArea); ass += t; } if(dwFlag & FLAG_STRINGS_FG) { t.Format(_T("%.3f/"), ps.m_dHeight); ass += t; } const CPeakStandard* pPSResult = GetPSByTime(pSample->m_cResultList, ps.m_dReserveTime); if(pPSResult) { if(dwFlag & FLAG_STRINGS_CONCENTRATION) { t.Format(_T("%.1f/"), pPSResult->m_dResultConcentration); ass += t; } if(dwFlag & FLAG_STRINGS_COMPONENTNAME) { ass += pPSResult->m_cStrComponentName; ass += _T('/'); } } while(ass.Right(1) == _T("/")) ass.Delete(ass.GetLength()-1); //ass = _T("-->") + ass; CSuperChartString* pSerie = AddChartString(ps.m_dataTop.dX, ps.m_dataTop.dY, ass); pSerie->SetMustInPlottingRect(true); pSerie->Font.Color = m_crAssistants; pSerie->Font.SetSize(100); pSerie->Font.SetBold(550); pSerie->Font.SetAngle(600); pSerie->SetScreenOffset(-6, -8); pSerie->m_dwChartObjectFlag = CTWenChartObject::CHARTOBJECT_NOTINBZMANAGE; m_arrAssistants.Add(pSerie); } } EnableRefresh(true); if(bRefresh) RefreshCtrl(); }
void CBase_SampleChart::SetColor(DWORD dwFlag, COLORREF color) { EnableRefresh(false); if(dwFlag & FLAG_DATA_SOURCE) { CChartSerie* pSerie = GetMainSerie(); if(pSerie) pSerie->SetColor(color); } // if(dwFlag & FLAG_POINTS_BEGIN) // { // if(m_pBeginPoints) m_pBeginPoints->SetColor(color); // } // if(dwFlag & FLAG_POINTS_PEAK) // { // if(m_pPeakPoints) m_pPeakPoints->SetColor(color); // } // if(dwFlag & FLAG_POINTS_END) // { // if(m_pEndPoints) m_pEndPoints->SetColor(color); // } if(dwFlag & FLAG_LINES_BASE) { m_crBaseLines = color; CChartLineSerie* pLine = NULL; for(int i=0; i<=m_arrBaseLines.GetUpperBound(); i++) { pLine = m_arrBaseLines.GetAt(i); if(pLine) pLine->SetColor(color); } } if(dwFlag & FLAG_LINES_DIVIDEBASE) { m_crDivideBaseLines = color; CChartLineSerie* pLine = NULL; for(int i=0; i<=m_arrDivideBaseLines.GetUpperBound(); i++) { pLine = m_arrDivideBaseLines.GetAt(i); if(pLine) pLine->SetColor(color); } } if(dwFlag & FLAG_LINES_DIVIDEBASE) { m_crDivideBaseLines = color; CChartLineSerie* pLine = NULL; for(int i=0; i<=m_arrDivideBaseLines.GetUpperBound(); i++) { pLine = m_arrDivideBaseLines.GetAt(i); if(pLine) pLine->SetColor(color); } } DWORD dwFMask = dwFlag & FLAGMASK_STRINGS_ASSISTANT; if(dwFMask == FLAGMASK_STRINGS_ASSISTANT) { //同时都更改,才更改 m_crAssistants = color; CSuperChartString* pSerie = NULL; for(int i=0; i<=m_arrAssistants.GetUpperBound(); i++) { pSerie = m_arrAssistants.GetAt(i); if(pSerie) pSerie->Font.Color = m_crAssistants; } }//否则,无效 EnableRefresh(true); RefreshCtrl(); }
zOPER_EXPORT zSHORT OPERATION AEQ_RefreshAEQ_AttrList( zVIEW vSubtask ) { RefreshCtrl( vSubtask, "AttributeList" ); return( 0 ); }