Beispiel #1
0
 public Register(int ordinal, string name, string altName, RegisterFormat format)
 {
     this.Ordinal = ordinal;
     this.Name    = name;
     this.AltName = altName;
     this.Format  = format;
 }
Beispiel #2
0
 public Register( int ordinal, string name, string altName, RegisterFormat format )
 {
     this.Ordinal = ordinal;
     this.Name = name;
     this.AltName = altName;
     this.Format = format;
 }
Beispiel #3
0
        public static async Task <bool> RegisterRequest(string email, string username, string password)
        {
            var data = new { email, username, password };

            // All checks have passed. Request the Level.
            try {
                // Run the Login Request
                Uri uri = new Uri(GameValues.CreoAPI + "register");
                HttpResponseMessage response = await WebHandler.PostJSON(uri, data);

                if (response == null || response.IsSuccessStatusCode == false)
                {
                    WebHandler.ResponseMessage = "No Response was provided.";
                    return(false);
                }

                // Extract the contents from the response.
                string contents = await response.Content.ReadAsStringAsync();

                RegisterFormat json = JsonConvert.DeserializeObject <RegisterFormat>(contents);

                if (json.success == false)
                {
                    if (json.reason is string)
                    {
                        WebHandler.ResponseMessage = json.reason;
                    }
                    return(false);
                }
                else
                {
                    WebHandler.ResponseMessage = "";
                }

                return(true);
            } catch (Exception ex) {
                return(false);
            }
        }
Beispiel #4
0
 public Register(int ordinal, string name, string altName, RegisterFormat format, bool readOnly)
     : this(ordinal, name, altName, format)
 {
     this.ReadOnly = readOnly;
 }
Beispiel #5
0
 public Register( int ordinal, string name, string altName, RegisterFormat format, bool readOnly )
     : this(ordinal, name, altName, format)
 {
     this.ReadOnly = readOnly;
 }