public void TestisNumeric01() { string val = string.Empty; NumberStyles numberStyle = NumberStyles.AllowTrailingSign; bool b = TrendViewerHelper.isNumeric(val, numberStyle); #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record(b); recorder.FinishRecording(); #endregion #region Assertions Assert.IsFalse(b); #endregion }
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()); }