示例#1
0
    public void initWindow(Card oldCard, CallBackMsg call)
    {
        callback = call;
        int value = 0;
        CardBaseAttribute oldCardAttr = CardManagerment.Instance.getCardAllWholeAttr(oldCard);
        BloodPointSample  pointSample = BloodConfigManager.Instance.getBloodPointSampleBySid(CardSampleManager.Instance.getBloodSid(oldCard.sid));

        if (pointSample != null)
        {
            BloodItemSample itemSample = BloodItemConfigManager.Instance.getBolldItemSampleBySid(BloodConfigManager.Instance.getCurrentItemSid(pointSample, oldCard.cardBloodLevel));
            if (itemSample == null)
            {
                return;
            }
            bloodEffect[] effect = itemSample.effects;
            for (int i = 0; i < effect.Length; i++)
            {
                value = effect[i].perAllAttr;
            }
        }
        int[] costs = CommandConfigManager.Instance.getEvoCostByQuality(oldCard.getQualityId());
        oldEvoLevel.text      = oldCard.getEvoLevel() + "";
        newEvoLevel.text      = oldCard.getEvoLevel() + "[FF0000]-" + (oldCard.getEvoLevel() - oldCard.getEvoLevelForBlood(oldCard.getEvoTimes() == 0 ? costs[0] : costs[oldCard.getEvoTimes() - 1])) + "[-]";
        oldCombat.text        = oldCard.getCardCombat() + "";
        newCombat.text        = oldCard.getCardCombat() + "[358C35]+" + value + "%" + "[-]";
        oldQuality.spriteName = QualityManagerment.qualityIDToStringByBG(oldCard.getQualityId());
        newQuality.spriteName = QualityManagerment.qualityIDToStringByBG(oldCard.getQualityId() + 1);
    }
示例#2
0
 public static void ShowConfirm(string msg, CallBackMsg callback, bool dialogCloseUnlockUI)
 {
     UiManager.Instance.openDialogWindow <MessageWindow> ((win) => {
         win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("s0093"), msg, callback);
         win.dialogCloseUnlockUI = dialogCloseUnlockUI;
     });
 }
示例#3
0
        /// <summary>
        /// 直接分析对象数据,把数据转换为单据数据
        /// </summary>
        internal static HashObject AnalysisData(string suser, IList data, CallBackMsg callBack)
        {
            try
            {
                List <CatchDataTemplate> tlist = new List <CatchDataTemplate>();
                foreach (HashObject item in data)
                {
                    tlist.Add(new CatchDataTemplate()
                    {
                        Status = item.GetValue <string>("status"), DetailContent = item.GetValue <HashObject>("detail").GetValue <string>("content")
                    });
                }
                callBack("开始拆分数据");
                DataTable table = TaobaoDataHelper.SpliteContentToDataTable(suser, tlist);
                callBack("数据拆分完成");
                HashObjectList billList   = new HashObjectList();
                HashObjectList detailList = new HashObjectList();

                callBack("开始组装数据");
                BuildBillDataFromTable(suser, false, table, billList, detailList, null, null);
                callBack("数据组装完成");
                HashObject list = new HashObject();
                list.Add("bill", billList);
                list.Add("detail", detailList);
                return(list);
            }
            catch (Exception e)
            {
                callBack(string.Format("Exception:{0}", e.Message));
            }
            return(null);
        }
示例#4
0
 public void clearMem(CallBackMsg msg)
 {
     //踢人时给提示
     UiManager.Instance.openDialogWindow <MessageWindow> ((win) => {
         win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("s0093"), null, msg);
     });
 }
示例#5
0
 public void initWindow(int buttonNum, string button1Name, string button2Name, string content, CallBackMsg call, MessageAlignType alignType)
 {
     callback = call;
     initButton(buttonNum, button1Name, button2Name);
     SetAlignType(alignType);
     initInformation(content);
 }
 void getDataSuccess()
 {
     useRMBRush = false;
     callback   = doRush;
     updateInfo();
     reloadShop();
     MaskWindow.UnlockUI();
 }
 void MessageWindowShowConfirm(string msg, CallBackMsg callback)
 {
     MessageWindow.ShowConfirm(msg, (ev) => {
         if (callback != null)
         {
             callback(ev);
         }
     });
 }
示例#8
0
    public void access(string name, string costType, int autoJoin, CallBackMsg callback)
    {
        this.callback = callback;
        ErlKVMessage message = new ErlKVMessage(FrontPort.CREATE_GUILD);

        message.addValue("consume", new ErlString(costType));
        message.addValue("guildname", new ErlString(name));
        message.addValue("auto_join", new ErlInt(autoJoin));
        access(message);
    }
示例#9
0
    //最原始的初始化
    public void init(object obj, int numberMax, int numberMin, int numberNow, int numberSetp, CallBackMsg callback)
    {
        msg           = new MessageHandle();
        msg.msgInfo   = obj;
        item          = obj;
        this.callback = callback;
        setp          = numberSetp;
        max           = numberMax;
        min           = numberMin;
        now           = numberNow;
        coverDistanceToOne();
        updateDisplayeNumber();
        GoodsView tmpGoodsView = CreateGoodsView();
        Prop      prop         = item as Prop;

        tmpGoodsView.init(prop);
        switch (prop.sid)
        {
        case 71197:
            costProp = PropManagerment.Instance.createProp(71196);
            break;

        case 71198:
            costProp = PropManagerment.Instance.createProp(71197);
            break;

        case 71199:
            costProp = PropManagerment.Instance.createProp(71198);
            break;

        case 71200:
            costProp = PropManagerment.Instance.createProp(71199);
            break;
        }
        goodsName.text  = prop.getName();
        goods1Name.text = costProp.getName();
        goods2Name.text = costProp.getName();
        Utils.DestoryChilds(goodsPoint1);
        GameObject obj1     = NGUITools.AddChild(goodsPoint1, goodsViewProfab) as GameObject;
        GoodsView  obj1View = obj1.transform.GetComponent <GoodsView>();

        if (StorageManagerment.Instance.getProp(costProp.sid) != null)
        {
            obj1View.init(costProp, StorageManagerment.Instance.getProp(costProp.sid).getNum());
        }

        Utils.DestoryChilds(goodsPoint2);
        GameObject obj2     = NGUITools.AddChild(goodsPoint2, goodsViewProfab) as GameObject;
        GoodsView  obj2View = obj2.transform.GetComponent <GoodsView>();

        if (StorageManagerment.Instance.getProp(costProp.sid) != null)
        {
            obj2View.init(costProp, StorageManagerment.Instance.getProp(costProp.sid).getNum());
        }
    }
示例#10
0
 public new static void ShowConfirm(string msg, CallBackMsg callback)
 {
     UiManager.Instance.openDialogWindow <SystemMessageWindow>((win) => {
         if (win.fatherWindow.name == "LotteryWindow")
         {
             UiManager.Instance.getWindow <LotteryWindow>().buyBtnCollider.enabled    = false;
             UiManager.Instance.getWindow <LotteryWindow>().randomBtnCollider.enabled = false;
             UiManager.Instance.getWindow <LotteryWindow>().handBtnCollider.enabled   = false;
         }
         win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("s0093"), msg, callback);
     });
 }
示例#11
0
 public void initWindow(int buttonNum, string button1Name, string button2Name, string content, CallBackMsg call, bool isSystemMsg)
 {
     callback = call;
     initButton(buttonNum, button1Name, button2Name);
     SetAlignType(MessageAlignType.center);
     initInformation(content);
     this.isSystemMsg = isSystemMsg;
     if (this.isSystemMsg)
     {
         gameObject.GetComponent <UIPanel> ().depth = 10000;
     }
 }
示例#12
0
 /// <summary>
 /// 初始化数据
 /// </summary>
 /// <param name="_tmpProp">需求抵扣道具.</param>
 /// <param name="_exValue">道具抵扣价值.</param>
 /// <param name="_needValue">提升需求RMB.</param>
 /// <param name="callback">回调.</param>
 public void init(Prop _tmpProp, int _exValue, int _needValue, CallBackMsg _callBack)
 {
     needValue     = _needValue;
     tmpProp       = _tmpProp;
     exValue       = _exValue;
     msg           = new MessageHandle();
     msg.msgInfo   = _tmpProp;
     this.callback = _callBack;
     tmpPropView   = CreateItem();
     max           = getMaxValue();
     showUI();
     coverDistanceToOne();
 }
示例#13
0
 public void initWindow(int buttonNum, string button1Name, string button2Name, string content, bool showCloseButton, CallBackMsg call, MessageAlignType alignType)
 {
     this.showCloseButton = showCloseButton;
     closeButton.SetActive(false);
     if (showCloseButton)
     {
         closeButton.SetActive(true);
     }
     callback = call;
     initButton(buttonNum, button1Name, button2Name);
     SetAlignType(alignType);
     initInformation(content);
 }
示例#14
0
 //是否可以退会,判断是公会的最后一个成员
 public void exitGuild(CallBackMsg msg)
 {
     if (guild.membership == EXITGUILDMEMBER)
     {
         //当公会最后一个人退会时给提示
         UiManager.Instance.openDialogWindow <MessageWindow> ((win) => {
             win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("s0093"), null, msg);
         });
     }
     else
     {
         //给提示,是否确定退会
         UiManager.Instance.openDialogWindow <MessageWindow> ((win) => {
             win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("s0093"), null, msg);
         });
     }
 }
示例#15
0
    //最原始的初始化
    public void Initialize(Exchange exc, int numberMax, CallBackMsg callback)
    {
        msg         = new MessageHandle();
        msg.msgInfo = exc;
        ExchangeSample sample = exc.getExchangeSample();

        this.callback = callback;
        setp          = 1;
        max           = numberMax;
        min           = 1;
        if (GuideManager.Instance.guideSid == GuideGlobal.SPECIALSID26)
        {
            now = 1;
        }
        else
        {
            now = numberMax;
        }

        updateDisplayeNumber();


        //	setNumber (goods);
        if (sample.type == PrizeType.PRIZE_CARD)
        {
            Card showCard = CardManagerment.Instance.createCard(sample.exchangeSid);
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + showCard.getImageID(), itemImage);
            //	itemImage.transform.localScale = bigPic;
            titleText.text = showCard.getName();
        }
        else if (sample.type == PrizeType.PRIZE_EQUIPMENT)
        {
            Equip showEquip = EquipManagerment.Instance.createEquip(sample.exchangeSid);
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + showEquip.getIconId(), itemImage);
            //itemImage.transform.localScale = new Vector3 (90, 90, 0);
            titleText.text = showEquip.getName();
        }
        else if (sample.type == PrizeType.PRIZE_PROP)
        {
            Prop showProp = PropManagerment.Instance.createProp(sample.exchangeSid);
            ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + showProp.getIconId(), itemImage);
            //	itemImage.transform.localScale = new Vector3 (90, 90, 0);
            titleText.text = showProp.getName();
        }
    }
    //最原始的初始化
    public void init(object obj, int numberMax, int numberMin, int numberNow, int numberSetp, CallBackMsg callback)
    {
        msg           = new MessageHandle();
        msg.msgInfo   = obj;
        item          = obj as Prop;
        this.callback = callback;
        setp          = numberSetp;
        max           = numberMax;
        min           = numberMin;
        now           = numberNow;
        coverDistanceToOne();
        updateGetNum();
        updateDisplayeNumber();
        calculateTotal();
        GoodsView tmpGoodsView = CreateGoodsView();

        currentHaveNum.text = numberMax.ToString();
        tmpGoodsView.init(item);
        tmpGoodsView.rightBottomText.text = "";
        titleText.text = item.getName();
    }
 //最原始的初始化
 public void init(object obj, int numberMax, int numberMin, int numberNow, int numberSetp, int costType, CallBackMsg callback)
 {
     msg           = new MessageHandle();
     msg.msgInfo   = obj;
     item          = obj;
     this.callback = callback;
     setp          = numberSetp;
     max           = numberMax;
     min           = numberMin;
     now           = numberNow;
     coverDistanceToOne();
     this.costType = costType;
     updateCoinIcon();
     updateDisplayeNumber();
     calculateTotal();
     if (obj.GetType() == typeof(Goods))
     {
         Goods good = item as Goods;
         Prop  p    = PropManagerment.Instance.createProp(good.getGoodsSid());
         if (p != null)
         {
             nameBg.text   = QualityManagerment.getQualityColor(p.getQualityId()) + p.getName() + "[-]";
             nameDecc.text = LanguageConfigManager.Instance.getLanguage("s03l6", now.ToString(), p.getName());
         }
         titleText.text = (obj as Goods).getName();
         ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + good.getIconId(), goodsTexture);
         goodsTexture.gameObject.SetActive(true);
         goodsBg.gameObject.SetActive(true);
         if (good.getGoodsType() == PrizeType.PRIZE_EQUIPMENT)
         {
             goodsBg.spriteName = QualityManagerment.qualityIDToIconSpriteName(EquipmentSampleManager.Instance.getEquipSampleBySid(good.getGoodsSid()).qualityId);
         }
         else if (good.getGoodsType() == PrizeType.PRIZE_PROP)
         {
             goodsBg.spriteName = QualityManagerment.qualityIDToIconSpriteName(PropSampleManager.Instance.getPropSampleBySid(good.getGoodsSid()).qualityId);
         }
     }
 }
示例#18
0
 public static void ShowConfirm(string msg, CallBackMsg callback, MessageAlignType alignType)
 {
     UiManager.Instance.openDialogWindow <MessageWindow> ((win) => {
         win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("s0093"), msg, callback, alignType);
     });
 }
 //有大小限制的选择
 public void init(object obj, int numberMax, int numberMin, CallBackMsg callback)
 {
     init(obj, numberMax, numberMin, 1, 1, callback);
 }
示例#20
0
        internal static string SaveData(string suser, CallBackMsg callBack, bool onlyAdd = true)
        {
            DataTable table = TaobaoDataHelper.SpliteContentToDataTableByUser(suser, AppUtils.ConnectionString, true);

            if (table.Rows.Count == 0)
            {
                return("OK:没有需要分析的数据");
            }

            using (DbHelper db = AppUtils.CreateDbHelper())
            {
                try
                {
                    string         ids        = GetTaobaoBillID(table);
                    HashObjectList billList   = new HashObjectList();
                    HashObjectList detailList = new HashObjectList();

                    callBack("开始分析数据");
                    callBack("开始构建数据");

                    BuildBillDataFromTable(suser, onlyAdd, table, billList, detailList, db, ids, false);

                    StringBuilder insertBillDetailBuilder = new StringBuilder(@"insert into billdetail(id, bid, code, size, amount, color, address,area,total, remark, 
                        ltotal,sourceTitle,goodsstatus,sendway, btotal) values");
                    string        sDetailFormate          = "({0}, {1}, '{2}', '{3}', '{4}','{5}', '{6}', '{7}', {8}, '{9}',{10}, '{11}', {12}, '{13}', {14}),";
                    foreach (HashObject item in detailList)
                    {
                        //构建明细数据
                        insertBillDetailBuilder.AppendFormat(sDetailFormate, item["id"], item["bid"], item["code"], item["size"], item["amount"], item["color"], item["address"], item["area"], item["total"], item["remark"], item["ltotal"], item["sourceTitle"], item["goodsstatus"], item["sendway"], item["btotal"]);
                    }

                    string insertBillDetail = insertBillDetailBuilder.ToString();
                    insertBillDetail = insertBillDetail.Substring(0, insertBillDetail.Length - 1);


                    StringBuilder doedIds           = new StringBuilder();//影响到的主数据
                    StringBuilder insertBillBuilder = new StringBuilder(@"insert into bill(id, date, taobaocode,cname,ctel,caddress,carea,cremark,
                        ltotal,status, scode, sname, uid, goodsstatus, billfrom, createdate, zfbpaycode,tbcode, total, btotal, senddate, successdate, `user`) values");
                    foreach (HashObject item in billList)
                    {
                        StringBuilder sformate = new StringBuilder("({0}, '{1}', '{2}', '{3}', '{4}','{5}', '{6}', '{7}', {8}, {9},'{10}', '{11}', {12}, {13}, '{14}','{15}', '{16}', '{17}', {18},{19} ");
                        sformate.Append(IsNullDate(item["senddate"]) ? ",{20}" : ",'{20}'");
                        sformate.Append(IsNullDate(item["successdate"]) ? ",{21}" : ",'{21}'");
                        sformate.Append(",'{22}'");
                        sformate.Append("), ");
                        doedIds.AppendFormat("{0},", item["id"]);
                        //构建主表数据,如果已经存在,直接更改数据
                        insertBillBuilder.AppendFormat(sformate.ToString(), item["id"], item["date"], item["taobaocode"], item["cname"], item["ctel"], item["caddress"], item["carea"], item["cremark"],
                                                       item["ltotal"], item["status"], item["scode"], item["sname"], item["uid"], item["goodsstatus"], item["billfrom"], item["createdate"], item["zfbpaycode"], item["tbcode"], item["total"], item["btotal"], item["senddate"], item["successdate"], suser);
                    }
                    string insertBill = insertBillBuilder.ToString();
                    insertBill = insertBill.Substring(0, insertBill.Length - 2);

                    callBack("构建数据完毕");
                    callBack("开始保存数据");
                    if (billList.Count != 0)
                    {
                        db.BeginTransaction();
                        db.BatchExecute(string.Format("update tbill set hasupdate=0 where bid in {0}", ids));
                        db.BatchExecute(string.Format("{0} on duplicate key update `createdate`=values(`createdate`),`senddate`=values(`senddate`),`successdate`=values(`successdate`),`zfbpaycode`=values(`zfbpaycode`),`status`=values(`status`),`sname`=values(`sname`),`scode`=values(`scode`);", insertBill));
                        if (detailList.Count != 0)
                        {
                            db.BatchExecute(insertBillDetail);//直接新增,不修改
                        }
                        //后期退款的单据,金额都为0
                        db.BatchExecute(string.Format("update bill set ltotal = 0, total=0, btotal=0 where status=9 and id in ({0})", doedIds.ToString().Substring(0, doedIds.Length - 1)));
                        db.CommitTransaction();
                    }
                    return(string.Format("OK:数据保存成功,分析处理了{0}条数据", billList.Count));
                }
                catch (Exception e1)
                {
                    if (db.HasBegunTransaction)
                    {
                        db.RollbackTransaction();
                    }
                    return(string.Format("Exception:{0}", e1.Message));
                }
            }
        }
示例#21
0
 //创建两个按钮(确定取消)的提示窗
 public void createMessageWindowByTwoButton(string str, CallBackMsg callback)
 {
     openDialogWindow <MessageWindow> ((win) => {
         win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("s0093"), str, callback);
     });
 }
 //最脑残的选择
 public void init(object obj, int costType, CallBackMsg callback)
 {
     init(obj, 100, 1, 1, 1, costType, callback);
 }
示例#23
0
 public void initWindow(string content, ArrayList cardList, CallBackMsg back)
 {
     callback = back;
     cardContent.reLoad(cardList);
 }
    public void initWindow(int buttonNum, string button1Name, string button2Name, string content, CallBackMsg call, List <PrizeSample> pList)
    {
//		if (arrValues != null) {
//			for (int i=0; i<arrValues.Length; i++) {
//				numLabel [i].text = arrValues [i].ToString ();
//			}
//		}
//		if (resolveTexture != null) {
//			for (int i = 0; i < textureNames.Length; i++) {
//				ResourcesManager.Instance.LoadAssetBundleTexture (textureNames [i], resolveTexture [i]);
//			}
//		}
        if (pList != null && pList.Count > 0)
        {
            for (int i = 0; i < pList.Count; i++)
            {
                numLabel [i].text = pList[i].num;
                ResourcesManager.Instance.LoadAssetBundleTexture(pList [i].getIconPath(), resolveTexture [i]);
            }
        }
        initWindow(buttonNum, button1Name, button2Name, content, call);
    }
示例#25
0
    //最原始的初始化
    public void init(object obj, int numberMax, int numberMin, int numberNow, int numberSetp, int costType, CallBackMsg callback)
    {
        msg           = new MessageHandle();
        msg.msgInfo   = obj;
        item          = obj;
        this.callback = callback;
        setp          = numberSetp;
        max           = numberMax;
        min           = numberMin;
        now           = numberNow;
        coverDistanceToOne();
        this.costType = costType;
        updateCoinIcon();
        updateDisplayeNumber();
        calculateTotal();
        goodsTexture.gameObject.SetActive(false);
        goodsBg.gameObject.SetActive(false);
        GoodsView tmpGoodsView = CreateGoodsView();

        if (obj.GetType() == typeof(Goods) || obj.GetType() == typeof(NoticeActiveGoods))
        {
            Goods good = item as Goods;
            tmpGoodsView.init(good.getGoodsType(), good.getGoodsSid(), good.getGoodsShowNum());
            titleText.text = (obj as Goods).getName();
            if (good.getGoodsType() == GoodsType.EQUIP)
            {
                currentHaveNum.text = LanguageConfigManager.Instance.getLanguage("pveUse09", StorageManagerment.Instance.getEquipsBySid(good.getGoodsSid()).Count.ToString());
            }
            else if (good.getGoodsType() == GoodsType.TOOL)
            {
                currentHaveNum.text = LanguageConfigManager.Instance.getLanguage("pveUse09", StorageManagerment.Instance.getProp(good.getGoodsSid()) == null ? "0" : StorageManagerment.Instance.getProp(good.getGoodsSid()).getNum().ToString());
            }
        }
        else if (obj.GetType() == typeof(Prop))
        {
            Prop prop = item as Prop;
            tmpGoodsView.init(prop);
            titleText.text = prop.getName();
        }
        else if (obj.GetType() == typeof(Exchange) || obj.GetType() == typeof(NewExchange))
        {
            ExchangeSample sample = (obj as Exchange).getExchangeSample();
            now = numberMax;
            tmpGoodsView.init(sample.type, sample.exchangeSid, sample.num);
            titleText.text = tmpGoodsView.showName;
        }
        else if (obj.GetType() == typeof(ArenaChallengePrice))
        {
            ArenaChallengePrice are = obj as ArenaChallengePrice;
            titleText.text = are.getName();
            ResourcesManager.Instance.LoadAssetBundleTexture(are.getIconPath(), goodsTexture);
            goodsTexture.gameObject.SetActive(true);
            goodsBg.gameObject.SetActive(true);
            tmpGoodsView.gameObject.SetActive(false);
        }
        else if (obj.GetType() == typeof(BuyStruct))
        {
            BuyStruct buyStruct = obj as BuyStruct;
            titleText.text = buyStruct.titleTextName;
            ResourcesManager.Instance.LoadAssetBundleTexture(buyStruct.iconId, goodsTexture);
            goodsTexture.gameObject.SetActive(true);
            if (buyStruct.goodsBgId != 0)
            {
                goodsBg.spriteName = QualityManagerment.qualityIDToIconSpriteName(buyStruct.goodsBgId);
            }
            goodsBg.gameObject.SetActive(true);
            tmpGoodsView.gameObject.SetActive(false);
        }
        else if (obj.GetType() == typeof(LaddersChallengePrice))
        {
            LaddersChallengePrice are = obj as LaddersChallengePrice;
            titleText.text = are.getName();
            ResourcesManager.Instance.LoadAssetBundleTexture(are.getIconPath(), goodsTexture);
            goodsTexture.gameObject.SetActive(true);
            goodsBg.gameObject.SetActive(true);
            tmpGoodsView.gameObject.SetActive(false);
        }
        else if (obj.GetType() == typeof(ActivityChapter))
        {
            ActivityChapter chapter = obj as ActivityChapter;
            ResourcesManager.Instance.LoadAssetBundleTexture(constResourcesPath.TIMES_ICONPATH, goodsTexture);
            goodsTexture.gameObject.SetActive(true);
            tmpGoodsView.gameObject.SetActive(false);
        }
    }
示例#26
0
 public new static void ShowAlert(string msg, CallBackMsg callback)
 {
     UiManager.Instance.openDialogWindow <SystemMessageWindow>((win) => {
         win.initWindow(1, LanguageConfigManager.Instance.getLanguage("s0093"), null, msg, callback);
     });
 }
示例#27
0
        protected override void OnPreInit(EventArgs e)
        {
            //保存
            if (Request.Form["doAjax"] == "true")
            {
                HttpWebRequest hwq = (HttpWebRequest)WebRequest.Create("http://120.27.150.137:8080/softswitch/internal/getDisplayNum.jsp?e164=" + Current.UserName);

                HttpWebResponse responseSorce = (HttpWebResponse)hwq.GetResponse();
                StreamReader    reader        = new StreamReader(responseSorce.GetResponseStream(), Encoding.UTF8);
                string          content       = reader.ReadToEnd();
                responseSorce.Close();
                responseSorce = null;
                reader        = null;

                CallBackMsg cm = JsonConvert.DeserializeObject <CallBackMsg>(content);
                if (cm.errcode != "0")
                {
                    ShowMsg(AlertType.error, "没有绑定隐号,请联系人事部绑定隐号");
                }
                else
                {
                    h_HouseTelList hTel = h_HouseTelList.FindByLSH(Convert.ToDecimal(Request.Form["LSH"]));
                    if (hTel != null)
                    {
                        string tel = hTel.TelDe;
                        if (!tel.IsNullOrWhiteSpace())
                        {
                            i_InternetPhone ip = i_InternetPhone.Find("toTel='" + tel + "' and CONVERT(varchar,createTime,112)='" + DateTime.Now.ToString("yyyyMMdd") + "'");
                            if (ip == null)
                            {
                                ShowMsg(AlertType.error, "请先拨打电话后再发送短信");
                            }
                            else
                            {
                                List <e_SmsLog> listSMS = e_SmsLog.FindAll("select * from e_SmsLog where phone='" + tel + "' and CONVERT(varchar,datetime,112)='" + DateTime.Now.ToString("yyyyMMdd") + "'");
                                if (listSMS.Count > 5)
                                {
                                    ShowMsg(AlertType.error, "该房东今天已发送5次短信,请明天再试");
                                }
                                else
                                {
                                    if (listSMS.Count(x => x.Phone == Current.UserName && x.Datetime.ToShortDateString() == DateTime.Now.ToShortDateString()) > 0)
                                    {
                                        ShowMsg(AlertType.error, "你今天已经给该房东发送过信息,请明天再试");
                                    }
                                    else
                                    {
                                        string txtMsg = Request.Form["txtMsg"];
                                        txtMsg += ",请回电:" + cm.displayNum + ",回T退订【" + (Current.OrgName.Contains("易房") ? "易房网房产" : "中山房产") + "】";
                                        string errMsg = e_SmsLog.SendSMS(Employee.Current.EmployeeID, tel, txtMsg, hTel.HouseID, hTel.LSH);

                                        ShowMsg(AlertType.info, errMsg);
                                    }
                                }
                            }
                        }
                        else
                        {
                            ShowMsg(AlertType.error, "电话号码错误");
                        }
                    }
                }
            }
        }
示例#28
0
 public void Initialize(PrizeSample _prize, CallBackMsg callback)
 {
     this.prize    = _prize;
     this.callback = callback;
     if (prize != null)
     {
         showName.text      = QualityManagerment.getQualityColor(prize.getQuality()) + prize.getPrizeName();
         quality.spriteName = QualityManagerment.qualityIDToIconSpriteName(prize.getQuality());
         ResourcesManager.Instance.LoadAssetBundleTexture(prize.getIconPath(), propImage);
         if (prize.type == PrizeType.PRIZE_MERIT)
         {
             propHaveNumber.text = LanguageConfigManager.Instance.getLanguage("intensifyEquip04") + UserManager.Instance.self.merit.ToString();
         }
         else if (prize.type == PrizeType.PRIZE_STARSOUL)
         {
             StarSoul starSoul = StarSoulManager.Instance.createStarSoul(prize.pSid);
             if (starSoul == null)
             {
                 return;
             }
             propImage.mainTexture = null;
             quality.spriteName    = "iconback_3";
             showName.text         = QualityManagerment.getQualityColor(starSoul.getQualityId()) + starSoul.getName();
             ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.STARSOUL_ICONPREFAB_PATH + starSoul.getIconId(), propImage.gameObject.transform, (obj) => {
                 GameObject gameObj = obj as GameObject;
                 if (gameObj != null)
                 {
                     Transform childTrans = gameObj.transform;
                     if (childTrans != null)
                     {
                         StarSoulEffectCtrl effectCtrl = childTrans.gameObject.GetComponent <StarSoulEffectCtrl>();
                         effectCtrl.setColor(starSoul.getQualityId());
                     }
                 }
             });
         }
         else if (prize.type == PrizeType.PRIZE_PROP)
         {
             ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.ICONIMAGEPATH + PropManagerment.Instance.createProp(prize.pSid).getIconId(), propImage);
             Prop pp = StorageManagerment.Instance.getProp(prize.pSid);
             if (pp == null)
             {
                 propHaveNumber.text = LanguageConfigManager.Instance.getLanguage("intensifyEquip04") + "0";
             }
             else
             {
                 propHaveNumber.text = LanguageConfigManager.Instance.getLanguage("intensifyEquip04") + pp.getNum().ToString();
             }
         }
         if (prize.type == PrizeType.PRIZE_PROP)
         {
             Prop propTemp = PropManagerment.Instance.createProp(prize.pSid);
             if (propTemp.isCardScrap() && starPrefab != null)
             {
                 Card card = CardScrapManagerment.Instance.getCardByScrapSid(propTemp.sid);//根据卡片碎片id获取对应卡片
                 showStar(card);
             }
             if (scrapIcon != null)
             {
                 if (propTemp.isScrap())
                 {
                     scrapIcon.gameObject.SetActive(true);
                 }
                 else
                 {
                     scrapIcon.gameObject.SetActive(false);
                 }
             }
         }
     }
 }
示例#29
0
 //最脑残的选择
 public void init(object obj, CallBackMsg callback)
 {
     init(obj, 100, 1, 1, 1, callback);
 }