Ejemplo n.º 1
0
        private void TurnOverField(int itemId, bool showSolution)
        {
            var field = UsedFieldItems.First(i => i.Id == itemId);

            if (showSolution)
            {
                field.CurrentDisplayPath = field.PicturePath;
            }
        }
Ejemplo n.º 2
0
        private void TurnOverField(int itemId, bool showSolution)
        {
            if (itemId == -1)
            {
                return;
            }

            var field = UsedFieldItems.First(i => i.Id == itemId);

            if (showSolution)
            {
                field.CurrentDisplayPath = field.PicturePath;
            }
            else
            {
                field.CurrentDisplayPath = this.Content.CoverPath;
            }
        }
Ejemplo n.º 3
0
        private void InitGame()
        {
            try
            {
                this.AllFieldItems = this.LoadFieldItems();
                this.FieldPairs    = this.LoadFieldPairs();

                this.UsedFieldItems = new List <FieldItem>();
                foreach (var pair in this.FieldPairs)
                {
                    this.UsedFieldItems.Add(pair.FieldA);
                    this.UsedFieldItems.Add(pair.FieldB);
                }
                UsedFieldItems.Shuffle();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.StackTrace);
            }
        }