Exemple #1
0
        private bool HasServerSettings()
        {
            bool flag = true;


            if (!IPUtils.IPValidateIPv4(this.txtSetupServerIP.Text) /*|| IPUtils.IPValidateIPv4(this.txtServerIP.Text)*/)
            {
                this.WriteToLogPanel("Invalid IP address");
                flag = false;
            }

            int num2 = 0;

            if (!int.TryParse(this.txtSetupServerPort.Text, out num2) || num2 <= 0 || num2 >= 65535)
            {
                this.WriteToLogPanel("Invalid port");
                flag = false;
            }
            int num3 = 0;
            //if (!int.TryParse(this.txtServerLocale.Text, out num3) || num3 <= 0) {
            //    this.WriteToLogPanel("Invalid locale");
            //    flag = false;
            //}
            //int num4 = 0;
            //if (!int.TryParse(this.txtServerVersion.Text, out num4) || num4 <= 0) {
            //    this.WriteToLogPanel("Invalid version");
            //    flag = false;
            //}
            int num5 = 0;

            if (!int.TryParse(this.txtSetupServerIP.Text, out num5) || num5 <= 0)
            {
                this.WriteToLogPanel("Invalid shard id");
                flag = false;
            }

            if (!cbSetupServerReady.Checked)
            {
                this.WriteToLogPanel("Check ready");
                flag = false;
            }

            return(flag);
        }