public ExamenResueltoViewModel() { preguntasExamen = bd_preguntasRespuestas.getExamenCorregido(); if (preguntasExamen.Count != 0) { posicion = 0; PreguntaMostrada = preguntasExamen[0]; NumeroPregunta = 1 + "/" + preguntasExamen.Count; } }
public void anteriorPregunta() { if (posicion > 0) { posicion--; PreguntaMostrada = preguntasExamen[posicion]; this.OnPropertyChanged("ColorBoton1"); this.OnPropertyChanged("ColorBoton2"); this.OnPropertyChanged("ColorBoton3"); this.OnPropertyChanged("ColorBoton4"); this.OnPropertyChanged("ColorBoton5"); this.OnPropertyChanged("VisibilidadBoton3"); this.OnPropertyChanged("VisibilidadBoton4"); this.OnPropertyChanged("VisibilidadBoton5"); NumeroPregunta = (posicion + 1) + "/" + preguntasExamen.Count; } }
public void siguientePregunta() { if (posicion < preguntasExamen.Count - 1 && posicion != -1) { posicion++; PreguntaMostrada = preguntasExamen[posicion]; this.OnPropertyChanged("ColorBoton1"); this.OnPropertyChanged("ColorBoton2"); this.OnPropertyChanged("ColorBoton3"); this.OnPropertyChanged("ColorBoton4"); this.OnPropertyChanged("ColorBoton5"); this.OnPropertyChanged("VisibilidadBoton3"); this.OnPropertyChanged("VisibilidadBoton4"); this.OnPropertyChanged("VisibilidadBoton5"); NumeroPregunta = (posicion + 1) + "/" + preguntasExamen.Count; } }
public void insert(PreguntaRespondida asignatura) { dbConn.InsertOrReplace(asignatura); }