//use SelectJumpTypes object. Since 1.6.3 public static List <object> SelectJumpRjTypesNew(string allJumpsName, bool onlyName) { Sqlite.Open(); dbcmd.CommandText = "SELECT * " + " FROM " + Constants.JumpRjTypeTable + " " + " ORDER BY uniqueID"; LogB.SQL(dbcmd.CommandText.ToString()); dbcmd.ExecuteNonQuery(); SqliteDataReader reader; reader = dbcmd.ExecuteReader(); List <object> types = new List <object>(); SelectJumpRjTypes type; if (allJumpsName != "") { type = new SelectJumpRjTypes(allJumpsName); types.Add(type); } while (reader.Read()) { if (onlyName) { type = new SelectJumpRjTypes(reader[1].ToString()); } else { type = new SelectJumpRjTypes( Convert.ToInt32(reader[0]), //uniqueID reader[1].ToString(), //nameEnglish Util.IntToBool(Convert.ToInt32(reader[2].ToString())), //startIn Util.IntToBool(Convert.ToInt32(reader[3].ToString())), //hasWeight Util.IntToBool(Convert.ToInt32(reader[4].ToString())), //jumpsLimited Convert.ToDouble(Util.ChangeDecimalSeparator(reader[5].ToString())), //fixedValue reader[6].ToString() //description ); } types.Add(type); } reader.Close(); Sqlite.Close(); return(types); }
//use SelectJumpTypes object. Since 1.6.3 public static List<object> SelectJumpRjTypesNew(string allJumpsName, bool onlyName) { Sqlite.Open(); dbcmd.CommandText = "SELECT * " + " FROM " + Constants.JumpRjTypeTable + " " + " ORDER BY uniqueID"; LogB.SQL(dbcmd.CommandText.ToString()); dbcmd.ExecuteNonQuery(); SqliteDataReader reader; reader = dbcmd.ExecuteReader(); List<object> types = new List<object>(); SelectJumpRjTypes type; if(allJumpsName != "") { type = new SelectJumpRjTypes(allJumpsName); types.Add(type); } while(reader.Read()) { if(onlyName) { type = new SelectJumpRjTypes(reader[1].ToString()); } else { type = new SelectJumpRjTypes( Convert.ToInt32(reader[0]), //uniqueID reader[1].ToString(), //nameEnglish Util.IntToBool(Convert.ToInt32(reader[2].ToString())), //startIn Util.IntToBool(Convert.ToInt32(reader[3].ToString())), //hasWeight Util.IntToBool(Convert.ToInt32(reader[4].ToString())), //jumpsLimited Convert.ToDouble(Util.ChangeDecimalSeparator(reader[5].ToString())), //fixedValue reader[6].ToString() //description ); } types.Add(type); } reader.Close(); Sqlite.Close(); return types; }