示例#1
0
 private void GetAnswerCard(ObservableCollection<Card> randomCards)
 {
     var rnd = new Random();
     int index = rnd.Next(0, totalquestion-1);
     if (answerCard == null)
         answerCard = randomCards[index];
     else
     {
         randomCards.Remove(answerCard);
         var temp = randomCards.OrderBy(x => Guid.NewGuid()).ToArray();
         answerCard = temp[0];
     }
     aCard.Clear();
     aCard.Add(answerCard.Clone());
     aCard[0].DisplayImage = aCard[0].FrontImage;
 }
示例#2
0
 public Card Clone()
 {
     Card c = new Card(this.UniqueId,this._imagePath1, this._imagePath2, this.Group);
     return c;
 }