示例#1
0
        private void setFlashcard(Card newCard, int index)
        {
            stopAllSounds();

            _currentCard = new CreatorCard(this, newCard, index);

            if (newCard.cardID == -1)
            {
                // If card is new, then fill its objects with the
                // objects currently on the canvas
                currentCard.loadObjects(tabSides);
                changed = true;
            }
            else
            {
                // If card is not new, then load its objects onto the canvas
                loadObjects(currentCard.objects);
                changed = false;

                if (newCard.cardID == NEW_TEMPLATE_CARD)
                {
                    newCard.cardID     = -1;
                    currentCard.cardID = -1;
                    changed            = true;
                }
            }

            setSide(0);

            updateButtonStates();
            updateCurCard();

            promptAtTemplateChange = true;
            templateChanged        = false;
        }
示例#2
0
        private void setFlashcard(Card newCard, int index)
        {
            stopAllSounds();

            _currentCard = new CreatorCard(this, newCard, index);

            if (newCard.cardID == -1)
            {
                // If card is new, then fill its objects with the
                // objects currently on the canvas
                currentCard.loadObjects(tabSides);
                changed = true;
            }
            else
            {
                // If card is not new, then load its objects onto the canvas
                loadObjects(currentCard.objects);
                changed = false;

                if (newCard.cardID == NEW_TEMPLATE_CARD)
                {
                    newCard.cardID = -1;
                    currentCard.cardID = -1;
                    changed = true;
                }
            }

            setSide(0);

            updateButtonStates();
            updateCurCard();

            promptAtTemplateChange = true;
            templateChanged = false;
        }