예제 #1
0
 public void OnShowTipStrWnd(string strTitle, string strContent)
 {
     UBB.toHtml(ref strTitle);
     UBB.toHtml(ref strContent);
     TipTitle.text   = strTitle;
     TipContent.text = strContent;
 }
예제 #2
0
        /// <summary>
        /// 初始化英雄信息配置
        /// </summary>
        /// <param name="strDefaultViewConfigPath"></param>
        private void InitAboutDetailedPropertyInfo(string strDefaultViewConfigPath)
        {
            string strDetailedPropertyInfoPath = strDefaultViewConfigPath + MobaSchemesConfig.DETAILED_PROPERTY_INFO;

            ScpReader DetailedPropertyInfoReader = new ScpReader(strDetailedPropertyInfoPath, true, 2);

            DetailedPropertyInfoTable = new Hashtable();
            int PropertyID = 0;

            for (int i = 0; i < DetailedPropertyInfoReader.GetRecordCount(); i++)
            {
                MobaDetatiledPropertyInfo PropertyInfo = new MobaDetatiledPropertyInfo();
                PropertyID = DetailedPropertyInfoReader.GetInt(i, (int)EMobaDetailedPropertyInfo.EMDPIR_PropertyID, -1);
                if (PropertyID == -1)
                {
                    continue;
                }
                PropertyInfo.PropertyName = DetailedPropertyInfoReader.GetString(i, (int)EMobaDetailedPropertyInfo.EMDPIR_PropertyName, "");
                PropertyInfo.PropertyDes  = DetailedPropertyInfoReader.GetString(i, (int)EMobaDetailedPropertyInfo.EMDPIR_PropertyDes, "");

                UBB.toHtml(ref PropertyInfo.PropertyDes);

                DetailedPropertyInfoTable.Add(PropertyID, PropertyInfo);
            }
        }
예제 #3
0
        public void OnGenicImageClick(int index)
        {
            int nHeroID = arrayCollectGenic[index].nHeroID;

            if (nHeroID <= 0)
            {
                return;
            }

            SSchemePersonModelData heroData = new SSchemePersonModelData();

            if (PersonModelConfig.Instance.GetData_Out(nHeroID, out heroData) == false)
            {
                return;
            }

            string content = string.Format("是否进化为{0}英雄,进化后无法逆转", heroData.szHeroName);

            UBB.toHtml(ref content);
            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: "进化",
                message: content,
                buttons: new UIWidgets.DialogActions()
            {
                { "进化", () => OnEnvolveHero(index) }, { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), null }
            },
                modal: true,
                mutex: true
                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
예제 #4
0
        public void setEquipInfo(cmd_war_persongoodsinfo cmdGoodsInfo, SSchemeMobaGoods schemeMobaGoods)
        {
            // 物品图标
            int nEquipIcon = schemeMobaGoods.GoodsIconID;

            playerEquipTipsTrigger.enabled = nEquipIcon > 0;
            this.goodsImage.sprite         = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_MobaGoods, WndID.WND_ID_WAR_RECORDTABLE_FIGHTING, 1, nEquipIcon);
            if (this.goodsImage.sprite == null && this.goodsImage.gameObject.activeSelf)
            {
                this.goodsImage.gameObject.SetActive(false);
            }
            else if (this.goodsImage.sprite && this.goodsImage.gameObject.activeSelf == false)
            {
                this.goodsImage.gameObject.SetActive(true);
            }

            // 物品数量
            int nTimes = cmdGoodsInfo.nCanUseTimes;

            if (nTimes != 0)
            {
                goodsCount.gameObject.SetActive(true);
            }
            else
            {
                goodsCount.gameObject.SetActive(false);
            }
            this.goodsCount.text = nTimes.ToString();

            m_sEquipDesc = schemeMobaGoods.GoodsDes;

            UBB.toHtml(ref schemeMobaGoods.GoodsName, UBB_FORMAT_TYPE.UGUI);
            playerEquipTipsTrigger.SetText(UTooltipParamName.ItemName, schemeMobaGoods.GoodsName);
            playerEquipTipsTrigger.SetText(UTooltipParamName.ItemCost, schemeMobaGoods.GoodsSoldOutCost.ToString());
        }
예제 #5
0
파일: postreply.cs 프로젝트: xiongeee/BBX
        public void SendNotifyEmail(string email, Post postinfo, string jumpurl)
        {
            if (email.IsNullOrEmpty())
            {
                return;
            }

            var    sb   = new StringBuilder("# 回复: <a href=\"" + jumpurl + "\" target=\"_blank\">" + this.topic.Title + "</a>");
            string text = "";

            if (this.userid > 0)
            {
                text = this.userinfo.Email.Trim();
            }

            sb.Append("\r\n");
            sb.Append("\r\n");
            sb.Append(UBB.ParseSimpleUBB(postinfo.Message));
            sb.Append("\r\n<hr/>");
            sb.Append("作 者:" + postinfo.Poster);
            sb.Append("\r\n");
            sb.Append("Email:<a href=\"mailto:" + text + "\" target=\"_blank\">" + text + "</a>");
            sb.Append("\r\n");
            sb.Append("URL:<a href=\"" + jumpurl + "\" target=\"_blank\">" + jumpurl + "</a>");
            sb.Append("\r\n");
            sb.Append("时 间:" + postinfo.PostDateTime);
            Emails.SendEmailNotify(email, "[" + this.config.Forumtitle + "回复通知]" + this.topic.Title, sb.ToString());
        }
예제 #6
0
        public void OnClanDismissBtnClick()
        {
            if ((EMClanState)LogicDataCenter.clanDataManager.ClanBaseData.nState == EMClanState.emClanState_Dismissing)
            {
                // 取消解散联盟
                ViewEventHelper.Instance.SendCommand(GameLogicDef.GVIEWCMD_CLAN_CANCEL_DISMISS);
            }
            else
            {
                string dismissContent = ULocalizationService.Instance.Get("UIView", "ClanDetail", "DissmissContent_1");
                if (LogicDataCenter.clanDataManager.ClanBaseData.nKinCount > 1)
                {
                    int    dismissingLife = ASpeedGame.Data.ClanConfig.ClanConfig.Instance.tClanConfig.nDismissingLife;
                    string tips           = ObtainDismissTimeTip(dismissingLife);
                    dismissContent += String.Format(ULocalizationService.Instance.Get("UIView", "ClanDetail", "DissmissContent_2"), tips);
                }

                UBB.toHtml(ref dismissContent);
                TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "ClanDetail", "DissmissTitle"),
                    message: dismissContent,
                    buttons: new UIWidgets.DialogActions()
                {
                    { ULocalizationService.Instance.Get("UIView", "ClanDetail", "Confirm"), ClanDissmiss }, { ULocalizationService.Instance.Get("UIView", "ClanDetail", "Cancel"), null }
                }
                    );
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
            }
        }
예제 #7
0
        public void SetXPSkillInfo(int nSpellID)
        {
            if (nSpellID <= 0)
            {
                Debug.LogWarning("XPSKill," + nSpellID);
                return;
            }

            IntPtr Ptr = GameLogicAPI.getSpellData(nSpellID);

            if (Ptr == IntPtr.Zero)
            {
                Debug.LogWarning("XPSKill,Ptr == IntPtr.Zero," + nSpellID);
                return;
            }

            SPELL.SPELL_DATA spellData = IntPtrHelper.toData <SPELL.SPELL_DATA>(Ptr);
            IntPtr           strPtr    = GameLogicAPI.getSpellStrData(nSpellID, (int)SPELL_DATA_ID.SPDATA_DESC);
            String           szDesc    = IntPtrHelper.Ptr2Str(strPtr);

            Debug.Log("XPSKill," + spellData.nID + "," + szDesc + "," + nSpellID);

            UBB.toHtml(ref szDesc, UBB_FORMAT_TYPE.UGUI);

            slotTooltipTrigger.SetText(UTooltipParamName.BodyText, szDesc);
            slotTooltipTrigger.enabled = true;

            skillImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_Skill, WndID.WND_ID_WAR_XPSKILL, 1, spellData.nIcon);
            skillImage.gameObject.SetActive(true);

            xpSkillName = spellData.szName;
        }
예제 #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int tid = DNTRequest.GetInt("tid", 0);

        if (tid > 0)
        {
            //ShowtopicPagePostInfo info = Posts.GetSinglePost(tid);
            PostInfo postInfo = Posts.GetPostInfo(tid, Posts.GetFirstPostId(tid));
            if (postInfo != null)
            {
                //处理帖子内容
                PostpramsInfo postpramsinfo = new PostpramsInfo();
                postpramsinfo.Smileyoff   = postInfo.Smileyoff;
                postpramsinfo.Bbcodeoff   = postInfo.Bbcodeoff;
                postpramsinfo.Parseurloff = postInfo.Parseurloff;
                postpramsinfo.Allowhtml   = postInfo.Htmlon;
                postpramsinfo.Sdetail     = postInfo.Message;
                postpramsinfo.Pid         = postInfo.Pid;
                postpramsinfo.Showimages  = 1;

                //Discuz.Web.News.News

                //显示内容
                lblTitle.Text     = postInfo.Title;
                lblAuthor.Text    = postInfo.Poster;
                lblDatetime.Text  = postInfo.Postdatetime.ToString();
                content.InnerHtml = UBB.UBBToHTML(postpramsinfo);
            }
        }
    }
예제 #9
0
        public void StartTimer(int nTimerID, int nLeftTime, uint nCheckID, int nMatchType)
        {
            if (nMatchType == (int)EMMatchType.MatchType_NewPlayerGuide2)
            {
                GuideMatchTypeShow();
            }
            else
            {
                NormalMatchShow();
            }
            m_nMatchType = nMatchType;
            m_dwCheckID  = nCheckID;
            m_lEndTicks  = DateTime.Now.AddSeconds((double)nLeftTime).Ticks;
            m_bConfirm   = false;

            string strDes = String.Format(ULocalizationService.Instance.Get("UIView", "AcceptWaitInfo", "LeftTimeDesc"), nLeftTime);

            UBB.toHtml(ref strDes);
            LeftSecDes.text = strDes;
            LeftSecDes.gameObject.SetActive(true);

            strDes = String.Format(ULocalizationService.Instance.Get("UIView", "AcceptWaitInfo", "WaitTimeDesc"), nLeftTime);
            UBB.toHtml(ref strDes);
            WaitOtherSec.text = strDes;
            WaitOtherSec.gameObject.SetActive(false);
            CloseBtn.gameObject.SetActive(nMatchType != (int)EMMatchType.MatchType_NewPlayerGuide2);
            TimerManager.SetTimer(this, nTimerID, 1.0f);
            SoundManager.CreateUISound(ACCEPT_WAIT_SHOW_SOUNDID);
        }
예제 #10
0
        public void OpenRecordShareFrame()
        {
            string desc = String.Format(ULocalizationService.Instance.Get("UIView", "LifeHeroCulture", "ShareDesc"), EntityFactory.MainHeroView.Property.CreatureName);

            UBB.toHtml(ref desc);
            ShareDesc.text           = desc;
            shareConfirmBtnText.text = ULocalizationService.Instance.Get("UIView", "LifeHeroCulture", "NewChallenge");

            string imgFullPath = CaptureScreen.GetInstance().CaptureTempDir + "/" + shareImgName;

            if (File.Exists(imgFullPath))
            {
                byte[] imgData = ImageExtensions.GetAllByteData(imgFullPath);

                if (null != ShareRawImg)
                {
                    if (null == ShareRawImg.texture)
                    {
                        if (shareTex2D != null)
                        {
                            shareTex2D.LoadImage(imgData);
                        }
                        ShareRawImg.texture = shareTex2D;
                    }
                    ShareRawImg.gameObject.SetActive(true);
                }

                ShareBar.SetData(SocialSharingType.LifeHero, imgData);
            }
            RecordShareFrame.gameObject.SetActive(true);
        }
예제 #11
0
    public bool ParseWarTableGoodsTooltip(Value _tooltipElememts)
    {
        double _x, _y = 0;
        int    _nGoodsCost;
        string _strGoodsName, _strGoodsDes;

        if (_tooltipElememts.GetElement(5) == null)
        {
            return(false);
        }

        _strGoodsName = (string)_tooltipElememts.GetElement(5);
        _nGoodsCost   = (int)_tooltipElememts.GetElement(6);
        _strGoodsDes  = (string)_tooltipElememts.GetElement(7);
        //解析UBB
        UBB.toHtml(ref _strGoodsDes);
        //传数据到AS
        if (!Value.IsValueValid(WarPurchasedGoodsTooltip))
        {
            Trace.LogError("解析Tooltip类型时,发现WarPurchasedGoodsTooltip无实例对象");
            return(false);
        }
        //      public function SetText(_nGoodsCost:int,_strGoodsName:String,_strGoodsDes:String)
        if (WarPurchasedGoodsTooltip.Invoke("SetText", _nGoodsCost, _strGoodsName, _strGoodsDes) == null)
        {
            Trace.LogError("解析Tooltip类型时,执行WarSkillTooltip 的SetText操作失败");
            return(false);
        }
        double tipsHeight = (double)WarPurchasedGoodsTooltip.GetMember("height");
        double tipsWidth  = (double)WarPurchasedGoodsTooltip.GetMember("width");



        return(true);
    }
예제 #12
0
        private void setEquipTips(SSchemeMobaGoods goods)
        {
            UTooltipTrigger equipTipsTrigger = EquipImage.GetComponent <UTooltipTrigger>();

            if (equipTipsTrigger == null)
            {
                return;
            }

            int    nEquipID  = goods.GoodsID;
            string equipDesc = goods.GoodsDes;

            if (nEquipID <= 0)
            {
                equipTipsTrigger.enabled = false;
                return;
            }

            equipTipsTrigger.enabled = true;

            string sGoodsDes = equipDesc;

            UBBProperty.GetInstance().getRatio(sGoodsDes);
            UBB.toHtml(ref sGoodsDes, UBB_FORMAT_TYPE.UGUI);
            equipTipsTrigger.SetText(UTooltipParamName.ItemDesc, sGoodsDes);

            string sGoodsName = goods.GoodsName;

            UBB.toHtml(ref sGoodsName, UBB_FORMAT_TYPE.UGUI);
            equipTipsTrigger.SetText(UTooltipParamName.ItemName, sGoodsName);
            equipTipsTrigger.SetText(UTooltipParamName.ItemCost, goods.GoodsCost.ToString());
        }
예제 #13
0
        /// <summary>
        /// 发送邮件通知
        /// </summary>
        /// <param name="email">接收人邮箱</param>
        /// <param name="postinfo">帖子信息</param>
        /// <param name="jumpurl">跳转链接</param>
        public void SendNotifyEmail(string email, PostInfo postinfo, string jumpurl)
        {
            if (Utils.StrIsNullOrEmpty(email))
            {
                return;
            }

            StringBuilder sb_body   = new StringBuilder("# 回复: <a href=\"" + jumpurl + "\" target=\"_blank\">" + topic.Title + "</a>");
            string        cur_email = "";

            //发送人邮箱
            if (userid > 0)
            {
                cur_email = userinfo.Email.Trim();
            }

            sb_body.Append("\r\n");
            sb_body.Append("\r\n");
            sb_body.Append(UBB.ParseSimpleUBB(postinfo.Message));
            sb_body.Append("\r\n<hr/>");
            sb_body.Append("作 者:" + postinfo.Poster);
            sb_body.Append("\r\n");
            sb_body.Append("Email:<a href=\"mailto:" + cur_email + "\" target=\"_blank\">" + cur_email + "</a>");
            sb_body.Append("\r\n");
            sb_body.Append("URL:<a href=\"" + jumpurl + "\" target=\"_blank\">" + jumpurl + "</a>");
            sb_body.Append("\r\n");
            sb_body.Append("时 间:" + postinfo.Postdatetime);
            Emails.SendEmailNotify(email, "[" + config.Forumtitle + "回复通知]" + topic.Title, sb_body.ToString());
        }
예제 #14
0
        public void SetSkillShortcutKey(string keyCode)
        {
            if (string.IsNullOrEmpty(keyCode))
            {
                return;
            }

            if (KeyText == null)
            {
                return;
            }

            KeyText.text = keyCode;

            UTooltipTrigger skillTip = gameObject.GetComponent <UTooltipTrigger>();

            if (skillTip == null)
            {
                skillTip = gameObject.AddComponent <UTooltipTrigger>(ETooltipStyle.ETS_Default);
                skillTip.backgroundTint = Color.grey;
            }

            string sDesc = skillTip.parameterizedTextFields[0].value;

            if (string.IsNullOrEmpty(sDesc))
            {
                return;
            }

            UBBProperty.GetInstance().getRatio(sDesc);
            UBB.toHtml(ref sDesc, UBB_FORMAT_TYPE.UGUI);
            skillTip.SetText(UTooltipParamName.BodyText, sDesc);
        }
예제 #15
0
        public void SetReturnMatchState()
        {
            string str = "返回匹配邀请界面<br>暂未开始匹配";

            UBB.toHtml(ref str);
            ReturnMatchBtnDesc.text = str;
            ReturnMatchBtn.gameObject.SetActive(true);
        }
예제 #16
0
        public void Init()
        {
            UTooltipTrigger sendBtnToolTipTrigger = SendBtn.gameObject.GetComponent <UTooltipTrigger>();
            string          sendBtnTips           = ULocalizationService.Instance.Get("UIView", "SNS", "SendBtnTips");

            UBB.toHtml(ref sendBtnTips);
            sendBtnToolTipTrigger.SetText(UTooltipParamName.BodyText, sendBtnTips);
        }
예제 #17
0
        public void SetData()
        {
            m_taskID = LogicDataCenter.lifeHeroDataManager.PrizeTaskData;
            if (m_taskID >= 0 && m_taskID < LifeHeroConfig.Instance.LifeHeroPrizeList.Count)
            {
                this.gameObject.SetActive(true);
                Transform            container   = prizeItem.transform.parent;
                SSchemeLifeHeroPrize prizeConfig = LifeHeroConfig.Instance.LifeHeroPrizeList[m_taskID];
                m_prizeIDList = prizeConfig.prizeIDList;
                if (m_prizeIDList != null && m_prizeIDList.Count > 0)
                {
                    prizeItem.SetData(m_prizeIDList[0]);
                    int count = m_prizeIDList.Count - container.childCount;
                    int i;
                    if (count > 0)
                    {
                        for (i = 0; i < count; ++i)
                        {
                            PrizeItem item = Instantiate(prizeItem);
                            if (item != null)
                            {
                                item.transform.SetParent(container);
                                item.transform.localScale    = Vector3.one;
                                item.transform.localRotation = item.transform.localRotation;
                                item.transform.SetLocalPosition(Vector3.zero);
                            }
                        }
                    }

                    for (i = 0; i < m_prizeIDList.Count; ++i)
                    {
                        GameObject child = container.GetChild(i).gameObject;
                        child.SetActive(true);
                        child.GetComponent <PrizeItem>().SetData(m_prizeIDList[i]);
                    }
                    for (; i < container.childCount; ++i)
                    {
                        container.GetChild(i).gameObject.SetActive(false);
                    }
                }
                else
                {
                    Debug.LogWarningFormat("该级别无奖励ID。taskID={0}", m_taskID);
                }

                string desc = prizeConfig.prizeDesc;
                UBB.toHtml(ref desc);
                prizeDesc.text = desc;

                SetObtainBtn();
            }
            else
            {
                this.gameObject.SetActive(false);
            }
        }
        /// <summary>
        /// 保存信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SaveTopic_Click(object sender, EventArgs e)
        {
            #region 保存信息
            string tidlist = DNTRequest.GetString("forumtopicstatus");
            //当未选择主题时,则清除所有选择
            if (tidlist == "")
            {
                XmlDocumentExtender doc = new XmlDocumentExtender();
                doc.Load(configPath);
                doc.RemoveNodeAndChildNode("/Aggregationinfo/Aggregationdata/Websiteaggregationdata/Topiclist");
                doc.RemoveNodeAndChildNode("/Aggregationinfo/Aggregationpage/Website/Forum/Topiclist");
                doc.Save(configPath);
                Response.Redirect("aggregation_editforumaggset.aspx");
                return;
            }
            else
            {
                //得到所选择帖子信息
                DataTable dt = DatabaseProvider.GetInstance().GetTopicListByTidlist(tablelist.SelectedValue, tidlist);

                XmlDocumentExtender doc = new XmlDocumentExtender();
                doc.Load(configPath);
                //清除以前选择
                XmlNode topiclistnode        = doc.InitializeNode("/Aggregationinfo/Aggregationdata/Websiteaggregationdata/Topiclist");
                XmlNode websitetopiclistnode = doc.InitializeNode("/Aggregationinfo/Aggregationpage/Website/Forum/Topiclist");

                tidlist = DNTRequest.GetString("tid");
                foreach (DataRow dr in dt.Rows)
                {
                    //创建Topic节点
                    XmlElement topic = doc.CreateElement("Topic");
                    doc.AppendChildElementByDataRow(ref topic, dt.Columns, dr, "tid,message");
                    doc.AppendChildElementByNameValue(ref topic, "topicid", dr["tid"].ToString());
                    string tempubbstr = UBB.ClearUBB(dr["message"].ToString());
                    if (tempubbstr.Length > 200)
                    {
                        tempubbstr = tempubbstr.Substring(0, 200) + "...";
                    }

                    doc.AppendChildElementByNameValue(ref topic, "shortdescription", tempubbstr, true);
                    doc.AppendChildElementByNameValue(ref topic, "fulldescription", UBB.ClearUBB(dr["message"].ToString()), true);
                    topiclistnode.AppendChild(topic);


                    if (("," + tidlist + ",").IndexOf("," + dr["tid"].ToString() + ",") >= 0)
                    {
                        websitetopiclistnode.AppendChild(topic.Clone());
                    }
                }
                doc.Save(configPath);
                AggregationFacade.BaseAggregation.ClearAllDataBind();
                Response.Redirect("aggregation_editforumaggset.aspx");
            }
            #endregion
        }
예제 #19
0
    private bool ParseDefaultTooltip(Value _tooltipElememts)
    {
        bool res = true;

        double _x, _y = 0;
        double _w, _h = 0;

        string _defaultText;

        /*
         *  元素0:目标的x坐标
         *  元素1:目标的y坐标
         *  元素2:目标的宽
         *  元素3:目标的高
         *  元素4:目标DefaultText内容
         */
        if (_tooltipElememts.GetArraySize() > 0)
        {
            _x = (double)_tooltipElememts.GetElement(0);
            _y = (double)_tooltipElememts.GetElement(1);
            _w = (double)_tooltipElememts.GetElement(2);
            _h = (double)_tooltipElememts.GetElement(3);

            if (_tooltipElememts.GetElement(4) == null)
            {
                return(false);
            }
            _defaultText = (string)_tooltipElememts.GetElement(4);
            //解析UBB
            UBB.toHtml(ref _defaultText);

            if (!Value.IsValueValid(DefaultTooltip))
            {
                Trace.LogError("解析Tooltip类型时,发现DefaultTooltip无实例对象");
                return(false);
            }

            if (DefaultTooltip.Invoke("SetText", _defaultText) == null)
            {
                Trace.LogError("解析Tooltip类型时,执行DefaultTooltip 的SetText操作失败");
                return(false);
            }
            //设置完内容后重新计算
            //_y -=  DefaultTooltip.GetMember("height");
            ////按比例调整偏移,目前发现好像不需要加偏移
            ////_x -= _curAspRatioOffset.x;
            //_y -= _curAspRatioOffset.y;
            CalTooltipPostion(ref _x, ref _y, _w, _h, DefaultTooltip);


            //让AS显示
            ShowTooltipEx(DefaultTooltip, _x, _y);
        }
        return(res);
    }
예제 #20
0
        public virtual void SetData(UListItemRankRecord item)
        {
            if (item.node.wSeasonID <= 0)
            {
                BgIcon.gameObject.SetActive(true);
                ItemView.SetActive(false);
                BgIcon.raycastTarget = false;
                return;
            }
            BgIcon.gameObject.SetActive(true);
            BgIcon.raycastTarget = true;
            ItemView.SetActive(true);

            DateTime beginTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Unspecified).AddSeconds(item.node.nBeginTime);

            beginTime = beginTime.ToLocalTime();
            DateTime endTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Unspecified).AddSeconds(item.node.nEndTime);

            endTime     = endTime.ToLocalTime();
            Season.text = string.Format("({0}){1}年{2}月--{3}年{4}月", item.node.szSeasonTitle, beginTime.Year, beginTime.Month, endTime.Year, endTime.Month);

            int    nMatchType  = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_MATCHTYPE);
            IntPtr ptr         = GameLogicAPI.getActorRankNameByGrade(nMatchType, item.node.wRankGrade);
            string strRankName = "";

            if (ptr != IntPtr.Zero)
            {
                strRankName = IntPtrHelper.Ptr2Str(ptr);
            }
            Rank.text = strRankName;

            WinCount.text = item.node.wWinCount.ToString();

            float fWinPro = item.node.wMatchCount > 0 ? (float)item.node.wWinCount / item.node.wMatchCount : 0;

            WinPro.text = string.Format("{0:F0}%", fWinPro * 100);

            int nIndex = 0;

            for (int i = 0; i < item.node.wHeroRecord.Length; i = i + 3)
            {
                int   nHeroID     = item.node.wHeroRecord[i];
                int   nMatchCount = item.node.wHeroRecord[i + 1];
                int   nWinCount   = item.node.wHeroRecord[i + 2];
                float fHeroWinPro = nMatchCount > 0 ? (float)nWinCount / nMatchCount : 0;

                MostUseHero[nIndex].sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_HeadPortrait, WndID.WND_ID_RANK_RECORD, 1, 4, nHeroID);

                string strTip = String.Format("胜率:{0}%<br>总场次:{1}", fHeroWinPro * 100, nMatchCount);
                UBB.toHtml(ref strTip);
                MostUseHeroTrigger[nIndex].SetText(UTooltipParamName.BodyText, strTip);

                nIndex++;
            }
        }
예제 #21
0
        private void UpdateRandLoadingTip()
        {
            SSchemeLoadingWarTip tip = LoadingWarTipConfig.Instance.GetRandTipConfig();

            if (tip != null)
            {
                string strTemp = tip.sTipContent;
                UBB.toHtml(ref strTemp);
                TipDesc.text = strTemp;
            }
        }
예제 #22
0
        public void OnShipValDropdownChanged()
        {
            if (masterShipTooltipTrigger == null)
            {
                masterShipTooltipTrigger = masterSumShipTrans.transform.GetComponentInChildren <UTooltipTrigger>(true);
            }

            if (prenticeShipTooltipTrigger == null)
            {
                prenticeShipTooltipTrigger = prenticeSumShipTrans.transform.GetComponentInChildren <UTooltipTrigger>(true);
            }

            String szMasterDesc   = "";
            String szPrenticeDesc = "";

            int masterSumShip   = 0;
            int prenticeSumShip = 0;
            cmd_mentorship_person_baseinfo personData = LogicDataCenter.mentorshipDataManager.MentorshipPersonData;

            if (personData.nPDBID > 0)
            {
                masterSumShip   = personData.nMSumShipVal;
                prenticeSumShip = personData.nPSumShipVal;

                szMasterDesc = ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "MWeekShipTitleDesc") + ":" + personData.nMWeekShipVal.ToString() + "\n"
                               + ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "MLastWeekShipTitleDesc") + ":" + personData.nMLastWeekShipVal.ToString() + "\n"
                               + ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "MLastWeekOrderDesc") + ":" + personData.nMLastSVOrder.ToString();

                szPrenticeDesc = ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "PWeekShipTitleDesc") + ":" + personData.nPWeekShipVal.ToString() + "\n"
                                 + ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "PLastWeekShipTitleDesc") + ":" + personData.nPLastWeekShipVal.ToString() + "\n"
                                 + ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "PLastWeekOrderDesc") + ":" + personData.nPLastSVOrder.ToString();
            }
            else
            {
                szMasterDesc = ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "MWeekShipTitleDesc") + ":0" + "\n"
                               + ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "MLastWeekShipTitleDesc") + ":0" + "\n"
                               + ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "MLastWeekOrderDesc") + ":0";

                szPrenticeDesc = ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "PWeekShipTitleDesc") + ":0" + "\n"
                                 + ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "PLastWeekShipTitleDesc") + ":0" + "\n"
                                 + ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "PLastWeekOrderDesc") + ":0";
            }

            mastserSumShipText.text  = ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "MSumShipTitleDesc");
            prenticeSumShipText.text = ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "PSumShipTitleDesc");
            masterSumShipVal.text    = masterSumShip.ToString();
            prenticeSumShipVal.text  = prenticeSumShip.ToString();

            UBB.toHtml(ref szMasterDesc, UBB_FORMAT_TYPE.UGUI);
            masterShipTooltipTrigger.SetText(UTooltipParamName.BodyText, szMasterDesc);

            UBB.toHtml(ref szPrenticeDesc, UBB_FORMAT_TYPE.UGUI);
            prenticeShipTooltipTrigger.SetText(UTooltipParamName.BodyText, szPrenticeDesc);
        }
예제 #23
0
        //public Image DefaultBG;

        public virtual void SetData(UListItemClanEvent item)
        {
            if (DefalutBGSprite == null)
            {
                DefalutBGSprite = ComponentBG.sprite;
            }

            string sEventDesc = item.ClanEventDes;

            UBB.toHtml(ref sEventDesc, UBB_FORMAT_TYPE.UGUI);
            ClanEventDes.text = sEventDesc;
        }
예제 #24
0
파일: ClanTipWnd.cs 프로젝트: zwong91/Titan
        public override bool Init(IUISubWnd wnd)
        {
            string sClanTip = ClanConfig.Instance.tClanConfig.sClanTip;

            if (!sClanTip.Equals(string.Empty))
            {
                UBB.toHtml(ref sClanTip, UBB_FORMAT_TYPE.UGUI);
                ClanTip.text = sClanTip;
            }

            return(base.Init(wnd));
        }
예제 #25
0
 /// 外部调用UI上系统飘字信息
 public void onBroadFloatTextSystem(string stTextInfo = "", int nPosType = 0, int nTime = 0)
 {
     if (MyRoot != null && MyRoot.IsValid())
     {
         string stInfo = stTextInfo;
         UBB.toHtml(ref stInfo);
         if (null == MyRoot.Invoke("onBroadFloatTextSystem", stInfo, nPosType, nTime))
         {
             Trace.LogError("onBroadFloatTextSystem invoke == NULL stInfo = " + stInfo + ", nPosType = " + nPosType + "nTime = " + nTime);
         }
     }
 }
예제 #26
0
 private void ShowDialog(string title, string content, DialogActions buttons)
 {
     UBB.toHtml(ref content);
     USpeedUI.TooltipAndDialog.UIDialogData data = new USpeedUI.TooltipAndDialog.UIDialogData(
         title: title,
         message: content,
         modal: true,
         hideByModalClick: false,
         buttons: buttons
         );
     UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
 }
예제 #27
0
        public void OnPointerEnter(UnityEngine.EventSystems.PointerEventData eventData)
        {
            if (string.IsNullOrEmpty(m_sEquipDesc) || playerEquipTipsTrigger == null)
            {
                return;
            }

            string sGoodsDes = m_sEquipDesc;

            UBBProperty.GetInstance().getRatio(sGoodsDes);
            UBB.toHtml(ref sGoodsDes, UBB_FORMAT_TYPE.UGUI);
            playerEquipTipsTrigger.SetText(UTooltipParamName.ItemDesc, sGoodsDes);
        }
예제 #28
0
        public void SetData()
        {
            Title.text = "排位赛";

            string strTip = ULocalizationService.Instance.Get("UIView", "RankSeason", "TitleTip");

            UBB.toHtml(ref strTip);
            Trigger.SetText(UTooltipParamName.BodyText, strTip);

            LadderBtnDesc.text = "排行榜";
            RecordBtnDesc.text = "历史记录";
            StartBtnDesc.text  = "开始匹配";
        }
예제 #29
0
        public void SetRuneSlotShow(ref Dictionary <int, int> dicAllRuneSlotInfo)
        {
            for (int i = 0; i < arrayRuneSlot.Length; i++)
            {
                int nSlotId = i + 1;
                if (!dicAllRuneSlotInfo.ContainsKey(nSlotId))
                {
                    this.arrayRuneSlot[nSlotId - 1].transform.FindChild("Sprite").gameObject.SetActive(false);
                    continue;
                }

                int nRuneId = dicAllRuneSlotInfo[nSlotId];//id->iconid
                if (nRuneId == 0)
                {
                    this.arrayRuneSlot[nSlotId - 1].transform.FindChild("Sprite").gameObject.SetActive(false);
                    continue;
                }

                SSchemeRuneConfig runeConfig = RunePage.Instance.allRunePageTable[nRuneId] as SSchemeRuneConfig;
                if (runeConfig == null)
                {
                    continue;
                }

                this.arrayRuneSlot[nSlotId - 1].transform.FindChild("Sprite").gameObject.GetComponent <Image>().sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_Rune, WndID.WND_ID_PLAYERFRAME, runeConfig.nRuneInlayType, runeConfig.nRuneIconId);
                this.arrayRuneSlot[nSlotId - 1].transform.FindChild("Sprite").gameObject.SetActive(true);

                UTooltipTrigger slotTooltipTrigger = this.arrayRuneSlot[nSlotId - 1].gameObject.GetComponent <UTooltipTrigger>();
                if (slotTooltipTrigger == null)
                {
                    slotTooltipTrigger = this.arrayRuneSlot[nSlotId - 1].gameObject.AddComponent <UTooltipTrigger>(ETooltipStyle.ETS_Default);
                    slotTooltipTrigger.backgroundTint = Color.grey;
                    slotTooltipTrigger.IsUpStay       = false;
                }

                if (runeConfig == null)
                {
                    slotTooltipTrigger.SetText(UTooltipParamName.BodyText, "EmptyDesc");
                    return;
                }

                if (runeConfig.szParametersValueArray == "")
                {
                    slotTooltipTrigger.SetText(UTooltipParamName.BodyText, "EmptyDesc");
                    return;
                }

                UBB.toHtml(ref runeConfig.szRuneDESC, UBB_FORMAT_TYPE.UGUI);
                slotTooltipTrigger.SetText(UTooltipParamName.BodyText, runeConfig.szRuneDESC);
            }
        }
예제 #30
0
        // 初始化
        public override bool Init(IUIWnd wnd)
        {
            base.Init(wnd);

            TitleDesc.text = ULocalizationService.Instance.Get("UIView", "Common", "TipText");
            string szTip = ULocalizationService.Instance.Get("UIView", "Task", "ReflushTip");

            UBB.toHtml(ref szTip);
            TipDesc.text        = szTip;
            BtnDesc.text        = ULocalizationService.Instance.Get("UIView", "Task", "ReflushNow");
            MoneyTitleDesc.text = ULocalizationService.Instance.Get("UIView", "Task", "ReflushMoney");

            return(true);
        }