private void FindObject() { list = this.GetChild("n1").asList; share = this.GetChild("n7").asButton; userModel.GetUnlcok(Config.UNLOCK_SHARD, share); share.GetChild("title").asTextField.textFormat.size = 30; share.text = Tools.GetMessageById("24219"); if (shareModel.isShareRed()) { userModel.Add_Notice(share, new Vector2(145, -10)); } else { userModel.Remove_Notice(share); } share.onClick.Add(() => { string share_bitmap = ""; userModel.GetUnlcok(Config.UNLOCK_SHARD, null, true); //shareModel.viewX = this.x+this.width/2-232; shareModel.viewY = this.y + share.y - 200; MediatorAd.typeAd = ModelShare.SHARE_FIGHT; shareModel.type = ModelShare.SHARE_FIGHT; // ViewManager.inst.ShowView<MediatorAd>(false,false); ViewManager.inst.ShowView <MediatorShareBtn>(true, false); }); back = this.GetChild("n3").asButton; back.text = Tools.GetMessageById("24111"); back.onClick.Add(() => { //DispatchManager.inst.Dispatch(new MainEvent(MainEvent.FIGHT_DATA_END, new object[] { (Dictionary<string, object>)fightModel.fightData["gifts"] })); ViewManager.inst.CloseScene(); }); }
// Use this for initialization public override void Init() { base.Init(); Create(Config.VIEW_SHAREBTN); userModel = ModelManager.inst.userModel; shareModel = ModelManager.inst.shareModel; this.y = shareModel.viewY; weiXinId = DataManager.inst.systemSimple[DataManager.SHARE_WEIXIN_ID].ToString(); weiBoId = DataManager.inst.systemSimple[DataManager.SHARE_WEIBO_ID].ToString(); weiBoContent = DataManager.inst.systemSimple[DataManager.SHARE_WEIBO_CONTENT].ToString(); weiBoUrl = DataManager.inst.systemSimple[DataManager.SHARE_WEIBO_URL].ToString(); weiBoCallBack = DataManager.inst.systemSimple[DataManager.SHARE_WEIBO_CALLBACK].ToString(); qqId = DataManager.inst.systemSimple[DataManager.SHARE_QQ_ID].ToString(); qqURL = DataManager.inst.systemSimple[DataManager.SHARE_QQ_URL].ToString(); qqTitle = DataManager.inst.systemSimple[DataManager.SHARE_QQ_TITLE].ToString(); qqDes = DataManager.inst.systemSimple[DataManager.SHARE_QQ_DES].ToString(); friendLike = (Dictionary <string, object>)DataManager.inst.systemSimple["share"]; shareIcon = (object[])DataManager.inst.systemSimple["share_icon"]; iconImageStr = shareModel.shareImageIcon; list = this.GetChild("n1").asList; GImage imag1 = this.GetChild("n2").asImage; GImage imag2 = this.GetChild("n3").asImage; GTextField t1 = this.GetChild("n32").asTextField; t1.text = Tools.GetMessageById("19439"); if (shareModel.isShareRed(2)) { t1.visible = true; } if (shareModel.type == ModelShare.SHARE_FREIND) { this.x = shareModel.viewX; imag1.visible = true; imag2.visible = false; } else { imag1.visible = false; imag2.visible = true; } // list.fairyBatching = true; list.itemRenderer = OnRendere; list.numItems = shareIcon.Length; // AddGlobalListener(MainEvent.SHARE_DATA_EVENT, onSHARE_DATA_EVENT); }
private void FindObject() { GButton btn = this.GetChild("n100").asButton; btn.text = Tools.GetMessageById("13132"); GButton callBack = this.GetChild("n104").asButton; callBack.onClick.Add(CallBack); title1 = this.GetChild("n2").asTextField; title2 = this.GetChild("n13").asTextField; text1 = this.GetChild("n10").asTextField; text2 = this.GetChild("n11").asTextField; text3 = this.GetChild("n14").asTextField; text4 = this.GetChild("n15").asTextField; url = this.GetChild("n8").asTextInput; btn_Copy = this.GetChild("n110").asButton; erBg = this.GetChild("n3").asLoader; btn_share = this.GetChild("n5").asButton; tabShare = GetChild("bar0").asButton; if (shareModel.isShareRed()) { userModel.Add_Notice(btn_share, new Vector2(145, -10)); } else { userModel.Remove_Notice(btn_share); } btn_yaoqing = this.GetChild("n12").asButton; btn_yaoqing.GetChild("title").asTextField.textFormat.size = 25; //fenGeXian = this.GetChild("n9").asImage; list = GetChild("n60").asList; num1 = GetChild("n66").asTextField; num2 = GetChild("n64").asTextField; tabC1 = GetController("c1"); textContext = this.GetChild("n90").asTextField; input = this.GetChild("n0").asCom.GetChild("n1").asTextInput; btn_ok = this.GetChild("n84").asButton; image = this.GetChild("n99").asImage; btn_weixin = this.GetChild("n91").asButton; weiChatGroup = this.GetChild("n106").asGroup; btn_weixin.text = ""; bool ok = userModel.GetUnlcok(Config.UNLOCK_WEICHAT, weiChatGroup); if (!ok) { btn_ok.x = 527; } GetChild("n72").asTextField.text = Tools.GetMessageById("13136"); btn_ok.text = Tools.GetMessageById("31002"); //GetChild("n105").asTextField.text=Tools.GetMessageById("13145",new string[] { userModel.uid}); InitTopBar(new string[] { Tools.GetMessageById("13134"), Tools.GetMessageById("13133"), Tools.GetMessageById("13127") }); tabC1.onChanged.Add(OnChange); OnChange(); if (!Tools.IsNullEmpty(isUid)) { btn_yaoqing.touchable = false; btn_yaoqing.grayed = true; } else { btn_yaoqing.visible = true; } share_bitmap = ""; GetER();//获取二维码 SetData(); }