public ErrorCode UploadIntellect(byte[] intellect, string name, string description) { ErrorCode result; if (_loggedIn) { if (!((result = SecurityHandler.CheckUserIntellect(intellect)).Type == ErrorType.IllegalDll)) { if (Warehouse.UploadIntellect(_userID, name, intellect, description)) { return(new ErrorCode(ErrorType.Ok, "Intellect has been successfully uploaded.")); } else { return(new ErrorCode(ErrorType.BadFileName, "Inttellect with the same name is already existed")); } } else { return(result); } } else { return(new ErrorCode(ErrorType.NotLoggedIn, "Not logged in yet.")); } }