/// <summary> /// Gestiona los clicks del ratón del usuario. /// </summary> /// <returns>Devuelve un objeto tipo Screen según las acciones del usuario.</returns> public Screen Click() { if (BtnBack.isHover(Mouse.GetState().X, Mouse.GetState().Y)) { Game.effects[MainGame.eSounds.click].Play(); Server.closeServer(); getNewPlayersThread.Join(); return(new StartScreen(Game)); } if (!ClickStart && Host && BtnStart.isHover(Mouse.GetState().X, Mouse.GetState().Y) && Players.Count >= 2) { ClickStart = true; Game.effects[MainGame.eSounds.click].Play(); Server.sendData("empezar"); } return(this); }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as BindDevicePanelData ?? new BindDevicePanelData(); BtnBack.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); Back(); }).AddTo(this); BtnStartBind.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); UIMgr.OpenPanel <ConnectDevicePanel>(new ConnectDevicePanelData() { SSIDStr = mData.ssidStr, SSIDPWD = mData.pwdStr, }, UITransitionType.CIRCLE, this); }).AddTo(this); }
private void HTP_Next(object sender, EventArgs e) { //เพิ่มรูปตรงตามเลขได้เลย HTPstate++; if (HTPstate >= 2) { BtnBack.Show(); } switch (HTPstate) { case 2: this.BackgroundImage = Properties.Resources.Night_time; break; case 3: this.BackgroundImage = Properties.Resources.Day_time; break; case 4: this.BackgroundImage = Properties.Resources.Icon_alpha_werewolf; BtnNext.Hide(); break; case 5: this.BackgroundImage = Properties.Resources.Day_time; break; case 6: this.BackgroundImage = Properties.Resources.Day_time; break; case 7: this.BackgroundImage = Properties.Resources.Day_time; break; case 8: this.BackgroundImage = Properties.Resources.Day_time; BtnNext.Hide(); break; } }
private void HTP_Back(object sender, EventArgs e) { HTPstate--; if (HTPstate <= 2) { BtnNext.Show(); } switch (HTPstate) { case 1: this.BackgroundImage = Properties.Resources.Icon_seer; BtnBack.Hide(); break; case 2: this.BackgroundImage = Properties.Resources.Night_time; break; case 3: this.BackgroundImage = Properties.Resources.Day_time; break; case 4: this.BackgroundImage = Properties.Resources.Day_time; break; case 5: this.BackgroundImage = Properties.Resources.Day_time; break; case 6: this.BackgroundImage = Properties.Resources.Day_time; break; case 7: this.BackgroundImage = Properties.Resources.Day_time; break; } }
private void HTP_Back(object sender, EventArgs e) { HTPstate--; if (HTPstate <= 2) { BtnNext.Show(); } switch (HTPstate) { case 1: this.BackgroundImage = Properties.Resources.HTP1; BtnBack.Hide(); break; case 2: this.BackgroundImage = Properties.Resources.HTP2; break; case 3: this.BackgroundImage = Properties.Resources.HTP3; break; } }
protected override void RegisterUIEvent() { BtnBack.OnClickAsObservable().Subscribe(_ => { CloseSelf(); }); StageCompleteStar3.OnClickAsObservable().Subscribe(_ => { UIMgr.OpenPanel <UIMapStatesDesPanel>(); }); StageLock.OnClickAsObservable().Subscribe(_ => { UIMgr.OpenPanel <UIMapStagesLockPanel>(); }); BtnGoldAdd.OnClickAsObservable().Subscribe(_ => { UIMgr.OpenPanel <UIShopGoldPanel>(); }); BtnGemAdd.OnClickAsObservable().Subscribe(_ => { UIMgr.OpenPanel <UIShopGemPanel>(); }); }
/// <summary> /// Dibuja todos los elementos de la pantalla. /// </summary> /// <param name="gameTime">Valor temporal interno.</param> public void Draw(GameTime gameTime) { Game.SpriteBatch.Begin(); BtnBack.draw(Game); Game.SpriteBatch.DrawString( Font, Intro, new Vector2(ScreenWidth / 2 - Font.MeasureString(Intro).X / 2, ScreenHeight / 4), Color.Black ); BtnInput.draw(Game); BtnStart.draw(Game); if (ErrorOcurrered) { Game.SpriteBatch.DrawString( ErrorFont, ErrorMsg, new Vector2(ScreenWidth / 2 - ErrorFont.MeasureString(ErrorMsg).X / 2, ScreenHeight * 7 / 10), Color.Red ); } Game.SpriteBatch.End(); }
private void HTP_Next(object sender, EventArgs e) { //เพิ่มรูปตรงตามเลขได้เลย HTPstate++; if (HTPstate >= 2) { BtnBack.Show(); } switch (HTPstate) { case 2: this.BackgroundImage = Properties.Resources.HTP2; break; case 3: this.BackgroundImage = Properties.Resources.HTP3; break; case 4: this.BackgroundImage = Properties.Resources.HTP4; BtnNext.Hide(); break; } }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as IntegralDetailPanelData ?? new IntegralDetailPanelData(); // please add init code here RequestGoodList(3); RequestGoodList(1); if (mData.panelToggleType == 1) { IntegralExChangelToggle.isOn = true; IntegralRecorderToggle.isOn = false; } else if (mData.panelToggleType == 2) { IntegralExChangelToggle.isOn = false; IntegralRecorderToggle.isOn = true; } BtnBack.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); Back(); }).AddTo(this); }
public void btnBackShow() { BtnBack.Show(); }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as DailyTaskPanelData ?? new DailyTaskPanelData(); RequestDailyTask(); RequestMedalList(); if (mData.showMedal == 2) { ToggleDailyTask.isOn = false; ToggleDailyMedal.isOn = true; } else { ToggleDailyTask.isOn = true; ToggleDailyMedal.isOn = false; } BtnBack.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); Back(); }).AddTo(this); BtnIntegralRule.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); UIMgr.OpenPanel <IntegralDescripPanel>(new IntegralDescripPanelData() { mMedalsLiast = this.mMedalsLiast }, UITransitionType.CIRCLE); }).AddTo(this); BtnIntegral.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); UIMgr.OpenPanel <IntegralDetailPanel>(new IntegralDetailPanelData() { panelToggleType = 2, }, UITransitionType.CIRCLE, this); }).AddTo(this); /// 签到规则 BtnTaskRule.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); UIMgr.OpenPanel <AttendanceRulePanel>(new AttendanceRulePanelData(), UITransitionType.CIRCLE, this); }).AddTo(this); // 勋章规则 BtnMedalRule.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); UIMgr.OpenPanel <IntegralDescripPanel>(new IntegralDescripPanelData() { mMedalsLiast = this.mMedalsLiast }, UITransitionType.CIRCLE); }).AddTo(this); BtnAttendance.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); Debug.Log("点击签到"); RequestAttendance(); }).AddTo(this); BtnPunch.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); Debug.Log("学习任务打卡 前往"); // CommonUtil.toast("此功能尚未开放,敬请期待"); // Back(); UIMgr.OpenPanel <AttendanceSelectPanel>(new AttendanceSelectPanelData(), UITransitionType.NULL); }).AddTo(this); BtnExchange.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); UIMgr.OpenPanel <GiftListPanel>(new GiftListPanelData(), UITransitionType.CIRCLE); }).AddTo(this); }
public AddressPage ClickBackButton() { BtnBack.Click(); return(new AddressPage(driver)); }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as BindWIFIMessagePanelData ?? new BindWIFIMessagePanelData(); if (Application.platform == RuntimePlatform.Android) { NativeGallery.RequestPermission((result, action) => { isSendMessage = true; Log.I("RequestPermission: " + result); if (result == (int)NativeGallery.Permission.Granted) { // InvokeRepeating("GetWifiInfo",1,1); 可以实时更新wifi,但无法修改wifi密码,暂时舍弃 NativeGallery.GetSomethingFromNative((json, action1) => { if (json.IsNotNullAndEmpty()) { isSSIDContains5G(json); InputFieldSSID.text = json; string pwd = PlayerPrefsUtil.GetWiFiPWD(json); if (pwd.IsNotNullAndEmpty()) { InputFieldPWD.text = pwd; } else { InputFieldPWD.text = string.Empty; } } Log.I("GetSomethingFromNative: " + json); }, (int)NativeAction.Location); } }, (int)NativeAction.Location); } else if (Application.platform == RuntimePlatform.IPhonePlayer) { if (NativeGallery.RequestIPhonePermission(2) == NativeGallery.Permission.Granted) { NativeGallery.GetSomethingFromIPhone(result => { if (result.IsNotNullAndEmpty()) { InputFieldSSID.text = result; isSSIDContains5G(result); string pwd = PlayerPrefsUtil.GetWiFiPWD(result); if (pwd.IsNotNullAndEmpty()) { InputFieldPWD.text = pwd; } else { InputFieldPWD.text = String.Empty; } } }, 1); } } var submit = Observable.Merge( InputFieldSSID.OnEndEditAsObservable().Where(_ => Input.GetKeyDown(KeyCode.Return)), BtnCommit.OnClickAsObservable().Select(_ => InputFieldSSID.text) ); submit.Where(s => s != "") .Subscribe(s => { AudioManager.PlaySound("Button_Audio"); isSendMessage = false; if (saveWiFipwd) { // 保存 WiFi ssid 和 pwd 到本地 PlayerPrefsUtil.SetWiFiSSIDPWD(InputFieldSSID.text, InputFieldPWD.text); } else { PlayerPrefsUtil.SetWiFiSSIDPWD(InputFieldSSID.text, String.Empty); } Debug.Log("submit-确定 " + "ssid=" + s + " pwd=" + InputFieldPWD.text); UIMgr.OpenPanel <BindDevicePanel>(new BindDevicePanelData() { pwdStr = InputFieldPWD.text, ssidStr = InputFieldSSID.text }, UITransitionType.CIRCLE, this); }).AddTo(this); BtnClearPWD.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); InputFieldPWD.text = String.Empty; }).AddTo(this); BtnSSIDList.onClick.AddListener(() => { AudioManager.PlaySound("Button_Audio"); #if UNITY_ANDROID NativeGallery.RequestPermission((result, action) => { Log.I("RequestPermission: " + result); if (result == (int)NativeGallery.Permission.Granted) { NativeGallery.OpenWifiSettings(); } }, (int)NativeAction.Location); #elif UNITY_IOS NativeGallery.OpenSettings(); #else #endif }); InputFieldSSID.OnValueChangedAsObservable().Subscribe((s => { var texture2D = mResLoader.LoadSync <Texture2D>("ic_bindDetermine"); if (s.Length > 0) { texture2D = mResLoader.LoadSync <Texture2D>("ic_bindDetermine"); } else { texture2D = mResLoader.LoadSync <Texture2D>("btn_code_sel"); } ImgDetermine.sprite = Sprite.Create(texture2D, new Rect(0, 0, texture2D.width, texture2D.height), Vector2.one * 0.5f); })).AddTo(this); BtnShow.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); var texture2D = mResLoader.LoadSync <Texture2D>("ic_savepwd"); showWiFipwd = !showWiFipwd; if (showWiFipwd) { texture2D = mResLoader.LoadSync <Texture2D>("btn_show_pwd"); InputFieldPWD.contentType = InputField.ContentType.EmailAddress; } else { texture2D = mResLoader.LoadSync <Texture2D>("btn_hide_pwd"); InputFieldPWD.contentType = InputField.ContentType.Password; } var image = BtnShow.transform.Find("Image").GetComponent <Image>(); image.sprite = Sprite.Create(texture2D, new Rect(0, 0, texture2D.width, texture2D.height), Vector2.one * 0.5f); InputFieldPWD.MyUpdateLabel(); }).AddTo(this); BtnConnectTips.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); UIMgr.OpenPanel <BindCheckWIFIPanel>(new BindCheckWIFIPanelData(), UITransitionType.NULL); }).AddTo(this); BtnBack.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); Debug.Log("WiFi 返回"); Back(); }).AddTo(this); BtnSavepwd.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); Debug.Log("记住密码"); saveWiFipwd = !saveWiFipwd; var texture2D = mResLoader.LoadSync <Texture2D>("ic_savepwd"); if (saveWiFipwd) { texture2D = mResLoader.LoadSync <Texture2D>("ic_savepwd"); } else { texture2D = mResLoader.LoadSync <Texture2D>("ic_unsavepwd"); } ImageSavePWD.sprite = Sprite.Create(texture2D, new Rect(0, 0, texture2D.width, texture2D.height), Vector2.one * 0.5f); }).AddTo(this); SimpleEventSystem.GetEvent <TipConfirmClick>() .Subscribe(_ => { if (_.GetAction == TipAction.Contains5GAlter) { if (Application.platform == RuntimePlatform.IPhonePlayer) { NativeGallery.RequestPermission((result, action) => { Log.I("RequestPermission: " + result); if (result == (int)NativeGallery.Permission.Granted) { NativeGallery.OpenWifiSettings(); } }, (int)NativeAction.Location); } else if (Application.platform == RuntimePlatform.IPhonePlayer) { NativeGallery.OpenSettings(); } } }).AddTo(this); // please add init code here }
/// <summary> /// Method for click button Back /// </summary> /// <returns></returns> public void ClickButtonBack() { BtnBack.Click(); }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as MedalSharePanelData ?? new MedalSharePanelData(); TextDays.text = String.Format("连续{0}日", mData.medalModel.medalDays.ToString()); TextMedalName.text = String.Format("\"{0}勋章\"", mData.medalModel.medalName); TextName.text = PlayerPrefsUtil.UserInfo.babyInfoVo.name; Texture2D mTexture2DHBoy = mResLoader.LoadSync <Texture2D>("ic_head_boy"); Texture2D mTexture2DHGirl = mResLoader.LoadSync <Texture2D>("ic_head_girl"); if (PlayerPrefsUtil.UserInfo.babyInfoVo.babyLogoUrl.IsNotNullAndEmpty()) { ImageDownloadUtils.Instance.SetAsyncImage(PlayerPrefsUtil.UserInfo.babyInfoVo.babyLogoUrl, ImageUserIcon); } else if (PlayerPrefsUtil.UserInfo.babyInfoVo.sex == 1) { ImageUserIcon.sprite = Sprite.Create(mTexture2DHBoy, new Rect(0, 0, mTexture2DHBoy.width, mTexture2DHBoy.height), Vector2.one * 0.5f); } else if (PlayerPrefsUtil.UserInfo.babyInfoVo.sex == 2) { ImageUserIcon.sprite = Sprite.Create(mTexture2DHGirl, new Rect(0, 0, mTexture2DHGirl.width, mTexture2DHGirl.height), Vector2.one * 0.5f); } TextStudyDayNum.text = mData.medalModel.medalDays.ToString(); // please add init code here BtnBack.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); Back(); }).AddTo(this); if (mData.medalModel.isDraw != 1) { CommonUtil.toast("领取成功+" + mData.medalModel.medalScore + "积分"); } BtnSaveAlbum.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); Debug.Log("保存到相册-------"); // Rect mRect = ImgContent.transform.GetComponent<RectTransform>().rect; // this.ScreenShot(mRect); StartResquestForSharePoster(ShareAction.Save); }).AddTo(this); BtnShareWeChatSession.OnClickAsObservable().Subscribe(_ => { AudioManager.PlaySound("Button_Audio"); StartResquestForSharePoster(ShareAction.Wechat); Debug.Log("分享到微信"); }).AddTo(this); BtnShareWeChatTimeLine.OnClickAsObservable().Subscribe(_ => { //WechatMoments AudioManager.PlaySound("Button_Audio"); StartResquestForSharePoster(ShareAction.WechatMoments); Debug.Log("分享到朋友圈"); }).AddTo(this); SimpleEventSystem.GetEvent <ShareResult>().Subscribe(res => { //1成功2失败3取消 string status = res.Status; if ("1".Equals(status)) { if (mData.medalModel.isShare == 0) { CommonUtil.toast("分享成功+" + mData.medalModel.medalShareScore + "积分"); mData.medalModel.isShare = 1; } StartResquestForAddRecord(); } else if ("2".Equals(status)) { } else if ("3".Equals(status)) { } }).AddTo(this); }
void ReleaseDesignerOutlets() { if (TxtFriendlyName != null) { TxtFriendlyName.Dispose(); TxtFriendlyName = null; } if (BtnAddCertificate != null) { BtnAddCertificate.Dispose(); BtnAddCertificate = null; } if (BtnAdvanced != null) { BtnAdvanced.Dispose(); BtnAdvanced = null; } if (BtnBack != null) { BtnBack.Dispose(); BtnBack = null; } if (BtnHelpADWindowsIntegrated != null) { BtnHelpADWindowsIntegrated.Dispose(); BtnHelpADWindowsIntegrated = null; } if (BtnHelpCredentials != null) { BtnHelpCredentials.Dispose(); BtnHelpCredentials = null; } if (BtnHelpDomainName != null) { BtnHelpDomainName.Dispose(); BtnHelpDomainName = null; } if (BtnNext != null) { BtnNext.Dispose(); BtnNext = null; } if (BtnPrimaryImport != null) { BtnPrimaryImport.Dispose(); BtnPrimaryImport = null; } if (BtnRemoveCertificate != null) { BtnRemoveCertificate.Dispose(); BtnRemoveCertificate = null; } if (BtnSecondaryImport != null) { BtnSecondaryImport.Dispose(); BtnSecondaryImport = null; } if (BtnTestConnection != null) { BtnTestConnection.Dispose(); BtnTestConnection = null; } if (ChkProtect != null) { ChkProtect.Dispose(); ChkProtect = null; } if (LblPassword != null) { LblPassword.Dispose(); LblPassword = null; } if (LblSpn != null) { LblSpn.Dispose(); LblSpn = null; } if (LblUsername != null) { LblUsername.Dispose(); LblUsername = null; } if (LstCertificates != null) { LstCertificates.Dispose(); LstCertificates = null; } if (PnlProtect != null) { PnlProtect.Dispose(); PnlProtect = null; } if (PnlSpecificDomainController != null) { PnlSpecificDomainController.Dispose(); PnlSpecificDomainController = null; } if (PnlStep1 != null) { PnlStep1.Dispose(); PnlStep1 = null; } if (PnlStep2 != null) { PnlStep2.Dispose(); PnlStep2 = null; } if (PnlStep3 != null) { PnlStep3.Dispose(); PnlStep3 = null; } if (PnlStep4 != null) { PnlStep4.Dispose(); PnlStep4 = null; } if (RdoDomainController != null) { RdoDomainController.Dispose(); RdoDomainController = null; } if (RdoIdentitySource != null) { RdoIdentitySource.Dispose(); RdoIdentitySource = null; } if (RdoSpn != null) { RdoSpn.Dispose(); RdoSpn = null; } if (StepIndicator != null) { StepIndicator.Dispose(); StepIndicator = null; } if (TxtBaseDnGroups != null) { TxtBaseDnGroups.Dispose(); TxtBaseDnGroups = null; } if (TxtBaseDnUser != null) { TxtBaseDnUser.Dispose(); TxtBaseDnUser = null; } if (TxtDomainAlias != null) { TxtDomainAlias.Dispose(); TxtDomainAlias = null; } if (TxtDomainName != null) { TxtDomainName.Dispose(); TxtDomainName = null; } if (TxtGroupbaseDN != null) { TxtGroupbaseDN.Dispose(); TxtGroupbaseDN = null; } if (TxtLdapConnection != null) { TxtLdapConnection.Dispose(); TxtLdapConnection = null; } if (TxtPassword != null) { TxtPassword.Dispose(); TxtPassword = null; } if (TxtPrimaryConnection != null) { TxtPrimaryConnection.Dispose(); TxtPrimaryConnection = null; } if (TxtPrimaryUrl != null) { TxtPrimaryUrl.Dispose(); TxtPrimaryUrl = null; } if (TxtSecondaryConnection != null) { TxtSecondaryConnection.Dispose(); TxtSecondaryConnection = null; } if (TxtSpn != null) { TxtSpn.Dispose(); TxtSpn = null; } if (TxtUpn != null) { TxtUpn.Dispose(); TxtUpn = null; } }
protected override void OnInit(QFramework.IUIData uiData) { mData = uiData as ConnectDevicePanelData ?? new ConnectDevicePanelData(); Meteors.transform.DOLocalMoveX(-2370, 5f).SetLoops(-1, LoopType.Restart); Meteors.transform.DOLocalMoveY(-470, 5f).SetLoops(-1, LoopType.Restart); Dictionary <string, object> param = new Dictionary <string, object>(); param.Add("ssid", mData.SSIDStr); param.Add("password", mData.SSIDPWD); param.Add("token", PlayerPrefsUtil.GetToken()); param.Add("userId", PlayerPrefsUtil.GetUserId()); if (Application.platform == RuntimePlatform.Android) { AndroidForUnity.CallAndroidForStartDeviceConnect(mData.SSIDStr, mData.SSIDPWD); } else if (Application.platform == RuntimePlatform.IPhonePlayer) { IOSClientUtil.StartBindDevice(param.ToJson()); } StartCoroutine(CountDown()); BtnBack.OnClickAsObservable().Subscribe(_ => { UIMgr.OpenPanel <TipPanel>(new TipPanelData() { action = TipAction.BindingBack, message = "返回后联网将不在继续,确认终止操作?", strConfirm = "确定", strCancel = "继续等待", strTitle = "终止配网", }); }).AddTo(this); BtnCheckWiFi.OnClickAsObservable().Subscribe(_ => { UIMgr.OpenPanel <BindCheckWIFIPanel>(new BindCheckWIFIPanelData(), UITransitionType.NULL); }).AddTo(this); SimpleEventSystem.GetEvent <BindDeviceResult>().Subscribe(res => { BindDeviceModel model = res.Model; if (Application.platform == RuntimePlatform.Android) { if (model.status == 1) { StartResquestForBind(model.deviceId); } else { ConnectResult(false); } } else if (Application.platform == RuntimePlatform.IPhonePlayer) { if (model.requestTag == 2 && model.deviceId.IsNotNullAndEmpty()) { StartResquestForBind(model.deviceId); } if (model.requestTag == 1) { CommonUtil.toast("获取音频接口出错"); } } }).AddTo(this); SimpleEventSystem.GetEvent <TipConfirmClick>() .Subscribe(_ => { if (_.GetAction == TipAction.BindDevice) { ShowMainPanel(); } else if (_.GetAction == TipAction.BindingBack) { StopAllCoroutines(); if (Application.platform == RuntimePlatform.IPhonePlayer) { IOSClientUtil.StopBindDevice(""); } else if (Application.platform == RuntimePlatform.Android) { AndroidForUnity.CallAndroidForStopDeviceConnect(); } Back(); } }).AddTo(this); }