Exemple #1
0
        public void Rotate()
        {
            FlashCard first = cards.First();

            cards.Remove(first);
            cards.Add(first);
        }
        private void update()
        {
            score.Text = "Memory  Score: " + Math.Round(grade, 2);
            left++;
            num.Text             = left.ToString() + " / " + copy.getCards().Count().ToString();
            correctLbl.Text      = "";
            card.BackgroundColor = Color.DarkTurquoise;
            entry.Text           = "";
            nextBtn.IsVisible    = false;
            fixBtn.IsVisible     = false;
            wrongBtn.IsVisible   = false;
            enterBtn.IsVisible   = true;

            if (set.getCards().Count > 0)
            {
                current = set.getCards().First();
                string output = "";
                foreach (String point in current.getPoints())
                {
                    output += point + "\n";
                }
                card.Text = output;
                if (audioOn == true)
                {
                    CrossTextToSpeech.Dispose();
                    var text = card.Text;
                    CrossTextToSpeech.Current.Speak(text);
                }
            }
        }
 public MultipleChoice(String theQuestion, String theA, String theB, String theC, String theCorrect, FlashCard theCard)
 {
     question = theQuestion;
     ansA     = theA;
     ansB     = theB;
     ansC     = theC;
     correct  = theCorrect;
     card     = theCard;
 }
        public MultipleChoice()
        {
            //default
            question = "1 + 1 =";
            correct  = "2";
            ansA     = "3";
            ansB     = "10";
            ansC     = "1";
            List <String> points = new List <string>();

            points.Add(correct);
            card = new FlashCard(question, points);
        }
Exemple #5
0
        public void Shuffle()
        {
            Random random = new Random();
            int    num    = cards.Count;

            for (int i = num - 1; i > 1; i--)
            {
                int rnd = random.Next(i + 1);

                FlashCard value = cards[rnd];
                cards[rnd] = cards[i];
                cards[i]   = value;
            }
        }
        private void start()
        {
            copy.setSet("Memory");
            UP                   = MAX / set.getCards().Count();
            DOWN                 = UP / 5;
            grade                = 0;
            score                = this.FindByName <Label>("title");
            num                  = this.FindByName <Label>("page");
            card                 = this.FindByName <Button>("cardFace");
            entry                = this.FindByName <Entry>("answer");
            enterBtn             = this.FindByName <Button>("try");
            nextBtn              = this.FindByName <Button>("next");
            fixBtn               = this.FindByName <Button>("fix");
            wrongBtn             = this.FindByName <Button>("wrong");
            correctLbl           = this.FindByName <Label>("correct");
            recordBtn            = this.FindByName <Button>("record");
            card.BackgroundColor = Color.DarkTurquoise;
            //entry.BackgroundColor = Color.White;
            fixBtn.IsVisible   = false; //hide
            wrongBtn.IsVisible = false; //hide
            nextBtn.IsVisible  = false; //hide

            left     = 1;
            num.Text = left.ToString() + " / " + copy.getCards().Count().ToString();
            current  = set.getCards().First();
            string output = "";
            int    i      = 0;

            foreach (String point in current.getPoints())
            {
                i++;
                output += i.ToString() + ") " + point + "\n";
            }
            card.Text = output;
            if (audioOn == true)
            {
                CrossTextToSpeech.Dispose();
                var text = card.Text;
                CrossTextToSpeech.Current.Speak(text);
            }
        }
Exemple #7
0
        private void createCards()
        {
            FlashCard     card1, card2, card3, card4;
            List <String> list1, list2, list3, list4;
            String        topic1, topic2, topic3, topic4;

            //create cards
            list1  = new List <string>();
            topic1 = "4 Basic Activities in Interaction Design";
            list1.Add("establishing requirements");
            list1.Add("designing alternatives");
            list1.Add("prototyping");
            list1.Add("evaluating");
            card1 = new FlashCard(topic1, list1);

            list2  = new List <string>();
            topic2 = "User Experience";
            list2.Add("how a product behaves and is used in the real world");
            card2 = new FlashCard(topic2, list2);

            list3  = new List <string>();
            topic3 = "Low Fidelity Prototype";
            list3.Add("uses a medium to interpret the design");
            list3.Add("ie: paper model");
            card3 = new FlashCard(topic3, list3);

            list4  = new List <string>();
            topic4 = "Internal Consistancy";
            list4.Add("design operations behave the same within an application");
            card4 = new FlashCard(topic4, list4);

            //add demo cards to set
            cards.Add(card1);
            cards.Add(card2);
            cards.Add(card3);
            cards.Add(card4);
        }
 public void setCard(FlashCard theCard)
 {
     card = theCard;
 }
Exemple #9
0
 public bool equals(FlashCard Object)
 {
     return(Object.topic.Equals(topic) && (Object.points.Equals(points)));
 }
Exemple #10
0
 public FlashCard(FlashCard Object)
 {
     topic  = Object.topic;
     points = Object.points;
 }