Ejemplo n.º 1
0
        static public string getTips()
        {
            if (TipsConfig.getInstance().getDataList().Count > 0)
            {
                int r = Common_Random.getRandom(1, TipsConfig.getInstance().getDataList().Count);
                return(TipsConfig.getInstance().getDataList()[r - 1]);
            }

            return("");
        }
Ejemplo n.º 2
0
        public async Task getAllData()
        {
            UINetLoadingComponent.showNetLoading();

            try
            {
                await HttpReqUtil.Req(NetConfig.getInstance().getWebUrl() + "files/tips.json", TipsConfig.getInstance().init);

                await HttpReqUtil.Req(NetConfig.getInstance().getWebUrl() + "files/prop.json", PropConfig.getInstance().init);

                await HttpReqUtil.Req(NetConfig.getInstance().getWebUrl() + "files/zhuanpan.json", ZhuanPanConfig.getInstance().init);

                await HttpReqUtil.Req(NetConfig.getInstance().getWebUrl() + "files/notice.json", NoticeConfig.getInstance().init);

                await HttpReqUtil.Req(NetConfig.getInstance().getWebUrl() + "files/friendRoomConfig.json", FriendRoomConfig.getInstance().init);

                //await SensitiveWordUtil.Req("http://fwdown.hy51v.com/online/file/stopwords.txt");

                string data = CommonUtil.getTextFileByBundle("config", "stopwords");
                SensitiveWordUtil.WordsDatas = data.Split(',');
            }
            catch (Exception ex)
            {
                Log.Error(ex);
            }

            UINetLoadingComponent.closeNetLoading();
        }