예제 #1
0
        public void TestconvertLineTypeToDispLan01()
        {
            LineType lineType = LineType.Line;
            string   str      = TrendViewerHelper.convertLineTypeToDispLan(lineType);

            lineType = LineType.Spline;
            str      = TrendViewerHelper.convertLineTypeToDispLan(lineType);
        }
예제 #2
0
 /// <summary>
 /// set datapoint row by a given datapoint entity
 /// </summary>
 /// <param name="dpRow">the datarow to be set</param>
 /// <param name="dataPoint">the datapoint entiy</param>
 private void setDataPointRowByEty(ref DataRow dpRow, EtyDataPoint dataPoint)
 {
     dpRow["DATA_PT_HOST"]        = dataPoint.DPHost;
     dpRow["DATA_PT_NAME"]        = dataPoint.DPName;
     dpRow["DATA_PT_TYPE"]        = TrendViewerHelper.convertLineTypeToDispLan(dataPoint.DPType);
     dpRow["DATA_PT_COLOR"]       = dataPoint.DPColor;
     dpRow["DATA_PT_SERVER"]      = dataPoint.DPServer;
     dpRow["DATA_PT_LBL_NAME"]    = dataPoint.DPLblName;
     dpRow["DATA_PT_ENABLED"]     = TrendViewerHelper.ChangeBoolToStr(dataPoint.DPEnabled);
     dpRow["DATA_PT_LBL_ENABLED"] = TrendViewerHelper.ChangeBoolToStr(dataPoint.DPLblEnabled);
     dpRow["DATA_PT_VISIBLE"]     = TrendViewerHelper.ChangeBoolToStr(dataPoint.DPVisible);
 }
        public void AddFormulaToList(EtyFormula formula)
        {
            DataRow formulaRow = m_FormulaTable.NewRow();

            formulaRow["DATA_PT_LBL_NAME"]    = formula.DPLblName;
            formulaRow["DATA_PT_TYPE"]        = TrendViewerHelper.convertLineTypeToDispLan(formula.DPType);
            formulaRow["DATA_PT_COLOR"]       = formula.DPColor;
            formulaRow["DATA_PT_ENABLED"]     = TrendViewerHelper.ChangeBoolToStr(formula.DPEnabled);
            formulaRow["DATA_PT_LBL_ENABLED"] = TrendViewerHelper.ChangeBoolToStr(formula.DPLblEnabled);
            formulaRow["DATA_PT_EQUATION"]    = formula.DPEquation;
            m_FormulaTable.Rows.Add(formulaRow);
            m_View.PopulateDataPointListDataGridView(1);
        }
예제 #4
0
        public void TestconvertLineTypeToDispLan02()
        {
            LineType lineType = LineType.Spline;
            string   str      = TrendViewerHelper.convertLineTypeToDispLan(lineType);

            #region Record State
            ValueRecorder recorder = new ValueRecorder();
            recorder.Record(str);
            recorder.FinishRecording();
            #endregion
            #region Assertions
            Assert.AreEqual("Spline", str);
            #endregion
        }
 private void SetHistDataPointRowByEty(ref DataRow dpRow, EtyHistDataPoint dataPoint)
 {
     dpRow["DATA_PT_NAME"]        = dataPoint.DPName;
     dpRow["DATA_PT_TYPE"]        = TrendViewerHelper.convertLineTypeToDispLan(dataPoint.DPType);
     dpRow["DATA_PT_COLOR"]       = dataPoint.DPColor;
     dpRow["DATA_PT_SERVER"]      = dataPoint.DPServer;
     dpRow["DATA_PT_ENABLED"]     = TrendViewerHelper.ChangeBoolToStr(dataPoint.DPEnabled);
     dpRow["DATA_PT_LBL_ENABLED"] = TrendViewerHelper.ChangeBoolToStr(dataPoint.DPLblEnabled);
     dpRow["DATA_PT_LBL_NAME"]    = dataPoint.DPLblName;
     dpRow["DATA_PT_DT"]          = dataPoint.DPStartDateTime;
     dpRow["DATA_PT_HOST"]        = dataPoint.DPHost;
     dpRow["DATA_PT_DT_END"]      = dataPoint.DPEndDateTime;
     dpRow["ENTITYKEY"]           = dataPoint.EntityKey;
 }