public string GetErrorInformation(string Address, int Point) { try { //40ac string Index = Convert.ToString(Convert.ToInt32(Point), 16); //for (int i = 0; i < Index.Length; i++) //{ // string d= Convert.ToString(Index[i], 2); //} ErrorInformation Err = ErrorInfo.Single(u => u.Location == Address && u.Point == PointInfo[Point].ToString()); return(Err.Info); } catch (Exception err) { return(err.Message); } }
public void ErrorReset() { using (connection = new SQLiteConnection()) { string SqlCommand = "SELECT * FROM `ErrorInfo`;"; // 建立SQLiteDataReader物件 using (SQLiteDataReader reader = ExecuteReader(SqlCommand)) { while (reader.Read()) { ErrorInformation _group = new ErrorInformation { Location = reader["Address"].ToString(), Point = reader["Point"].ToString(), Info = reader["Information"].ToString(), }; ErrorInfo.Add(_group); } } } }