Ejemplo n.º 1
0
        /* --- Instance Methods (Auxiliary) --- */
        private void OnMsgAccountInfoResponse(HSInfo.Message msg)
        {
            var c = (MsgAccountInfoResponse)msg;

            SetAccountName(c.Name);
            GoldLabel.Set(c.Gold);
            DustLabel.Set(c.Dust);
            PacksLabel.Set(c.Packs);
            RankLabel.Set(c.Rank, c.Stars);
        }
Ejemplo n.º 2
0
        private void OnMsgCurrencyBalance(HSInfo.Message msg)
        {
            var c = (MsgCurrencyBalance)msg;

            switch (c.Type)
            {
            case MsgCurrencyBalance.CurrencyType.GOLD:
                GoldLabel.Set(c.Amount);
                break;

            case MsgCurrencyBalance.CurrencyType.DUST:
                DustLabel.Set(c.Amount);
                break;

            case MsgCurrencyBalance.CurrencyType.PACKS:
                PacksLabel.Set(c.Amount);
                break;
            }
        }
Ejemplo n.º 3
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing)
            {
                if (Grid != null)
                {
                    if (!Grid.IsDisposed)
                    {
                        Grid.Dispose();
                    }

                    Grid = null;
                }


                if (TitleLabel != null)
                {
                    if (!TitleLabel.IsDisposed)
                    {
                        TitleLabel.Dispose();
                    }

                    TitleLabel = null;
                }

                if (GoldLabel != null)
                {
                    if (!GoldLabel.IsDisposed)
                    {
                        GoldLabel.Dispose();
                    }

                    GoldLabel = null;
                }

                if (GameGoldLabel != null)
                {
                    if (!GameGoldLabel.IsDisposed)
                    {
                        GameGoldLabel.Dispose();
                    }

                    GameGoldLabel = null;
                }

                if (WeightLabel != null)
                {
                    if (!WeightLabel.IsDisposed)
                    {
                        WeightLabel.Dispose();
                    }

                    WeightLabel = null;
                }

                if (CurrencyLabel != null)
                {
                    if (!CurrencyLabel.IsDisposed)
                    {
                        CurrencyLabel.Dispose();
                    }

                    CurrencyLabel = null;
                }

                if (CloseButton != null)
                {
                    if (!CloseButton.IsDisposed)
                    {
                        CloseButton.Dispose();
                    }

                    CloseButton = null;
                }

                if (SortButton != null)
                {
                    if (!SortButton.IsDisposed)
                    {
                        SortButton.Dispose();
                    }

                    SortButton = null;
                }

                if (TrashButton != null)
                {
                    if (!TrashButton.IsDisposed)
                    {
                        TrashButton.Dispose();
                    }

                    TrashButton = null;
                }

                if (GoldTitle != null)
                {
                    if (!GoldTitle.IsDisposed)
                    {
                        GoldTitle.Dispose();
                    }

                    GameGoldTitle = null;
                }

                if (GameGoldTitle != null)
                {
                    if (!GameGoldTitle.IsDisposed)
                    {
                        GameGoldTitle.Dispose();
                    }

                    GameGoldTitle = null;
                }
            }
        }