Ejemplo n.º 1
0
        public Category(string name, string id, Theme theme, List<Quiz> quizzes, bool solved) {
			this.name = name;
			this.id = id;
			this.theme = theme;
			this.quizzes = quizzes;
			scores = new int[quizzes.Count];
			this.solved = solved;
		}
Ejemplo n.º 2
0
		public Category (string name, string id, Theme theme, List<Quiz> quizzes, bool solved)
		{
			Name = name;
			Id = id;
			Theme = theme;
			Quizzes = quizzes;
			Scores = new int[quizzes.Count];
			Solved = solved;
		}
Ejemplo n.º 3
0
		public Category (string name, string id, Theme theme, List<Quiz> quizzes, int[] scores, bool solved)
		{
			Name = name;
			Id = id;
			Theme = theme;

			if (quizzes.Count == scores.Length) {
				Quizzes = quizzes;
				Scores = scores;
			} else {
				throw new InvalidOperationException ("Quizzes and scores must have the same length");
			}

			Solved = solved;
		}
Ejemplo n.º 4
0
		protected Category(Parcel inObj) {
			name = inObj.ReadString();
			id = inObj.ReadString();
			theme = (Theme)(System.Enum.GetValues(typeof(Theme)).GetValue(inObj.ReadInt()));
			quizzes = new List<Quiz>();
			inObj.ReadTypedList(quizzes, Quiz.InitializeCreator());
			scores = inObj.CreateIntArray();
			solved = ParcelableHelper.ReadBoolean(inObj);
		}