public void init(CardTypes.CardDefinition def, CardClickPlayDelegate callback)
 {
     this.m_callback = callback;
     base.clearControls();
     this.background.Size     = base.Size;
     this.background.Position = new Point(0, 0);
     base.addControl(this.background);
     this.background.Create((Image)GFXLibrary.cardpanel_grey_9slice_left_top, (Image)GFXLibrary.cardpanel_grey_9slice_middle_top, (Image)GFXLibrary.cardpanel_grey_9slice_right_top, (Image)GFXLibrary.cardpanel_grey_9slice_left_middle, (Image)GFXLibrary.cardpanel_grey_9slice_middle_middle, (Image)GFXLibrary.cardpanel_grey_9slice_right_middle, (Image)GFXLibrary.cardpanel_grey_9slice_left_bottom, (Image)GFXLibrary.cardpanel_grey_9slice_middle_bottom, (Image)GFXLibrary.cardpanel_grey_9slice_right_bottom);
     this.topLeftImage.Image    = (Image)GFXLibrary.cardpanel_grey_9slice_gradation_top_left;
     this.topLeftImage.Position = new Point(0, 0);
     this.background.addControl(this.topLeftImage);
     this.bottomRightImage.Image    = (Image)GFXLibrary.cardpanel_grey_9slice_gradation_bottom;
     this.bottomRightImage.Position = new Point(this.background.Width - this.bottomRightImage.Image.Width, this.background.Height - this.bottomRightImage.Image.Height);
     this.background.addControl(this.bottomRightImage);
     CustomSelfDrawPanel.UICard control = BuyCardsPanel.makeUICard(def, RemoteServices.Instance.UserID, 0x2710);
     GFXLibrary.Instance.closeBigCardsLoader();
     control.Position = new Point(0x75, 50);
     this.background.addControl(control);
     this.confirmLabel.Text      = SK.Text("ConfirmPlayCardPanel_Are_You_Sure", "Are you sure you want to play this card?");
     this.confirmLabel.Color     = ARGBColors.Black;
     this.confirmLabel.Position  = new Point(0, 10);
     this.confirmLabel.Font      = FontManager.GetFont("Arial", 14f, FontStyle.Regular);
     this.confirmLabel.Size      = new Size(this.background.Width, 50);
     this.confirmLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER;
     this.background.addControl(this.confirmLabel);
     this.confirmButton.Text.Text   = SK.Text("ConfirmPlayCardPanel_Play_Card", "Play Card");
     this.confirmButton.TextYOffset = -2;
     this.confirmButton.Text.Color  = ARGBColors.Black;
     this.confirmButton.Text.Font   = FontManager.GetFont("Arial", 12f, FontStyle.Bold);
     this.confirmButton.ImageNorm   = (Image)GFXLibrary.cardpanel_button_blue_normal;
     this.confirmButton.ImageOver   = (Image)GFXLibrary.cardpanel_button_blue_over;
     this.confirmButton.ImageClick  = (Image)GFXLibrary.cardpanel_button_blue_pressed;
     this.confirmButton.Position    = new Point(230, 310);
     this.confirmButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.playCard), "ConfirmPlayCardPanel_confirm_play_card");
     this.background.addControl(this.confirmButton);
     this.cancelButton.Text.Text   = SK.Text("GENERIC_Cancel", "Cancel");
     this.cancelButton.TextYOffset = -2;
     this.cancelButton.Text.Color  = ARGBColors.Black;
     this.cancelButton.Text.Font   = FontManager.GetFont("Arial", 12f, FontStyle.Bold);
     this.cancelButton.ImageNorm   = (Image)GFXLibrary.cardpanel_button_blue_normal;
     this.cancelButton.ImageOver   = (Image)GFXLibrary.cardpanel_button_blue_over;
     this.cancelButton.ImageClick  = (Image)GFXLibrary.cardpanel_button_blue_pressed;
     this.cancelButton.Position    = new Point(30, 310);
     this.cancelButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.closeClick), "ConfirmPlayCardPanel_cancel");
     this.background.addControl(this.cancelButton);
     this.confirmCheck.CheckedImage     = (Image)GFXLibrary.reports_checkbox_checked;
     this.confirmCheck.UncheckedImage   = (Image)GFXLibrary.reports_checkbox_empty;
     this.confirmCheck.Position         = new Point(20, 360);
     this.confirmCheck.Checked          = true;
     this.confirmCheck.CBLabel.Text     = SK.Text("ConfirmPlayCardPanel_Always", "Always confirm playing cards?");
     this.confirmCheck.CBLabel.Color    = ARGBColors.Black;
     this.confirmCheck.CBLabel.Position = new Point(20, -1);
     this.confirmCheck.CBLabel.Size     = new Size(360, 0x23);
     this.confirmCheck.CBLabel.Font     = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.background.addControl(this.confirmCheck);
 }
Пример #2
0
        public static CustomSelfDrawPanel.UICard makeUICard(CardTypes.CardDefinition def, int userid, int playerRank)
        {
            Color red;
            CustomSelfDrawPanel.UICard card = new CustomSelfDrawPanel.UICard {
                UserID = userid
            };
            card.UserIDList.Add(userid);
            card.Definition = def;
            switch (card.Definition.cardColour)
            {
                case 1:
                    card.bigFrame = GFXLibrary.BlueCardOverlayBig;
                    card.bigFrameOver = GFXLibrary.BlueCardOverlayBigOver;
                    break;

                case 2:
                    card.bigFrame = GFXLibrary.GreenCardOverlayBig;
                    card.bigFrameOver = GFXLibrary.GreenCardOverlayBigOver;
                    break;

                case 3:
                    card.bigFrame = GFXLibrary.PurpleCardOverlayBig;
                    card.bigFrameOver = GFXLibrary.PurpleCardOverlayBigOver;
                    break;

                case 4:
                    card.bigFrame = GFXLibrary.RedCardOverlayBig;
                    card.bigFrameOver = GFXLibrary.RedCardOverlayBigOver;
                    break;

                case 5:
                    card.bigFrame = GFXLibrary.YellowCardOverlayBig;
                    card.bigFrameOver = GFXLibrary.YellowCardOverlayBigOver;
                    break;
            }
            card.bigImage = GFXLibrary.Instance.getCardImageBig(card.Definition.id);
            card.Size = card.bigFrame.Size;
            card.CustomTooltipID = 0x2775;
            card.CustomTooltipData = card.Definition.id;
            card.bigGradeImage = new CustomSelfDrawPanel.CSDImage();
            int num = CardTypes.getGrade(card.Definition.cardGrade);
            switch (num)
            {
                case 0x10000:
                    card.bigGradeImage.Image = (Image) GFXLibrary.CardGradeBronze;
                    card.bigGradeImage.Position = new Point(card.Width - card.bigGradeImage.Width, 0);
                    break;

                case 0x20000:
                    card.bigGradeImage.Image = (Image) GFXLibrary.CardGradeSilver;
                    card.bigGradeImage.Position = new Point(card.Width - card.bigGradeImage.Width, 0);
                    break;

                case 0x40000:
                    card.bigGradeImage.Image = (Image) GFXLibrary.card_gold_anim[0];
                    card.bigGradeImage.Position = new Point((card.Width - card.bigGradeImage.Width) - 3, 0);
                    break;

                case 0x200000:
                    card.bigGradeImage.Image = (Image) GFXLibrary.card_diamond3_anim[0];
                    card.bigGradeImage.Position = new Point((card.Width - card.bigGradeImage.Width) - 3, -10);
                    break;

                case 0x400000:
                    card.bigGradeImage.Image = (Image) GFXLibrary.card_sapphire_anim[0];
                    card.bigGradeImage.Position = new Point((card.Width - card.bigGradeImage.Width) - 3, -12);
                    break;

                case 0x80000:
                    card.bigGradeImage.Image = (Image) GFXLibrary.card_diamond_anim[0];
                    card.bigGradeImage.Position = new Point((card.Width - card.bigGradeImage.Width) - 3, -2);
                    break;

                case 0x100000:
                    card.bigGradeImage.Image = (Image) GFXLibrary.card_diamond2_anim[0];
                    card.bigGradeImage.Position = new Point((card.Width - card.bigGradeImage.Width) - 3, -7);
                    break;

                default:
                    card.bigGradeImage.Image = (Image) GFXLibrary.CardGradeBronze;
                    card.bigGradeImage.Position = new Point(card.Width - card.bigGradeImage.Width, 0);
                    break;
            }
            card.bigBaseImage = new CustomSelfDrawPanel.CSDImage();
            card.bigBaseImage.Position = new Point(10, 11);
            card.bigBaseImage.Size = card.bigImage.Size;
            card.bigBaseImage.Image = (Image) card.bigImage;
            card.addControl(card.bigBaseImage);
            card.bigFrameImage = new CustomSelfDrawPanel.CSDImage();
            card.bigFrameImage.Position = new Point(0, 0);
            card.bigFrameImage.Size = card.bigFrame.Size;
            card.bigFrameImage.Image = (Image) card.bigFrame;
            card.addControl(card.bigFrameImage);
            switch (num)
            {
                case 0x40000:
                    card.bigFrameExtraImage = new CustomSelfDrawPanel.CSDImage();
                    card.bigFrameExtraImage.Position = new Point(0, 0);
                    card.bigFrameExtraImage.Image = (Image) GFXLibrary.card_frame_overlay_gold;
                    card.addControl(card.bigFrameExtraImage);
                    break;

                case 0x80000:
                case 0x100000:
                case 0x200000:
                    card.bigFrameExtraImage = new CustomSelfDrawPanel.CSDImage();
                    card.bigFrameExtraImage.Position = new Point(0, 0);
                    card.bigFrameExtraImage.Image = (Image) GFXLibrary.card_frame_overlay_diamond;
                    card.addControl(card.bigFrameExtraImage);
                    break;

                case 0x400000:
                    card.bigFrameExtraImage = new CustomSelfDrawPanel.CSDImage();
                    card.bigFrameExtraImage.Position = new Point(0, 0);
                    card.bigFrameExtraImage.Image = (Image) GFXLibrary.card_frame_overlay_sapphire;
                    card.addControl(card.bigFrameExtraImage);
                    break;
            }
            card.bigGradeImage.Size = card.bigGradeImage.Image.Size;
            card.addControl(card.bigGradeImage);
            card.bigTitle = new CustomSelfDrawPanel.CSDLabel();
            card.bigTitle.Text = CardTypes.getDescriptionFromCard(card.Definition.id);
            card.bigTitle.Size = new Size(110, 0x30);
            card.bigTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
            if (((((card.Definition.id == 0x709) || (card.Definition.id == 0x606)) || ((card.Definition.id == 0xc41) || (card.Definition.id == 0x50a))) || ((card.Definition.id == 0x605) || (card.Definition.id == 0x607))) && (Program.mySettings.LanguageIdent == "de"))
            {
                card.bigTitle.Font = FontManager.GetFont("Arial", 8f, FontStyle.Bold);
            }
            else
            {
                card.bigTitle.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold);
            }
            card.bigTitle.Color = ARGBColors.White;
            card.bigTitle.DropShadowColor = ARGBColors.Black;
            card.bigTitle.Position = new Point(0x26, 12);
            card.addControl(card.bigTitle);
            card.bigEffect = new CustomSelfDrawPanel.CSDLabel();
            card.bigEffect.Text = card.Definition.EffectText;
            card.bigEffect.Size = new Size(150, 0x40);
            card.bigEffect.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
            card.bigEffect.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold);
            if ((Program.mySettings.LanguageIdent == "de") && CardTypes.isGermanSmallDesc(card.Definition.id))
            {
                card.bigEffect.Font = FontManager.GetFont("Arial", 8f, FontStyle.Bold);
            }
            card.bigEffect.Color = ARGBColors.White;
            card.bigEffect.DropShadowColor = ARGBColors.Black;
            card.bigEffect.Position = new Point(14, 0xae);
            card.addControl(card.bigEffect);
            CustomSelfDrawPanel.CSDLabel control = new CustomSelfDrawPanel.CSDLabel {
                Position = new Point(2, 2),
                Size = new Size(card.Width, card.Height),
                Text = "",
                Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT,
                Font = FontManager.GetFont("Arial", 18f, FontStyle.Bold),
                Color = ARGBColors.Yellow,
                DropShadowColor = ARGBColors.Black
            };
            card.addControl(control);
            card.countLabel = control;
            if (playerRank < card.Definition.cardRank)
            {
                red = ARGBColors.Red;
            }
            else
            {
                red = ARGBColors.White;
            }
            CustomSelfDrawPanel.CSDLabel label2 = new CustomSelfDrawPanel.CSDLabel {
                Position = new Point(150, 220),
                Size = new Size(20, 13),
                Text = card.Definition.cardRank.ToString(),
                Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER,
                Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold),
                Color = red,
                DropShadowColor = ARGBColors.Black
            };
            card.addControl(label2);
            card.rankLabel = label2;
            if (playerRank < card.Definition.cardRank)
            {
                card.Hilight(ARGBColors.Gray);
            }
            else
            {
                card.Hilight(ARGBColors.White);
            }
            card.ScaleAll(0.95);
            return card;
        }
Пример #3
0
 private void doCardClickPlay(bool fromClick, bool fromValidate)
 {
     if (!this.waitingResponse && ((base.ClickedControl.GetType() == typeof(CustomSelfDrawPanel.UICard)) || !fromClick))
     {
         CustomSelfDrawPanel.UICard clickedControl = null;
         if (fromClick)
         {
             clickedControl = (CustomSelfDrawPanel.UICard) base.ClickedControl;
         }
         else
         {
             clickedControl = this.lastRequestCard;
         }
         this.lastRequestCard = clickedControl;
         this.waitingResponse = true;
         XmlRpcCardsProvider provider = XmlRpcCardsProvider.CreateForEndpoint(URLs.ProfileProtocol, URLs.ProfileServerAddressCards, URLs.ProfileServerPort, URLs.ProfileCardPath);
         this.selectedVillage = -1;
         int villageID = InterfaceMgr.Instance.getSelectedMenuVillage();
         if (!GameEngine.Instance.World.isCapital(villageID))
         {
             this.selectedVillage = villageID;
         }
         int num2 = GameEngine.Instance.World.getRank() + 1;
         if (this.lastRequestCard.Definition.cardRank > num2)
         {
             MyMessageBox.Show(SK.Text("BuyCardsPanel_Rank_Too_low", "Your rank is too low to play this card.") + Environment.NewLine + SK.Text("BuyCardsPanel_Current_Rank", "Current Rank") + " : " + num2.ToString() + Environment.NewLine + SK.Text("BuyCardsPanel_Required_Rank", "Required Rank") + " : " + this.lastRequestCard.Definition.cardRank.ToString(), SK.Text("BuyCardsPanel_Cannot_Play_Cards", "Could not play card."));
             this.waitingResponse = false;
         }
         else if ((((this.lastRequestCard.Definition.id == 0xc25) || (this.lastRequestCard.Definition.id == 0xc26)) || ((this.lastRequestCard.Definition.id == 0xc27) || (this.lastRequestCard.Definition.id == 0xc28))) && ((GameEngine.Instance.Village != null) && (GameEngine.Instance.Village.countBuildingType(0x23) == 0)))
         {
             MyMessageBox.Show(SK.Text("PlayCard_No_Inn_Available", "An inn must be built at the current village before this card can be played."));
             this.waitingResponse = false;
         }
         else if (fromClick && Program.mySettings.ConfirmPlayCard)
         {
             GameEngine.Instance.playInterfaceSound("PlayCardsPanel_play_card_open_confirmation");
             base.PanelActive = false;
             this.waitingResponse = false;
             InterfaceMgr.Instance.openConfirmPlayCardPopup(clickedControl.Definition, new ConfirmPlayCardPanel.CardClickPlayDelegate(this.doCardClickPlay));
         }
         else if (!fromValidate && CardTypes.cardNeedsValidation(CardTypes.getCardType(clickedControl.Definition.id)))
         {
             this.validateCardPossible(CardTypes.getCardType(clickedControl.Definition.id), this.selectedVillage);
         }
         else
         {
             if (InterfaceMgr.Instance.getCardWindow() != null)
             {
                 CursorManager.SetCursor(CursorManager.CursorType.WaitCursor, InterfaceMgr.Instance.getCardWindow());
             }
             if (fromClick)
             {
                 GameEngine.Instance.playInterfaceSound("PlayCardsPanel_play_card");
             }
             int num3 = clickedControl.UserIDList[0];
             provider.PlayUserCard(new XmlRpcCardsRequest(RemoteServices.Instance.UserGuid.ToString().Replace("-", ""), RemoteServices.Instance.SessionGuid.ToString().Replace("-", ""), num3.ToString(), this.selectedVillage.ToString(), RemoteServices.Instance.ProfileWorldID.ToString()), new CardsEndResponseDelegate(this.CardPlayed), this);
             try
             {
                 GameEngine.Instance.World.removeProfileCard(clickedControl.UserIDList[0]);
                 clickedControl.Visible = false;
             }
             catch (Exception exception)
             {
                 MyMessageBox.Show(exception.Message, SK.Text("BuyCardsPanel_Error_Report", "ERROR: Please report this error message"));
             }
             this.greyout.invalidate();
         }
     }
 }
Пример #4
0
 public bool update()
 {
     this.newDisplayedCards.Clear();
     CardData userCardData = GameEngine.Instance.World.UserCardData;
     WorldData localWorldData = GameEngine.Instance.LocalWorldData;
     DateTime time = VillageMap.getCurrentServerTime();
     int length = userCardData.cards.Length;
     for (int i = 0; i < length; i++)
     {
         int num3 = userCardData.cards[i];
         int num4 = CardTypes.getCardCategory(num3);
         if (((num4 == this.currentCardSection) || (this.currentCardSection == 0)) || ((this.currentCardSection == 9) && ((num4 == 6) || (num4 == 7))))
         {
             DateTime time2 = userCardData.cardsExpiry[i];
             TimeSpan span = (TimeSpan) (time2 - time);
             int num5 = 1;
             num5 = CardTypes.getCardDuration(num3);
             int totalMinutes = (int) span.TotalMinutes;
             if (totalMinutes < 0)
             {
                 totalMinutes = 0;
             }
             int num7 = (totalMinutes * 0x40) / (num5 * 60);
             if (num7 < 0)
             {
                 num7 = 0;
             }
             else if (num7 >= 0x40)
             {
                 num7 = 0x3f;
             }
             if (span.TotalDays > 100.0)
             {
                 num7 = 0x40;
             }
             DisplayCardInfo item = new DisplayCardInfo {
                 card = num3,
                 currentFrame = num7,
                 effect = CardTypes.getCardEffectValue(num3),
                 imageID = this.getCardImage(num3) - 1
             };
             this.newDisplayedCards.Add(item);
         }
     }
     int num8 = GameEngine.Instance.World.countPlayableCards(this.currentCardSection);
     bool flag = false;
     if (num8 != this.lastAvailableToPlay)
     {
         flag = true;
     }
     if (!this.equalCards(this.displayedCards, this.newDisplayedCards))
     {
         flag = true;
         this.displayedCards.Clear();
         foreach (DisplayCardInfo info2 in this.newDisplayedCards)
         {
             this.displayedCards.Add(info2);
         }
     }
     if (this.showExtras && (this.cardTextTimer > 0))
     {
         this.cardTextTimer--;
         if (this.cardTextTimer <= 0)
         {
             this.mainText.Visible = false;
             flag = true;
         }
         else if (this.cardTextTimer < 10)
         {
             this.mainText.Color = Color.FromArgb(this.cardTextTimer * 0x19, this.cardTextTimer * 0x19, this.cardTextTimer * 0x19, this.cardTextTimer * 0x19);
             this.mainText.DropShadowColor = Color.FromArgb(this.cardTextTimer * 0x19, 0, 0, 0);
             flag = true;
         }
     }
     if (this.showExtras && !this.suggestedCardsValid)
     {
         CardTypes.CardDefinition filter = new CardTypes.CardDefinition {
             cardCategory = this.currentCardSection
         };
         GameEngine.Instance.World.searchProfileCards(filter, "meta", GameEngine.Instance.World.lastUserCardNameFilter);
         int playerRank = GameEngine.Instance.World.getRank() + 1;
         foreach (int num10 in GameEngine.Instance.World.ProfileCardsSearch)
         {
             if ((GameEngine.Instance.World.ProfileCards[num10].cardRank <= playerRank) && (GameEngine.Instance.World.ProfileCards[num10].id != 0xc04))
             {
                 int id = GameEngine.Instance.World.ProfileCards[num10].id;
                 if (this.suggestedCardCounts.ContainsKey(id))
                 {
                     foreach (CustomSelfDrawPanel.UICard card in this.suggestedCards)
                     {
                         if (card.Definition.id == GameEngine.Instance.World.ProfileCards[num10].id)
                         {
                             card.UserIDList.Add(num10);
                             card.cardCount++;
                             card.countLabel.Text = card.cardCount.ToString();
                         }
                     }
                 }
                 else
                 {
                     this.suggestedCardCounts.Add(GameEngine.Instance.World.ProfileCards[num10].id, 1);
                     CustomSelfDrawPanel.UICard card2 = this.makeUICard(GameEngine.Instance.World.ProfileCards[num10], num10, playerRank);
                     this.suggestedCards.Add(card2);
                 }
             }
         }
         this.suggestedExpand.Visible = this.suggestedExpand.Enabled = this.suggestedCards.Count != 0;
         this.suggestedCardsValid = true;
     }
     if (this.showExtras && !this.animationComplete)
     {
         this.animationComplete = true;
         if (!this.suggestedExpand.Visible)
         {
             for (int j = 0; j < this.suggestedDisplayedCards.Count; j++)
             {
                 if (this.suggestedDisplayedCards[j].Position.X < (this.BASE_CARD_POS + (0x2f * j)))
                 {
                     this.animationComplete = false;
                     this.suggestedDisplayedCards[j].X = Math.Min((int) (this.suggestedDisplayedCards[j].Position.X + 70), (int) (this.BASE_CARD_POS + (0x2f * j)));
                 }
             }
         }
         this.Dirty = true;
         base.invalidate();
     }
     if ((this.showExtras && (this.animatedCard != null)) && (this.animationCounter < 30))
     {
         int red = ((this.animationCounter % 10) + 11) * 12;
         this.animatedCard.Hilight(Color.FromArgb(red, red, red));
         this.animationCounter++;
         if (this.animationCounter == 10)
         {
             this.animatedCard.Y -= 2;
         }
         this.Dirty = true;
         base.invalidate();
     }
     else if (this.showExtras && (this.animatedCard != null))
     {
         this.animatedCard.Hilight(ARGBColors.White);
         this.animatedCard = null;
         this.Dirty = true;
         base.invalidate();
     }
     if (this.showExtras && (this.suggestedNext.Data > 0))
     {
         this.suggestedNext.Data--;
         if (this.suggestedNext.Data == 0)
         {
             this.suggestedNext.Image = (Image) GFXLibrary.cardbar_right[1];
             this.Dirty = true;
             base.invalidate();
         }
     }
     if (this.showExtras && (this.suggestedPrev.Data > 0))
     {
         this.suggestedPrev.Data--;
         if (this.suggestedPrev.Data == 0)
         {
             this.suggestedPrev.Image = (Image) GFXLibrary.cardbar_left[1];
             this.Dirty = true;
             base.invalidate();
         }
     }
     if (flag)
     {
         this.Dirty = true;
         this.lastAvailableToPlay = num8;
         int count = this.displayedCards.Count;
         if (count > this.numCardCirclesVisible)
         {
             count = this.numCardCirclesVisible;
         }
         this.circleCardsText.Text = num8.ToString();
         if (this.suggestedDisplayedCards.Count != 0)
         {
             base.invalidate();
             return true;
         }
         for (int k = 0; k < this.numCardCirclesVisible; k++)
         {
             this.getCircle(k).Visible = false;
         }
         for (int m = 0; m < count; m++)
         {
             CardCircle circle2 = this.getCircle(m);
             DisplayCardInfo info3 = this.displayedCards[m];
             circle2.Image = GFXLibrary.card_circles_timer[info3.currentFrame];
             circle2.Visible = true;
             circle2.FXImage = GFXLibrary.card_circles_icons[info3.imageID];
             circle2.scaleFXImage(info3.imageID == 0x21);
             int effect = (int) info3.effect;
             NumberFormatInfo provider = null;
             if (effect == info3.effect)
             {
                 provider = GameEngine.NFI;
             }
             else
             {
                 provider = GameEngine.NFI_D1;
             }
             string str = "";
             if (addX(info3.card))
             {
                 str = "x" + info3.effect.ToString("N", provider);
             }
             else if (addPlus(info3.card))
             {
                 str = "+" + info3.effect.ToString("N", provider);
             }
             else if (info3.effect != 0.0)
             {
                 str = info3.effect.ToString("N", provider);
             }
             else
             {
                 str = "";
             }
             if (addPercent(info3.card))
             {
                 str = str + "%";
             }
             circle2.Text = str;
             circle2.CustomTooltipID = 0x2710;
             circle2.CustomTooltipData = info3.card;
         }
         if (this.showExtras)
         {
             this.circleCards.X = 10 + (0x35 * count);
             this.suggestedExpand.X = ((0x35 * count) + 0x10) + this.circleCards.Image.Size.Width;
             this.mainText.X = (this.circleCards.X + 0x35) + 5;
         }
         base.invalidate();
     }
     return flag;
 }
Пример #5
0
 private void clickPlay(bool fromClick, bool fromValidate)
 {
     if (!this.waitingResponse)
     {
         if ((CustomSelfDrawPanel.StaticClickedControl != null) && fromClick)
         {
             this.clickedCard = (CustomSelfDrawPanel.UICard) CustomSelfDrawPanel.StaticClickedControl;
         }
         if (this.clickedCard != null)
         {
             this.waitingResponse = true;
             XmlRpcCardsProvider provider = XmlRpcCardsProvider.CreateForEndpoint(URLs.ProfileProtocol, URLs.ProfileServerAddressCards, URLs.ProfileServerPort, URLs.ProfileCardPath);
             CustomSelfDrawPanel.UICard clickedCard = this.clickedCard;
             this.selectedVillage = -1;
             int villageID = InterfaceMgr.Instance.getSelectedMenuVillage();
             if (!GameEngine.Instance.World.isCapital(villageID) || (CardTypes.getCardType(clickedCard.Definition.id) == 0xc04))
             {
                 this.selectedVillage = villageID;
             }
             int num2 = GameEngine.Instance.World.getRank() + 1;
             if (clickedCard.Definition.cardRank > num2)
             {
                 MyMessageBox.Show(SK.Text("BuyCardsPanel_Rank_Too_low", "Your rank is too low to play this card.") + Environment.NewLine + SK.Text("BuyCardsPanel_Current_Rank", "Current Rank") + " : " + num2.ToString() + Environment.NewLine + SK.Text("BuyCardsPanel_Required_Rank", "Required Rank") + " : " + clickedCard.Definition.cardRank.ToString(), SK.Text("BuyCardsPanel_Cannot_Play_Cards", "Could not play card."));
                 this.waitingResponse = false;
             }
             else if ((((clickedCard.Definition.id == 0xc25) || (clickedCard.Definition.id == 0xc26)) || ((clickedCard.Definition.id == 0xc27) || (clickedCard.Definition.id == 0xc28))) && ((GameEngine.Instance.Village != null) && (GameEngine.Instance.Village.countBuildingType(0x23) == 0)))
             {
                 MyMessageBox.Show(SK.Text("PlayCard_No_Inn_Available", "An inn must be built at the current village before this card can be played."));
                 this.waitingResponse = false;
             }
             else if (fromClick && Program.mySettings.ConfirmPlayCard)
             {
                 GameEngine.Instance.playInterfaceSound("PlayCardsPanel_play_card_open_confirmation");
                 this.waitingResponse = false;
                 InterfaceMgr.Instance.openConfirmPlayCardPopup(clickedCard.Definition, new ConfirmPlayCardPanel.CardClickPlayDelegate(this.clickPlay));
             }
             else if (!fromValidate && CardTypes.cardNeedsValidation(CardTypes.getCardType(clickedCard.Definition.id)))
             {
                 this.validateCardPossible(CardTypes.getCardType(clickedCard.Definition.id), this.selectedVillage);
             }
             else
             {
                 try
                 {
                     if (fromClick)
                     {
                         GameEngine.Instance.playInterfaceSound("PlayCardsPanel_play_card");
                     }
                     this.animationCounter = 0;
                     this.animatedCard = this.clickedCard;
                     this.animatedCard.Y += 2;
                     int num3 = clickedCard.UserIDList[0];
                     provider.PlayUserCard(new XmlRpcCardsRequest(RemoteServices.Instance.UserGuid.ToString().Replace("-", ""), RemoteServices.Instance.SessionGuid.ToString().Replace("-", ""), num3.ToString(), this.selectedVillage.ToString(), RemoteServices.Instance.ProfileWorldID.ToString()), new CardsEndResponseDelegate(this.cardPlayed), InterfaceMgr.Instance.getDXBasePanel());
                     GameEngine.Instance.World.removeProfileCard(clickedCard.UserIDList[0]);
                 }
                 catch (Exception)
                 {
                 }
             }
         }
     }
 }
Пример #6
0
 private void cardPlayed(ICardsProvider provider, ICardsResponse response)
 {
     if (!response.SuccessCode.HasValue || (response.SuccessCode.Value != 1))
     {
         GameEngine.Instance.playInterfaceSound("PlayCardsPanel_play_card_failed");
         MyMessageBox.Show(PlayCardsWindow.translateCardError(response.Message, this.clickedCard.Definition.id), SK.Text("BuyCardsPanel_Cannot_Play_Cards", "Could not play card."));
         try
         {
             GameEngine.Instance.World.addProfileCard(this.clickedCard.UserIDList[0], CardTypes.getStringFromCard(this.clickedCard.Definition.id));
         }
         catch (Exception exception)
         {
             MyMessageBox.Show(exception.Message, SK.Text("BuyCardsPanel_Error_Report", "ERROR: Please report this error message"));
         }
     }
     else
     {
         GameEngine.Instance.playInterfaceSound("PlayCardsPanel_play_card_success");
         GameEngine.Instance.World.ProfileCardsSet.Remove(this.clickedCard.UserIDList[0]);
         GameEngine.Instance.addRecentCard(this.clickedCard.Definition.id);
         if (this.clickedCard.UserIDList.Count > 0)
         {
             this.clickedCard.UserID = this.clickedCard.UserIDList[0];
         }
         GameEngine.Instance.World.CardPlayed(this.clickedCard.Definition.cardCategory, this.clickedCard.Definition.id, this.selectedVillage);
         if (this.clickedCard.cardCount > 1)
         {
             this.clickedCard.UserIDList.Remove(this.clickedCard.UserID);
             this.clickedCard.UserID = this.clickedCard.UserIDList[0];
             this.clickedCard.cardCount--;
             this.clickedCard.countLabel.Text = this.clickedCard.cardCount.ToString();
         }
         else
         {
             this.clickedCard.setClickDelegate(null);
             CustomSelfDrawPanel.CSDImage control = new CustomSelfDrawPanel.CSDImage {
                 Position = new Point(0, 0),
                 Size = this.clickedCard.bigImage.Size,
                 Image = (Image) GFXLibrary.CardBackBig
             };
             control.setScale(0.25);
             this.clickedCard.CustomTooltipID = 0;
             this.clickedCard.CustomTooltipData = -1;
             this.clickedCard.addControl(control);
         }
     }
     this.Dirty = true;
     base.invalidate();
     this.clickedCard = null;
     this.waitingResponse = false;
 }
Пример #7
0
        private void GetCardsAvailable(bool redosearch)
        {
            if (redosearch)
            {
                GameEngine.Instance.World.searchProfileCardsRedoLast();
            }
            Dictionary<int, int> dictionary = new Dictionary<int, int>();
            foreach (int num in GameEngine.Instance.World.ProfileCardsSearch)
            {
                int id = GameEngine.Instance.World.ProfileCards[num].id;
                if (dictionary.ContainsKey(id))
                {
                    Dictionary<int, int> dictionary2;
                    int num7;
                    (dictionary2 = dictionary)[num7 = id] = dictionary2[num7] + 1;
                }
                else
                {
                    dictionary.Add(id, 1);
                }
            }
            foreach (CustomSelfDrawPanel.UICard card in this.UICardList)
            {
                card.clearControls();
                if (card.Parent != null)
                {
                    card.Parent.removeControl(card);
                }
            }
            this.UICardList.Clear();
            int num3 = GameEngine.Instance.World.getRank() + 1;
            foreach (int num4 in GameEngine.Instance.World.ProfileCardsSearch)
            {
                int key = GameEngine.Instance.World.ProfileCards[num4].id;
                try
                {
                    if (dictionary.ContainsKey(key))
                    {
                        CustomSelfDrawPanel.UICard item = new CustomSelfDrawPanel.UICard {
                            cardCount = dictionary[key],
                            UserID = num4
                        };
                        item.UserIDList.Add(num4);
                        item.Definition = GameEngine.Instance.World.ProfileCards[num4];
                        switch (item.Definition.cardColour)
                        {
                            case 1:
                                item.bigFrame = GFXLibrary.BlueCardOverlayBig;
                                item.bigFrameOver = GFXLibrary.BlueCardOverlayBigOver;
                                break;

                            case 2:
                                item.bigFrame = GFXLibrary.GreenCardOverlayBig;
                                item.bigFrameOver = GFXLibrary.GreenCardOverlayBigOver;
                                break;

                            case 3:
                                item.bigFrame = GFXLibrary.PurpleCardOverlayBig;
                                item.bigFrameOver = GFXLibrary.PurpleCardOverlayBigOver;
                                break;

                            case 4:
                                item.bigFrame = GFXLibrary.RedCardOverlayBig;
                                item.bigFrameOver = GFXLibrary.RedCardOverlayBigOver;
                                break;

                            case 5:
                                item.bigFrame = GFXLibrary.YellowCardOverlayBig;
                                item.bigFrameOver = GFXLibrary.YellowCardOverlayBigOver;
                                break;
                        }
                        item.bigImage = GFXLibrary.Instance.getCardImageBig(item.Definition.id);
                        item.Size = item.bigFrame.Size;
                        item.CustomTooltipID = 0x2775;
                        item.CustomTooltipData = item.Definition.id;
                        item.bigGradeImage = new CustomSelfDrawPanel.CSDImage();
                        int num6 = CardTypes.getGrade(item.Definition.cardGrade);
                        switch (num6)
                        {
                            case 0x10000:
                                item.bigGradeImage.Image = (Image) GFXLibrary.CardGradeBronze;
                                item.bigGradeImage.Position = new Point(item.Width - item.bigGradeImage.Width, 0);
                                break;

                            case 0x20000:
                                item.bigGradeImage.Image = (Image) GFXLibrary.CardGradeSilver;
                                item.bigGradeImage.Position = new Point(item.Width - item.bigGradeImage.Width, 0);
                                break;

                            case 0x40000:
                                item.bigGradeImage.Image = (Image) GFXLibrary.card_gold_anim[0];
                                item.bigGradeImage.Position = new Point((item.Width - item.bigGradeImage.Width) - 3, 0);
                                break;

                            case 0x200000:
                                item.bigGradeImage.Image = (Image) GFXLibrary.card_diamond3_anim[0];
                                item.bigGradeImage.Position = new Point((item.Width - item.bigGradeImage.Width) - 3, -10);
                                break;

                            case 0x400000:
                                item.bigGradeImage.Image = (Image) GFXLibrary.card_sapphire_anim[0];
                                item.bigGradeImage.Position = new Point((item.Width - item.bigGradeImage.Width) - 3, -12);
                                break;

                            case 0x80000:
                                item.bigGradeImage.Image = (Image) GFXLibrary.card_diamond_anim[0];
                                item.bigGradeImage.Position = new Point((item.Width - item.bigGradeImage.Width) - 3, -2);
                                break;

                            case 0x100000:
                                item.bigGradeImage.Image = (Image) GFXLibrary.card_diamond2_anim[0];
                                item.bigGradeImage.Position = new Point((item.Width - item.bigGradeImage.Width) - 3, -7);
                                break;

                            default:
                                item.bigGradeImage.Image = (Image) GFXLibrary.CardGradeBronze;
                                item.bigGradeImage.Position = new Point(item.Width - item.bigGradeImage.Width, 0);
                                break;
                        }
                        item.bigBaseImage = new CustomSelfDrawPanel.CSDImage();
                        item.bigBaseImage.Position = new Point(10, 11);
                        item.bigBaseImage.Size = item.bigImage.Size;
                        item.bigBaseImage.Image = (Image) item.bigImage;
                        item.addControl(item.bigBaseImage);
                        item.bigFrameImage = new CustomSelfDrawPanel.CSDImage();
                        item.bigFrameImage.Position = new Point(0, 0);
                        item.bigFrameImage.Size = item.bigFrame.Size;
                        item.bigFrameImage.Image = (Image) item.bigFrame;
                        item.addControl(item.bigFrameImage);
                        switch (num6)
                        {
                            case 0x40000:
                                item.bigFrameExtraImage = new CustomSelfDrawPanel.CSDImage();
                                item.bigFrameExtraImage.Position = new Point(0, 0);
                                item.bigFrameExtraImage.Image = (Image) GFXLibrary.card_frame_overlay_gold;
                                item.addControl(item.bigFrameExtraImage);
                                break;

                            case 0x80000:
                            case 0x100000:
                            case 0x200000:
                                item.bigFrameExtraImage = new CustomSelfDrawPanel.CSDImage();
                                item.bigFrameExtraImage.Position = new Point(0, 0);
                                item.bigFrameExtraImage.Image = (Image) GFXLibrary.card_frame_overlay_diamond;
                                item.addControl(item.bigFrameExtraImage);
                                break;

                            case 0x400000:
                                item.bigFrameExtraImage = new CustomSelfDrawPanel.CSDImage();
                                item.bigFrameExtraImage.Position = new Point(0, 0);
                                item.bigFrameExtraImage.Image = (Image) GFXLibrary.card_frame_overlay_sapphire;
                                item.addControl(item.bigFrameExtraImage);
                                break;
                        }
                        item.bigGradeImage.Size = item.bigGradeImage.Image.Size;
                        item.addControl(item.bigGradeImage);
                        item.bigTitle = new CustomSelfDrawPanel.CSDLabel();
                        item.bigTitle.Text = CardTypes.getDescriptionFromCard(item.Definition.id);
                        item.bigTitle.Size = new Size(110, 0x30);
                        item.bigTitle.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
                        if (((((item.Definition.id == 0x709) || (item.Definition.id == 0x606)) || ((item.Definition.id == 0xc41) || (item.Definition.id == 0x50a))) || ((item.Definition.id == 0x605) || (item.Definition.id == 0x607))) && (Program.mySettings.LanguageIdent == "de"))
                        {
                            item.bigTitle.Font = FontManager.GetFont("Arial", 8f, FontStyle.Bold);
                        }
                        else
                        {
                            item.bigTitle.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold);
                        }
                        item.bigTitle.Color = ARGBColors.White;
                        item.bigTitle.DropShadowColor = ARGBColors.Black;
                        item.bigTitle.Position = new Point(0x26, 12);
                        item.addControl(item.bigTitle);
                        item.bigEffect = new CustomSelfDrawPanel.CSDLabel();
                        item.bigEffect.Text = item.Definition.EffectText;
                        item.bigEffect.Size = new Size(150, 0x40);
                        item.bigEffect.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
                        item.bigEffect.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold);
                        if ((Program.mySettings.LanguageIdent == "de") && CardTypes.isGermanSmallDesc(item.Definition.id))
                        {
                            item.bigEffect.Font = FontManager.GetFont("Arial", 8f, FontStyle.Bold);
                        }
                        item.bigEffect.Color = ARGBColors.White;
                        item.bigEffect.DropShadowColor = ARGBColors.Black;
                        item.bigEffect.Position = new Point(14, 0xae);
                        item.addControl(item.bigEffect);
                        CustomSelfDrawPanel.CSDLabel control = new CustomSelfDrawPanel.CSDLabel {
                            Position = new Point(2, 2),
                            Size = new Size(item.Width, item.Height),
                            Text = "",
                            Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT,
                            Font = FontManager.GetFont("Arial", 18f, FontStyle.Bold),
                            Color = ARGBColors.Yellow,
                            DropShadowColor = ARGBColors.Black
                        };
                        item.addControl(control);
                        item.countLabel = control;
                        if (num3 < item.Definition.cardRank)
                        {
                            Color red = ARGBColors.Red;
                        }
                        else
                        {
                            Color white = ARGBColors.White;
                        }
                        CustomSelfDrawPanel.CSDLabel label2 = new CustomSelfDrawPanel.CSDLabel {
                            Position = new Point(150, 220),
                            Size = new Size(20, 13),
                            Text = item.Definition.cardRank.ToString(),
                            Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER,
                            Font = FontManager.GetFont("Arial", 10f, FontStyle.Bold),
                            Color = ARGBColors.White,
                            DropShadowColor = ARGBColors.Black
                        };
                        item.addControl(label2);
                        item.rankLabel = label2;
                        item.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.cardClickPlay));
                        item.ScaleAll(0.95);
                        this.UICardList.Add(item);
                        dictionary.Remove(key);
                        if (num3 < item.Definition.cardRank)
                        {
                            item.Hilight(ARGBColors.Gray);
                        }
                        else
                        {
                            item.Hilight(ARGBColors.White);
                        }
                        continue;
                    }
                    foreach (CustomSelfDrawPanel.UICard card3 in this.UICardList)
                    {
                        if (card3.Definition.id == key)
                        {
                            card3.UserIDList.Add(num4);
                            continue;
                        }
                    }
                }
                catch (Exception exception)
                {
                    UniversalDebugLog.Log("EXCEPTION " + exception.ToString());
                }
            }
            GFXLibrary.Instance.closeBigCardsLoader();
        }
Пример #8
0
 private void doCardClickPlay(bool fromClick, bool fromValidate)
 {
     try
     {
         if (!this.waitingResponse)
         {
             if ((base.ClickedControl.GetType() == typeof(CustomSelfDrawPanel.UICard)) || !fromClick)
             {
                 CustomSelfDrawPanel.UICard clickedControl = null;
                 if (fromClick)
                 {
                     clickedControl = (CustomSelfDrawPanel.UICard) base.ClickedControl;
                 }
                 else
                 {
                     clickedControl = this.lastRequestCard;
                 }
                 this.lastRequestCard = clickedControl;
                 this.waitingResponse = true;
                 XmlRpcCardsProvider provider = XmlRpcCardsProvider.CreateForEndpoint(URLs.ProfileProtocol, URLs.ProfileServerAddressCards, URLs.ProfileServerPort, URLs.ProfileCardPath);
                 this.selectedVillage = -1;
                 int villageID = InterfaceMgr.Instance.getSelectedMenuVillage();
                 if (!GameEngine.Instance.World.isCapital(villageID) || (CardTypes.getCardType(clickedControl.Definition.id) == 0xc04))
                 {
                     this.selectedVillage = villageID;
                 }
                 int num2 = GameEngine.Instance.World.getRank() + 1;
                 if (this.lastRequestCard.Definition.cardRank > num2)
                 {
                     MyMessageBox.Show(SK.Text("BuyCardsPanel_Rank_Too_low", "Your rank is too low to play this card.") + Environment.NewLine + SK.Text("BuyCardsPanel_Current_Rank", "Current Rank") + " : " + num2.ToString() + Environment.NewLine + SK.Text("BuyCardsPanel_Required_Rank", "Required Rank") + " : " + this.lastRequestCard.Definition.cardRank.ToString(), SK.Text("BuyCardsPanel_Cannot_Play_Cards", "Could not play card."));
                     this.waitingResponse = false;
                 }
                 else if ((((this.lastRequestCard.Definition.id == 0xc25) || (this.lastRequestCard.Definition.id == 0xc26)) || ((this.lastRequestCard.Definition.id == 0xc27) || (this.lastRequestCard.Definition.id == 0xc28))) && ((GameEngine.Instance.Village != null) && (GameEngine.Instance.Village.countBuildingType(0x23) == 0)))
                 {
                     MyMessageBox.Show(SK.Text("PlayCard_No_Inn_Available", "An inn must be built at the current village before this card can be played."));
                     this.waitingResponse = false;
                 }
                 else
                 {
                     if (fromClick && Program.mySettings.ConfirmPlayCard)
                     {
                         GameEngine.Instance.playInterfaceSound("PlayCardsPanel_play_card_open_confirmation");
                         base.PanelActive = false;
                         this.waitingResponse = false;
                         InterfaceMgr.Instance.openConfirmPlayCardPopup(clickedControl.Definition, new ConfirmPlayCardPanel.CardClickPlayDelegate(this.doCardClickPlay));
                         return;
                     }
                     if (!fromValidate && CardTypes.cardNeedsValidation(CardTypes.getCardType(clickedControl.Definition.id)))
                     {
                         this.validateCardPossible(CardTypes.getCardType(clickedControl.Definition.id), this.selectedVillage);
                         return;
                     }
                     try
                     {
                         if (InterfaceMgr.Instance.getCardWindow() != null)
                         {
                             CursorManager.SetCursor(CursorManager.CursorType.WaitCursor, InterfaceMgr.Instance.getCardWindow());
                         }
                         if (fromClick)
                         {
                             GameEngine.Instance.playInterfaceSound("PlayCardsPanel_play_card");
                         }
                         int num4 = clickedControl.UserIDList[0];
                         provider.PlayUserCard(new XmlRpcCardsRequest(RemoteServices.Instance.UserGuid.ToString().Replace("-", ""), RemoteServices.Instance.SessionGuid.ToString().Replace("-", ""), num4.ToString(), this.selectedVillage.ToString(), RemoteServices.Instance.ProfileWorldID.ToString()), new CardsEndResponseDelegate(this.CardPlayed), this);
                         GameEngine.Instance.World.removeProfileCard(clickedControl.UserIDList[0]);
                         if ((this.lastRequestCard.cardCount > 1) || this.usingRecentFilter)
                         {
                             this.lastRequestUserID = clickedControl.UserIDList[0];
                             this.lastRequestCard.UserIDList.Remove(clickedControl.UserIDList[0]);
                             this.lastRequestCard.cardCount--;
                             if (this.lastRequestCard.cardCount > 1)
                             {
                                 this.lastRequestCard.countLabel.Text = this.lastRequestCard.cardCount.ToString();
                                 if (this.lastRequestCard.cardCount >= 100)
                                 {
                                     this.lastRequestCard.countLabel.Font = FontManager.GetFont("Arial", 16f, FontStyle.Bold);
                                 }
                                 else
                                 {
                                     this.lastRequestCard.countLabel.Font = FontManager.GetFont("Arial", 18f, FontStyle.Bold);
                                 }
                             }
                             else
                             {
                                 this.lastRequestCard.countLabel.Text = "";
                                 if (this.usingRecentFilter && (this.lastRequestCard.cardCount < 1))
                                 {
                                     this.lastRequestCard.buyCardsLabel.Visible = true;
                                     this.lastRequestCard.Hilight(ARGBColors.Gray);
                                     this.lastRequestCard.setClickDelegate(null);
                                     this.lastRequestCard.buyCardsLabel.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.linkToBuy));
                                 }
                             }
                             this.AvailablePanelContent.invalidate();
                             if (this.usingRecentFilter)
                             {
                                 this.RefreshCards(this.AvailablePanelContent, this.UICardList, 500);
                             }
                         }
                         else
                         {
                             this.UICardList.Remove(this.lastRequestCard);
                             this.lastRequestUserID = clickedControl.UserIDList[0];
                             int height = this.RefreshCards(this.AvailablePanelContent, this.UICardList, 500);
                             this.AvailablePanelContent.Size = new Size(this.AvailablePanel.Width, height);
                             this.UpdateScrollbar(this.scrollbarAvailable, this.AvailablePanelContent);
                         }
                     }
                     catch (Exception exception)
                     {
                         MyMessageBox.Show(exception.Message, SK.Text("BuyCardsPanel_Error_Report", "ERROR: Please report this error message"));
                     }
                 }
             }
             if (this.usingRecentFilter)
             {
                 this.labelTitle.Text = SK.Text("CARDFILTER_RECENT2", "Recent") + " : " + GameEngine.Instance.World.countCardsInCategory(0x100000).ToString();
             }
             else
             {
                 this.labelTitle.Text = this.sectionName + " : " + GameEngine.Instance.World.ProfileCardsSearch.Count.ToString();
             }
         }
     }
     catch (Exception exception2)
     {
         UniversalDebugLog.Log(exception2.ToString());
     }
 }
Пример #9
0
 private void cardMouseOver()
 {
     if (base.OverControl.GetType() == typeof(CustomSelfDrawPanel.UICard))
     {
         CustomSelfDrawPanel.UICard overControl = (CustomSelfDrawPanel.UICard) base.OverControl;
         overControl.Hilight(ARGBColors.White);
         this.LastMouseoverCard = overControl;
     }
 }