Пример #1
0
        private bool method_6(out string string_0)
        {
            bool flag;

            string_0 = "";
            if (string.IsNullOrEmpty(this.txtGlsIp.Text.Trim()))
            {
                string_0 = "注册服务IP不能为空!";
                return(false);
            }
            if (string.IsNullOrEmpty(this.txtGlsPort.Text.Trim()))
            {
                string_0 = "注册服务端口不能为空!";
                return(false);
            }
            new IP();
            Port port = new Port();

            try
            {
                port.Check(this.txtGlsPort.Text.Trim());
                if (!string.IsNullOrEmpty(this.txtStandbyGlsPort.Text.Trim()))
                {
                    port.Check(this.txtStandbyGlsPort.Text.Trim());
                }
                return(true);
            }
            catch (Exception exception)
            {
                string_0 = "注册服务端口" + exception.Message;
                flag     = false;
            }
            return(flag);
        }
Пример #2
0
        private bool CheckPort(out string string_0)
        {
            bool flag;

            if (string.IsNullOrEmpty(this.txtPort1.Text.Trim()) && string.IsNullOrEmpty(this.txtPort2.Text.Trim()))
            {
                string_0 = "服务端端口不能全为空!";
                this.txtPort1.Focus();
                return(false);
            }
            if (this.txtPort1.Text.Trim().Equals(this.txtPort2.Text.Trim()))
            {
                string_0 = "服务端两端口不能一样!";
                this.txtPort1.Focus();
                return(false);
            }
            Port port = new Port();

            try
            {
                if (!string.IsNullOrEmpty(this.txtPort1.Text.Trim()))
                {
                    port.Check(this.txtPort1.Text.Trim());
                }
            }
            catch (Exception exception)
            {
                string_0 = "服务端端口," + exception.Message;
                return(false);
            }
            try
            {
                if (!string.IsNullOrEmpty(this.txtPort2.Text.Trim()))
                {
                    port.Check(this.txtPort2.Text.Trim());
                }
                string_0 = "";
                return(true);
            }
            catch (Exception exception2)
            {
                string_0 = "服务端端口," + exception2.Message;
                flag     = false;
            }
            return(flag);
        }
Пример #3
0
 private bool method_6(out string string_0)
 {
     bool flag;
     string_0 = "";
     if (string.IsNullOrEmpty(this.txtGlsIp.Text.Trim()))
     {
         string_0 = "注册服务IP不能为空!";
         return false;
     }
     if (string.IsNullOrEmpty(this.txtGlsPort.Text.Trim()))
     {
         string_0 = "注册服务端口不能为空!";
         return false;
     }
     new IP();
     Port port = new Port();
     try
     {
         port.Check(this.txtGlsPort.Text.Trim());
         if (!string.IsNullOrEmpty(this.txtStandbyGlsPort.Text.Trim()))
         {
             port.Check(this.txtStandbyGlsPort.Text.Trim());
         }
         return true;
     }
     catch (Exception exception)
     {
         string_0 = "注册服务端口" + exception.Message;
         flag = false;
     }
     return flag;
 }
Пример #4
0
 private bool CheckPort(out string string_0)
 {
     bool flag;
     if (string.IsNullOrEmpty(this.txtPort1.Text.Trim()) && string.IsNullOrEmpty(this.txtPort2.Text.Trim()))
     {
         string_0 = "服务端端口不能全为空!";
         this.txtPort1.Focus();
         return false;
     }
     if (this.txtPort1.Text.Trim().Equals(this.txtPort2.Text.Trim()))
     {
         string_0 = "服务端两端口不能一样!";
         this.txtPort1.Focus();
         return false;
     }
     Port port = new Port();
     try
     {
         if (!string.IsNullOrEmpty(this.txtPort1.Text.Trim()))
         {
             port.Check(this.txtPort1.Text.Trim());
         }
     }
     catch (Exception exception)
     {
         string_0 = "服务端端口," + exception.Message;
         return false;
     }
     try
     {
         if (!string.IsNullOrEmpty(this.txtPort2.Text.Trim()))
         {
             port.Check(this.txtPort2.Text.Trim());
         }
         string_0 = "";
         return true;
     }
     catch (Exception exception2)
     {
         string_0 = "服务端端口," + exception2.Message;
         flag = false;
     }
     return flag;
 }