コード例 #1
0
    //显示强化信息
    void ShowEnhanceInfo(int index)
    {
        EnchanceItem = pItem[index];
        Enchancebutton.UpdateItem(EnchanceItem.GetID());
        int j = EnhancePage[nTheIndex] * 10;

        for (int i = 0; i < 10; i++)
        {
            if (i + j >= pItem.Count)
            {
                EnhanceNames[i].Text   = "";
                EnchanceLevels[i].Text = "";
                EnchanceRadios[i].Hide(true);
            }
            else
            {
                EnhanceNames[i].Text   = pItem[i + j].GetName();
                EnchanceLevels[i].Text = CDataPool.Instance.GetStrengthLevelDesc(pItem[i + j].GetStrengthLevel());
                EnchanceRadios[i].Hide(false);
            }
        }

        EnchancePreLevel.Text     = "强化等级:" + CDataPool.Instance.GetStrengthLevelDesc(EnchanceItem.GetStrengthLevel());
        EnchanceCurrentLevel.Text = CDataPool.Instance.GetStrengthLevelDesc(EnchanceItem.GetStrengthLevel());
        EnchanceNextLevel.Text    = CDataPool.Instance.GetStrengthNextLevelDesc(EnchanceItem.GetStrengthLevel());
        int selectIndex = (int)EnchanceSelect[nTheIndex];

        if (EnhancePage[nTheIndex] == EnhancePageRadio[nTheIndex])
        {
            EnchanceRadios[selectIndex].Value = true;
        }
        else
        {
            EnchanceRadios[selectIndex].Value = false;
        }

        EnchancePageNum.Text = (EnhancePage[nTheIndex] + 1) + "/" + GetPageNum();

        Item_Enhance itemEnhance = LifeAbility.Instance.Get_Equip_EnhanceLevel((CObject_Item)EnchanceItem);
        int          NeedMoney   = itemEnhance.needMoney;
        int          Property    = itemEnhance.addProperty;

        if (NeedMoney <= 0 || Property < 0)
        {
            if (EnchanceItem != null)
            {
                EnhanceMoney.Text = "0";
                //QiangHuaButton.Disable();
            }
            else
            {
                LogManager.LogError("此装备无法强化。");
                return;
            }
        }
        else
        {
            QiangHuaButton.Enable();
        }
    }
コード例 #2
0
    void SetLocked(ActionButton actionBtn, CActionItem actionItem)
    {
        CObject_Item item = actionItem.GetImpl() as CObject_Item;

        if (item.isLocked)
        {
            actionBtn.Disable();
        }
        else
        {
            actionBtn.Enable();
        }
    }
コード例 #3
0
        public void UpdateBaseLayer(string selection, string source)
        {
            if (source.Equals(StylePopupContent.CartoVectorSource))
            {
                // Nutiteq styles are bundled with the SDK, we can initialize them via constuctor
                if (selection.Equals(StylePopupContent.Voyager))
                {
                    CurrentLayer = new CartoOnlineVectorTileLayer(CartoBaseMapStyle.CartoBasemapStyleVoyager);
                }
                else if (selection.Equals(StylePopupContent.Positron))
                {
                    CurrentLayer = new CartoOnlineVectorTileLayer(CartoBaseMapStyle.CartoBasemapStylePositron);
                }
                else
                {
                    CurrentLayer = new CartoOnlineVectorTileLayer(CartoBaseMapStyle.CartoBasemapStyleDarkmatter);
                }
            }
            else if (source.Equals(StylePopupContent.CartoRasterSource))
            {
                if (selection.Equals(StylePopupContent.HereSatelliteDaySource))
                {
                    CurrentLayer = new CartoOnlineRasterTileLayer("here.satellite.day@2x");
                }
                else if (selection.Equals(StylePopupContent.HereNormalDaySource))
                {
                    CurrentLayer = new CartoOnlineRasterTileLayer("here.normal.day@2x");
                }
            }

            if (source.Equals(StylePopupContent.CartoRasterSource))
            {
                LanguageButton.Disable();
            }
            else
            {
                LanguageButton.Enable();
            }

            MapView.Layers.Clear();
            MapView.Layers.Add(CurrentLayer);

            InitializeVectorTileListener();
        }