示例#1
0
        public bool Post(string operate, string ip, int port, int index)
        {
            try
            {
                if (index > 10 || index < 0)
                {
                    return(false);
                }

                AppFrame app = AppFrame.GetAppFrame();
                switch (operate.ToLower())
                {
                case "up":
                    return(!string.IsNullOrEmpty(app.SetUp("Web用户", ip: ip, port: port, index: index)));

                case "down":
                    return(!string.IsNullOrEmpty(app.SetDown("Web用户", ip: ip, port: port, index: index)));

                default:
                    return(false);
                }
            }
            catch (Exception)
            {
                return(false);
            }
        }