Exemplo n.º 1
0
        private void UpdateCardDetails(MabelCard card)
        {
            if (tbStatusBar.InvokeRequired == false)
            {
                if (card != null)
                {
                    Image frontImage = card.GetCardFrontImage();
                    Image backImage  = card.GetCardBackImage();
                    if (Properties.Settings.Default.Orientation.Equals("Portrait"))
                    {
                        frontImage.RotateFlip(RotateFlipType.Rotate90FlipNone);
                        backImage.RotateFlip(RotateFlipType.Rotate270FlipNone);
                    }
                    pbCardFront.Image = frontImage;
                    pbCardBack.Image  = backImage;

                    tbMemberId.Text = card.member_id;
                    tbMagId.Text    = card.mag_token;
                    tbCardId.Text   = card.card_id.ToString();
                }
            }
            else
            {
                UpdateCardDetailsDelegate updateCard = new UpdateCardDetailsDelegate(UpdateCardDetails);
                this.BeginInvoke(updateCard, new object[] { card });
            }
        }
Exemplo n.º 2
0
        private void UpdateCardDetails(MabelCard card)
        {
            if (tbStatusBar.InvokeRequired == false)
            {
                if (card != null)
                {
                    Image frontImage = card.GetCardFrontImage();
                    Image backImage = card.GetCardBackImage();
                    if (Properties.Settings.Default.Orientation.Equals("Portrait"))
                    {
                        frontImage.RotateFlip(RotateFlipType.Rotate90FlipNone);
                        backImage.RotateFlip(RotateFlipType.Rotate270FlipNone);
                    }
                    pbCardFront.Image = frontImage;
                    pbCardBack.Image = backImage;

                    tbMemberId.Text = card.member_id;
                    tbMagId.Text = card.mag_token;
                    tbCardId.Text = card.card_id.ToString();
                }
            }
            else
            {
                UpdateCardDetailsDelegate updateCard = new UpdateCardDetailsDelegate(UpdateCardDetails);
                this.BeginInvoke(updateCard, new object[] { card });
            }
        }