示例#1
0
        /// <summary>
        /// 在线获取网游,渠道列表信息
        /// </summary>
        public static Dictionary <String, String> getChannelList(Cmd.Callback call = null)
        {
            string url = "http://netunion.joymeng.com/index.php?m=Api&c=PackTool&a=channelList";

            if (call != null)
            {
                call("【I】 联网获取渠道列表信息...\r\n" + url);
            }
            string str = WebSettings.getWebData(url);

            if (str.Equals(""))
            {
                if (call != null)
                {
                    call("【E】 联网获取渠道列表信息失败!请点击链接查看网络是否正常");
                }
                return(new Dictionary <string, string>());
            }
            else
            {
                channelList_Data iteam = channelList_Data.Parse(str);

                if (call != null)
                {
                    call("【I】 获取渠道列表信息完成");
                }

                return(iteam.data);
            }
        }
示例#2
0
        // "%~dp0Update.exe" "[CONFIG]https://git.oschina.net/joymeng/apkTool/raw/master/files/updateFiles.txt" "E:\tmp2\Update_Files\\" "渠道计费包\0000001\\"
        /// <summary>
        /// 调用Update.exe,更新以perfix为前缀的配置文件
        /// </summary>
        public static void updateFiles(string perfix)
        {
            string update_EXE = curDir() + "tools\\" + "Update.exe";
            //string url0 = "https://git.oschina.net/joymeng/apkTool/raw/master/files/updateFiles.txt";
            string url0 = Update.apkMd5Url;
            string url  = "[CONFIG]" + url0;
            string path = ToolSetting.Instance().serverRoot;

            // 设置"渠道计费包\0000001\\"为默认渠道配置
            string configInfo = WebSettings.getWebData(url0);    // 获取更新配置信息 示例:scimence( Name1(6JSO-F2CM-4LQJ-JN8P) )scimence

            if (configInfo.Equals(""))
            {
                return;
            }
            if (!configInfo.Contains(perfix) && !configInfo.Contains(perfix.Replace("\\", "/")))
            {
                perfix = @"渠道计费包/0000001/->" + perfix;
            }

            url        = AddQuotation(url);
            path       = AddQuotation(path);
            perfix     = AddQuotation(perfix);
            update_EXE = AddQuotation(update_EXE);

            // 调用更新插件执行软件更新逻辑
            String arg = url + " " + path + " " + perfix;

            System.Diagnostics.Process.Start(update_EXE, arg);
        }