/// <summary> /// 不在背包的物品,如商店等 /// </summary> /// <param name="goodsId"></param> /// <param name="leftClick">按钮响应函数,如果为null 则隐藏</param> /// <param name="rightClick">按钮响应函数,如果为null 则隐藏</param> /// <param name="leftText">按钮文本</param> /// <param name="rightText">按钮文本</param> /// <param name="tipsType">Tips的具体样式</param> public void OpenTipsByGoodsId(uint goodsId, UIWidgetContainer.ClickDelegate leftClick, UIWidgetContainer.ClickDelegate rightClick, string leftText, string rightText, TipsType tipsType = TipsType.DEFAULT_TYPE) { if (goodsId > GoodsMode.Instance.GoodsId) { Singleton <GoodsTips> .Instance.OpenViewByGoodsId(goodsId, leftText, rightText, leftClick, rightClick, tipsType); } else { SysEquipVo vo = BaseDataMgr.instance.GetDataById <SysEquipVo>(goodsId); if (vo == null) { Log.info(this, "没有找到Vo"); return; } else if (vo.type == GoodsConst.PET_EQUIP) { Singleton <PetEquipTips> .Instance.OpenViewByGoodsId(goodsId, leftText, rightText, leftClick, rightClick); } else if (vo.type == GoodsConst.ROLE_EQUIP) { Singleton <EquipTips> .Instance.OpenViewByGoodsId(goodsId, leftText, rightText, leftClick, rightClick, null, tipsType); } } }
public void ShowFinishTips(uint ID, float lifetime, byte type /*'1'为成就 ‘2’为任务*/) { if (m_BaseWndObject == null) { Init(); //WndManager.Instance.Push(m_BaseWndObject); } else { return; } m_FinishTips.m_Obj.SetActive(true); m_LifeTime = lifetime; m_TipsType = TipsType.FinishTips; //成就完成 if (type == 1) { tagAchievementStrInfo achievementStrInfo = FishConfig.Instance.m_AchievementInfo.m_AchievementStr[(byte)ID]; m_FinishTips.m_Name.text = achievementStrInfo.AchievementName; m_FinishTips.m_AchivementIcon.spriteName = achievementStrInfo.AchievementIcon; m_FinishTips.m_AchivementIcon.gameObject.SetActive(true); m_FinishTips.m_TipsTitle.text = StringTable.GetString("Achievement_Finish_Tips"); } else if (type == 2) { tagTaskStrInfo taskStrInfo = FishConfig.Instance.m_TaskInfo.m_TaskStr[(byte)ID]; m_FinishTips.m_Name.text = taskStrInfo.TaskName; m_FinishTips.m_TaskIcon.spriteName = taskStrInfo.TaskIcon; m_FinishTips.m_TaskIcon.gameObject.SetActive(true); m_FinishTips.m_TipsTitle.text = StringTable.GetString("Task_Finish_Tips"); } }
public void ShowToUpgrade(byte Level, float lifetime, uint RewardID) { if (m_BaseWndObject != null) { ShutDown(); // WndManager.Instance.Push(m_BaseWndObject); } Init(); m_TipsType = TipsType.ToUpgradeTips; m_ToUpgrade.m_Obj.SetActive(true); m_LifeTime = lifetime; m_ToUpgrade.m_Level.text = Level.ToString(); if (RewardID > 0) { tagRewardOnce pReward = FishConfig.Instance.GetRewardOnceByID((ushort)RewardID); uint ItemID; if (pReward != null) { for (byte i = 0; i < pReward.RewardItemVec.Count; ++i) { ItemID = pReward.RewardItemVec[i].ItemID; if (FishConfig.Instance.m_ItemInfo.m_ItemMap.ContainsKey(ItemID) != true) { continue; } for (byte j = 0; j < ConstValue.MAX_LAUNCHER_NUM; ++j) { if ((ushort)ItemID == LauncherSetting.LauncherDataList[j].nItemid) { //如果是已经获得该炮就不需要新手引导 if (PlayerRole.Instance.RoleLauncher.IsCanUseLauncherByAllTime(j)) { return; } } } Vector3 pos = m_ToUpgrade.m_Trans.localPosition; pos.y += 60; m_ToUpgrade.m_Trans.localPosition = pos; m_AnimTime = 0; m_LifeTime = 30; m_AnimBtnTime = 0.5f; m_ToUpgrade.m_RewardObj.SetActive(true); m_OnOKBtnObj.SetActive(false); m_ToUpgrade.m_RewardIcon.spriteName = FishConfig.Instance.m_ItemInfo.m_ItemMap[ItemID].ItemIcon; string strMsg = StringTable.GetString("LimitTime_Launcher_Tips"); strMsg = strMsg.Replace("@", pReward.RewardItemVec[i].LastMin.ToString()); m_ToUpgrade.m_RewardDec.text = strMsg; } } else { Debug.Log("null"); } } }
public static void ShowTips(TipsType type) { switch (type) { case TipsType.UnopenFunction: UI.UIMgr.instance.Open(View.TipsUnopenFunctionView.PREFAB_PATH); break; } }
public void OnShowUIToast(TipsType type) { ++tipsShowingCount; if (type == TipsType.FlowLeft) { flowLeftBackground.SetActive(true); } }
public void OpenPlayerEquipViewByPGoods(PGoods other, string leftText, string rightText, UIWidgetContainer.ClickDelegate mLeftOnClick = null, UIWidgetContainer.ClickDelegate mRightOnClick = null, UIWidgetContainer.ClickDelegate closeOnClick = null, TipsType tipsType = TipsType.DEFAULT_TYPE) { showOtherPlayerEquip = true; this.id = other.id; goods = other; this.mLeftOnClick = mLeftOnClick; this.mRightOnClick = mRightOnClick; this.mCloseOnClick = closeOnClick; this.leftBtnLabel = leftText; this.rightBtnLabel = rightText; this.tipsType = tipsType; OpenView(); }
public void OpenViewByGoodsId(uint goodsId, string leftText, string rightText, UIWidgetContainer.ClickDelegate mLeftOnClick = null, UIWidgetContainer.ClickDelegate mRightOnClick = null, UIWidgetContainer.ClickDelegate closeOnClick = null, TipsType tipsType = TipsType.DEFAULT_TYPE) { this.id = goodsId; goods = new PGoods(); goods.goodsId = goodsId; this.mLeftOnClick = mLeftOnClick; this.mRightOnClick = mRightOnClick; this.mCloseOnClick = closeOnClick; this.leftBtnLabel = leftText; this.rightBtnLabel = rightText; this.tipsType = tipsType; OpenView(); }
public void OpenViewById(uint id, string leftText, string rightText, UIWidgetContainer.ClickDelegate mLeftOnClick = null, UIWidgetContainer.ClickDelegate mRightOnClick = null, UIWidgetContainer.ClickDelegate closeOnClick = null, TipsType tipsType = TipsType.DEFAULT_TYPE) { this.id = id; goods = Singleton <GoodsMode> .Instance.GetPGoodsById(id); this.mLeftOnClick = mLeftOnClick; this.mRightOnClick = mRightOnClick; this.mCloseOnClick = closeOnClick; this.leftBtnLabel = leftText; this.rightBtnLabel = rightText; this.tipsType = tipsType; OpenView(); }
public void OpenViewByGoodsId(uint goodsId, string leftText, string rightText, UIWidgetContainer.ClickDelegate mLeftclickDelegate, UIWidgetContainer.ClickDelegate mRightclickDelegate, TipsType tipsType) { this.id = id; goods = new PGoods(); goods.goodsId = goodsId; this.tipsType = tipsType; this.mLeftclickDelegate = mLeftclickDelegate; //this.mMiddleclickDelegate = mMiddleclickDelegate; this.mRightclickDelegate = mRightclickDelegate; this.leftBtnLabel = leftText; this.rightBtnLabel = rightText; OpenView(); }
public void ShowTips(TipsType type, params object[] args) { if (_curTipsWindow == null) { _curTipsWindow = AddChild <Panel_Tips>(_centerRoot); } switch (type) { case TipsType.text: _curTipsWindow.ShowTextTips((string)args[0]); break; default: break; } }
public void updateTips(TipsType level, string tips = "Notice") { Dispatcher.Invoke(() => { statusHole.Text = tips; //Update visibility statusTips.Visibility = level == TipsType.Normal ? Visibility.Collapsed : Visibility.Visible; //Get next state string stateName = Constant.getText(level); if (string.IsNullOrEmpty(stateName)) { return; } VisualStateManager.GoToElementState(statusTips, stateName, true); }); }
public static string getText(TipsType type) { switch (type) { case TipsType.Normal: return(Constant.Normal); case TipsType.Yellow: return(Constant.Yellow); case TipsType.Blue: return(Constant.Blue); default: return(string.Empty); } }
public void OpenViewById(uint id, string leftText, string rightText, UIWidgetContainer.ClickDelegate mLeftclickDelegate, UIWidgetContainer.ClickDelegate mRightclickDelegate, TipsType tipsType) { this.id = id; goods = Singleton <GoodsMode> .Instance.GetPGoodsById(id); this.tipsType = tipsType; this.mLeftclickDelegate = mLeftclickDelegate; //this.mMiddleclickDelegate = mMiddleclickDelegate; this.mRightclickDelegate = mRightclickDelegate; this.leftBtnLabel = leftText; this.rightBtnLabel = rightText; OpenView(); //miaoShuList[1].text = vo. //jiBenSX.text = vo. }
public void ShowSystemTips(string describe, float lifetime, bool bMask = false) { m_bMask = bMask; if (m_BaseWndObject == null) { Init(); if (!bMask && LogonRuntime.Instance == null) { WndManager.Instance.Push(m_BaseWndObject); } } m_TipsType = TipsType.SystTemTips; m_SystemTips.m_Obj.SetActive(true); m_LifeTime = lifetime; m_SystemTips.m_TweenAlpha.duration = lifetime; m_SystemTips.m_TweenAlpha.ResetToBeginning(); m_SystemTips.m_DescribeUI.text = describe; }
public void OnRecycleUIToast(TipsType type) { --tipsShowingCount; if (type == TipsType.FlowLeft) { bool has = false; for (int j = 0; j < tipsDataList.Count; ++j) { if (tipsDataList[j].IsImportantNotice() && tipsDataList[j].IsShow()) { has = true; break; } } if (!has) { flowLeftBackground.SetActive(false); } } }
public void ShowToast(TipsType type, string message, float seconds) { TipsData data = null; for (int i = 0; i < tipsDataList.Count; ++i) { if (tipsDataList[i] != null && tipsDataList[i].UnUse()) { data = tipsDataList[i]; break; } } if (data == null) { data = new TipsData(); tipsDataList.Add(data); } data.Init(type, message, seconds); }
/// <summary> /// 展示面板 /// </summary> /// <returns>The show.</returns> /// <param name="type">Type.</param> public void Show(TipsType type) { if (!m_bIsInit) { Start(); } PaintTipsType = type; SetVisible(true); m_Content.gameObject.SetActive(false); m_TextureInput.gameObject.SetActive(false); m_Warming.gameObject.SetActive(false); switch (type) { case TipsType.SAVE: m_Title.text = "保 存"; m_TextureInput.gameObject.SetActive(true); break; case TipsType.DELETE: m_Title.text = "删 除"; m_Content.gameObject.SetActive(true); m_Content.text = "删除后无法找回!"; break; case TipsType.CLEAN: m_Title.text = "清 除"; m_Content.gameObject.SetActive(true); m_Content.text = "确认清空"; break; case TipsType.COVER: m_Title.text = "覆 盖"; m_Content.gameObject.SetActive(true); m_Content.text = "是否覆盖"; break; default: break; } }
public static GameObject OpenTips(TipsType type, string title, OnButtonCallBack okCallBack = null, OnButtonCallBack cancelCallBack = null, OnButtonCallBack closeCallBack = null, float delayTime = 0) { GameObject go = Libs.Resource.UIManager.OpenUI(Config.UI.UIPath.TipsPanel); CommonTips common_tips = go.GetComponent <CommonTips>(); if (type == TipsType.OK_CANCEL) { common_tips.btn_ok.gameObject.SetActive(true); common_tips.btn_cancel.gameObject.SetActive(true); common_tips.btn_ok.GetComponent <RectTransform>().localPosition = new Vector3(150, -100, 0); common_tips.btn_cancel.GetComponent <RectTransform>().localPosition = new Vector3(-150, -100, 0); } else if (type == TipsType.OK) { common_tips.btn_cancel.gameObject.SetActive(false); common_tips.btn_ok.gameObject.SetActive(true); common_tips.btn_ok.GetComponent <RectTransform>().localPosition = new Vector3(0, -100, 0); } else if (type == TipsType.AUTO_CLOSE) { common_tips.btn_cancel.gameObject.SetActive(false); common_tips.btn_ok.gameObject.SetActive(false); if (delayTime > 0) { common_tips.m_closeTime = Time.time + delayTime; } } common_tips.m_okCallBack = okCallBack; common_tips.m_cancelCallBack = cancelCallBack; common_tips.m_closeCallBack = closeCallBack; common_tips.tips_text.text = title; return(go); }
public void OpenPlayerEquipTipsById(uint id, UIWidgetContainer.ClickDelegate leftClick, UIWidgetContainer.ClickDelegate rightClick, UIWidgetContainer.ClickDelegate closeClick, string leftText, string rightText, TipsType tipsType = TipsType.DEFAULT_TYPE) { PGoods goods = Singleton <GoodsMode> .Instance.GetOtherPGoods(id); SysEquipVo vo = BaseDataMgr.instance.GetDataById <SysEquipVo>(goods.goodsId); if (vo == null) { Log.info(this, "没有找到Vo"); return; } else if (vo.type == GoodsConst.PET_EQUIP) { Singleton <PetEquipTips> .Instance.OpenPlayerEquipViewById(id, leftText, rightText, leftClick, rightClick, closeClick); } else if (vo.type == GoodsConst.ROLE_EQUIP) { Singleton <EquipTips> .Instance.OpenPlayerEquipViewById(id, leftText, rightText, leftClick, rightClick, closeClick, tipsType); } }
protected override void OnShowPanel(params object[] allParams) { base.OnShowPanel(allParams); TipsType currentType = (TipsType)allParams[0]; string text = allParams[1] as string; float duration = 2f; if (allParams.Length > 2) { duration = (float)allParams[2]; } switch (currentType) { case TipsType.Common: ShowInfo(text, duration); break; case TipsType.MiddleTop: ShowMiddleInfo(text); break; } }
//------------------------------------------------------------------------- public override void load(EbPropSet prop_set) { Content = prop_set.getPropString("Content").get(); TipsType = (TipsType)prop_set.getPropInt("TipType").get(); }
public void updateTips(TipsType level, string tips) { //Empty implement }
public bool Run(TipsType tipsType) { bool flag; try { long length; int num2; string str; long availableFreeSpace; long totalSize; switch (tipsType) { case TipsType.TipsThatSamePath: { string startupPath = Application.StartupPath; string str7 = this.strDestPathCopy.Substring(0, 1); string str8 = string.Empty; if (!str7.Equals("C") && !str7.Equals("c")) { goto Label_0295; } str8 = "数据备份路径:" + this.strDestPathCopy + "\n"; this.label1.Text = string.Empty; this.label1.Text = this.label1.Text + str8; this.label1.Text = this.label1.Text + "请不要把数据备份路径设置在系统盘符(C:),以防数据丢失,\n是否继续?"; return(true); } case TipsType.TipsLackSpace: { FileInfo info = new FileInfo(this.strSrcPathCopy); length = info.Length; num2 = 0x400; str = this.strDestPathCopy.Substring(0, 2); DriveInfo info2 = new DriveInfo(str); availableFreeSpace = info2.AvailableFreeSpace; totalSize = info2.TotalSize; if (length >= (availableFreeSpace / 5L)) { break; } base.DialogResult = DialogResult.OK; return(false); } default: throw new Exception("TipsLackSpaceForm.Run传参错误"); } long num5 = availableFreeSpace / ((long)num2); totalSize /= (long)num2; long num6 = num5; string str2 = "KB"; if (num5 >= num2) { long num7 = num5 / ((long)num2); totalSize /= (long)num2; num6 = num7; str2 = "MB"; if (num7 >= num2) { long num8 = num7 / ((long)num2); totalSize /= (long)num2; num6 = num8; str2 = "GB"; if (num8 >= num2) { num6 = num8 / ((long)num2); totalSize /= (long)num2; str2 = "TB"; } } } string str3 = "数据库备份路径:" + this.strDestPathCopy + "\n"; string str4 = "数据库备份路径所在盘符:" + str + " 总大小:" + totalSize.ToString() + str2 + " 可用空间:" + num6.ToString() + str2 + "\n"; string str5 = "数据库文件大小:" + ((length / ((long)(num2 * num2)))).ToString() + "MB\n\n "; string str6 = "数据库文件大小已超过:" + str + "可用空间20%,是否继续备份数据?"; this.label1.Text = string.Empty; this.label1.Text = this.label1.Text + str3; this.label1.Text = this.label1.Text + str4; this.label1.Text = this.label1.Text + str5; this.label1.Text = this.label1.Text + str6; return(true); Label_0295: flag = false; } catch (BaseException exception) { this._Loger.Error(exception.Message); ExceptionHandler.HandleError(exception); flag = false; } catch (Exception exception2) { this._Loger.Error(exception2.Message); ExceptionHandler.HandleError(exception2); flag = false; } return(flag); }
/// <summary> /// 弹出框回调 /// </summary> void PaintTipsResponse() { TipsType type = PaintTips.GetInstance().PaintTipsType; switch (type) { case TipsType.DELETE: string delName = CheckDeleteOpetion(); //进行删除操作 if (delName != string.Empty) { print("name:" + delName); string imagFullPath = m_strSaveImagePath + delName; if (File.Exists(imagFullPath)) { File.Delete(imagFullPath); } InitSaveImageList(); //删除后重新设置背景 m_PaintPanel.GetComponent <Image>().sprite = m_CurrentBgSp; } break; case TipsType.SAVE: string texName = PaintTips.GetInstance().GetSaveName(); //判断名称是否为空 if (texName == string.Empty) { CommonMesTips.GetInstance().AlertTips("输入的名称不能为空!"); return; } //检测是否该文件是否已经存在 string tempPath = m_strSaveImagePath + texName + ".png"; //不能进行保存 if (File.Exists(tempPath)) { PaintTips.GetInstance().Show(TipsType.COVER); return; } else { StartCoroutine(CaptureByRect(new Rect(130, 0, Screen.width - 260, Screen.height), tempPath)); } break; //进行清空操作 case TipsType.CLEAN: m_BackBtn.interactable = false; for (int i = 0; i < m_LineHistoryObjList.Count; i++) { Destroy(m_LineHistoryObjList[i]); } m_LineHistoryObjList.RemoveRange(0, m_LineHistoryObjList.Count); break; case TipsType.COVER: string texName2 = PaintTips.GetInstance().GetSaveName(); //检测是否该文件是否已经存在 string tempPath2 = m_strSaveImagePath + texName2 + ".png"; StartCoroutine(CaptureByRect(new Rect(130, 0, 1074, 750), tempPath2)); break; default: break; } }