Example #1
0
        public void TestChangeStrToBool01()
        {
            string str = string.Empty;
            bool   b   = TrendViewerHelper.ChangeStrToBool(str);

            str = "Y";
            b   = TrendViewerHelper.ChangeStrToBool(str);
        }
 public void SetFormulaEtyByRow(ref EtyFormula formula, DataRow formulaRow)
 {
     formula.DPLblName    = formulaRow["DATA_PT_LBL_NAME"].ToString();
     formula.DPType       = TrendViewerHelper.convertLineTypeToEnum(formulaRow["DATA_PT_TYPE"].ToString());
     formula.DPColor      = formulaRow["DATA_PT_COLOR"].ToString();
     formula.DPEnabled    = TrendViewerHelper.ChangeStrToBool(formulaRow["DATA_PT_ENABLED"].ToString());
     formula.DPLblEnabled = TrendViewerHelper.ChangeStrToBool(formulaRow["DATA_PT_LBL_ENABLED"].ToString());
     formula.DPEquation   = formulaRow["DATA_PT_EQUATION"].ToString();
 }
        public void InitFormulaData(DataRow formulaRow, List <string> formulaNameList)  // for "Edit"
        {
            m_otherFormulaNames = formulaNameList;

            m_formula.DPLblName    = formulaRow["DATA_PT_LBL_NAME"].ToString();
            m_formula.DPType       = TrendViewerHelper.convertLineTypeToEnum(formulaRow["DATA_PT_TYPE"].ToString());
            m_formula.DPColor      = formulaRow["DATA_PT_COLOR"].ToString();
            m_formula.DPEnabled    = TrendViewerHelper.ChangeStrToBool(formulaRow["DATA_PT_ENABLED"].ToString());
            m_formula.DPLblEnabled = TrendViewerHelper.ChangeStrToBool(formulaRow["DATA_PT_LBL_ENABLED"].ToString());
            m_formula.DPEquation   = formulaRow["DATA_PT_EQUATION"].ToString();
        }
Example #4
0
 /// <summary>
 /// set a datapoint entity by a datarow
 /// </summary>
 /// <param name="dataPoint">the datapoint entity to be set</param>
 /// <param name="dpRow">the datarow</param>
 public void SetDataPointEtyByRow(ref EtyDataPoint dataPoint, DataRow dpRow)
 {
     dataPoint.DPHost       = dpRow["DATA_PT_HOST"].ToString();
     dataPoint.DPName       = dpRow["DATA_PT_NAME"].ToString();
     dataPoint.DPType       = TrendViewerHelper.convertLineTypeToEnum(dpRow["DATA_PT_TYPE"].ToString());
     dataPoint.DPColor      = dpRow["DATA_PT_COLOR"].ToString();
     dataPoint.DPServer     = dpRow["DATA_PT_SERVER"].ToString();
     dataPoint.DPLblName    = dpRow["DATA_PT_LBL_NAME"].ToString();
     dataPoint.DPEnabled    = TrendViewerHelper.ChangeStrToBool(dpRow["DATA_PT_ENABLED"].ToString());
     dataPoint.DPLblEnabled = TrendViewerHelper.ChangeStrToBool(dpRow["DATA_PT_LBL_ENABLED"].ToString());
     dataPoint.DPVisible    = TrendViewerHelper.ChangeStrToBool(dpRow["DATA_PT_VISIBLE"].ToString());
 }
 public void SetHistDataPointEtyByRow(ref EtyHistDataPoint dataPoint, DataRow dpRow)
 {
     dataPoint.DPHost          = dpRow["DATA_PT_HOST"].ToString();
     dataPoint.DPName          = dpRow["DATA_PT_NAME"].ToString();
     dataPoint.DPType          = TrendViewerHelper.convertLineTypeToEnum(dpRow["DATA_PT_TYPE"].ToString());
     dataPoint.DPColor         = dpRow["DATA_PT_COLOR"].ToString();
     dataPoint.DPServer        = dpRow["DATA_PT_SERVER"].ToString();
     dataPoint.DPLblName       = dpRow["DATA_PT_LBL_NAME"].ToString();
     dataPoint.DPEnabled       = TrendViewerHelper.ChangeStrToBool(dpRow["DATA_PT_ENABLED"].ToString());
     dataPoint.DPLblEnabled    = TrendViewerHelper.ChangeStrToBool(dpRow["DATA_PT_LBL_ENABLED"].ToString());
     dataPoint.DPStartDateTime = (DateTime)(dpRow["DATA_PT_DT"]);
     dataPoint.DPEndDateTime   = (DateTime)(dpRow["DATA_PT_DT_END"]);
     dataPoint.EntityKey       = Convert.ToUInt64(dpRow["ENTITYKEY"]);
 }
Example #6
0
        /// <summary>
        /// init the current datapoint for "Edit" function.
        /// </summary>
        /// <param name="dpRow">dataRow of a datapoint detail</param>
        /// <param name="dpNameList">other datapoint name list except the current one in the group</param>
        public void Init(DataRow dpRow, List <string> dpNameList)  // for "Edit"
        {
            m_otherDataPointNames = dpNameList;

            m_originalName = dpRow["DATA_PT_NAME"].ToString();

            m_dp.DPHost       = dpRow["DATA_PT_HOST"].ToString();
            m_dp.DPName       = dpRow["DATA_PT_NAME"].ToString();
            m_dp.DPType       = TrendViewerHelper.convertLineTypeToEnum(dpRow["DATA_PT_TYPE"].ToString());
            m_dp.DPColor      = dpRow["DATA_PT_COLOR"].ToString();
            m_dp.DPServer     = dpRow["DATA_PT_SERVER"].ToString();
            m_dp.DPLblName    = dpRow["DATA_PT_LBL_NAME"].ToString();
            m_dp.DPEnabled    = TrendViewerHelper.ChangeStrToBool(dpRow["DATA_PT_ENABLED"].ToString());
            m_dp.DPLblEnabled = TrendViewerHelper.ChangeStrToBool(dpRow["DATA_PT_LBL_ENABLED"].ToString());
            m_dp.DPVisible    = TrendViewerHelper.ChangeStrToBool(dpRow["DATA_PT_VISIBLE"].ToString());
        }
        public void InitMarkerData(DataRow markerRow, List <string> markerNameList)  // for "Edit"
        {
            m_otherMarkerNames = markerNameList;

            m_marker.MarkerName = markerRow["MARKER_NAME"].ToString();
            if (TrendViewerHelper.isNumeric(markerRow["MARKER_BCOLOR"].ToString(), System.Globalization.NumberStyles.Number))
            {
                m_marker.MarkerBColor = markerRow["MARKER_BCOLOR"].ToString();
            }
            if (TrendViewerHelper.isNumeric(markerRow["MARKER_FCOLOR"].ToString(), System.Globalization.NumberStyles.Number))
            {
                m_marker.MarkerFColor = markerRow["MARKER_FCOLOR"].ToString();
            }
            m_marker.MarkerEnabled = TrendViewerHelper.ChangeStrToBool(markerRow["MARKER_ENABLED"].ToString());

            m_marker.MarkerWidth = Convert.ToDouble(markerRow["MARKER_WIDTH"].ToString());
            m_marker.MarkerValue = Convert.ToDouble(markerRow["MARKER_VALUE"].ToString());
        }
Example #8
0
        public void Init(DataRow dpRow, List <string> dpNameList)  // for "Edit"
        {
            m_otherHistDataPointNames = dpNameList;

            m_originalName = dpRow["DATA_PT_NAME"].ToString();

            m_dp.DPHost          = dpRow["DATA_PT_HOST"].ToString();
            m_dp.DPName          = dpRow["DATA_PT_NAME"].ToString();
            m_dp.DPType          = TrendViewerHelper.convertLineTypeToEnum(dpRow["DATA_PT_TYPE"].ToString());
            m_dp.DPColor         = dpRow["DATA_PT_COLOR"].ToString();
            m_dp.DPServer        = dpRow["DATA_PT_SERVER"].ToString();
            m_dp.DPLblName       = dpRow["DATA_PT_LBL_NAME"].ToString();
            m_dp.DPEnabled       = TrendViewerHelper.ChangeStrToBool(dpRow["DATA_PT_ENABLED"].ToString());
            m_dp.DPLblEnabled    = TrendViewerHelper.ChangeStrToBool(dpRow["DATA_PT_LBL_ENABLED"].ToString());
            m_dp.DPStartDateTime = (DateTime)(dpRow["DATA_PT_DT"]);
            m_dp.DPEndDateTime   = (DateTime)(dpRow["DATA_PT_DT_END"]);
            m_dp.EntityKey       = Convert.ToUInt64(dpRow["ENTITYKEY"]);
            //m_dp. = TrendingHelper.ChangeStrToBool(dpRow["DATA_PT_VISIBLE"].ToString());
        }