Exemplo n.º 1
0
 void OnMouseUpAsButton()
 {
     userService = sp.BuildUserService();
     userService.CreateUser(userName, pwd, emailId, callBack);
     //ServicePointManager.ServerCertificateValidationCallback = Validator;
     Debug.Log("El Usuario ha sido creado.");
 }
 // Constructor
 public MainPage()
 {
     InitializeComponent();
     photoChooserTask            = new PhotoChooserTask();
     photoChooserTask.Completed += new EventHandler <PhotoResult>(photoChooserTask_Completed);
     uploadservice = serviceApi.BuildUploadService();
     userService   = serviceApi.BuildUserService();
 }
Exemplo n.º 3
0
    public void AsyncApp42Api()
    {
        ServiceAPI sp = new ServiceAPI("43f6b65747952492b5e30056ac9539ef7c50b44c4178e7c361cfa3b20ee52095", "e09348180158fb9304906d696dec68b3e2f074747a09ec93284271627f7c2599");

        this.userService    = sp.BuildUserService();
        this.storageService = sp.BuildStorageService();
        this.pushService    = sp.BuildPushNotificationService();
        this.socialService  = sp.BuildSocialService();
    }
 public static void App42Init(string apiKey , string secretKey)
 {
     sc_Listener_App42 = new SC_Listener_App42(); //initiate Listener with current GameLogic Script
     api = new ServiceAPI(apiKey, secretKey);
     userService = api.BuildUserService();
     Debug.Log("apiKey " + apiKey + Environment.NewLine + "secretKey " + secretKey);
     //    sessionService = api.BuildSessionService();
     //    Debug.Log(sessionService.GetSessionId());
 }
Exemplo n.º 5
0
    private void Initialize()
    {
        if (userService == null)
        {
            userService = serviceAPI.BuildUserService();
        }

        if (socialService == null)
        {
            socialService = serviceAPI.BuildSocialService();
        }
    }
Exemplo n.º 6
0
    void OnClick()
    {
        userName = name.text;
        pwd      = pass.value;
        if (trigger == Trigger.OnClick)
        {
            userService = sp.BuildUserService();
            userService.Authenticate(userName, pwd, callBack);

            //ServicePointManager.ServerCertificateValidationCallback = Validator;
            Debug.Log("El Usuario se ha logueado.");
            clabel.SetActive(true);
        }
    }
Exemplo n.º 7
0
 void OnClick()
 {
     if (trigger == Trigger.OnClick)
     {
         userName = name.text;
         //Debug.Log("pv "+passv.value);
         pwd = passv.value;
         //Debug.Log("pvs "+pwd );
         emailId     = mail.text;
         userService = sp.BuildUserService();
         userService.CreateUser(userName, pwd, emailId, callBack);
         //ServicePointManager.ServerCertificateValidationCallback = Validator;
         Debug.Log("El Usuario ha sido creado.");
         clabel.SetActive(true);
     }
 }
Exemplo n.º 8
0
    void OnGUI()
    {
        if (Time.time % 2 < 1)
        {
            success = callBack.getResult();
        }

        // For Setting Up ResponseBox.
        GUI.TextArea(new Rect(10, 5, 1300, 175), success);

        //=========================================================================
        if (GUI.Button(new Rect(50, 200, 200, 30), "All Games"))
        {
            string            gameName          = "3DSnake";
            ScoreBoardService scoreBoardService = sp.BuildScoreBoardService();
            //scoreBoardService.GetTopRankings(gameName, gameCallback);

            scoreBoardService.SaveUserScore(gameName, "raita", 1, gameCallback);

            //userService = sp.BuildUserService (); // Initializing UserService.
            //userService.CreateUser (cons.userName, password, cons.emailId, callBack);
        }

        //=========================================================================
        if (GUI.Button(new Rect(260, 200, 200, 30), "Get User"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.GetUser(cons.userName, callBack);
        }

        //=========================================================================
        if (GUI.Button(new Rect(470, 200, 200, 30), "Get All Users"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.GetAllUsers(callBack);
        }

        //=========================================================================
        if (GUI.Button(new Rect(680, 200, 200, 30), "Update Email"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.UpdateEmail(cons.userName, cons.emailId, callBack);
        }

        //=========================================================================
        if (GUI.Button(new Rect(890, 200, 200, 30), "Delete User"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.DeleteUser(cons.userName, callBack);
        }

        //=========================================================================
        if (GUI.Button(new Rect(50, 250, 200, 30), "Authenticate User"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.Authenticate(cons.userName, password, callBack);
        }

        //=========================================================================
        if (GUI.Button(new Rect(260, 250, 200, 30), "Change UserPassword"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.ChangeUserPassword(cons.userName, password, "newPassWord", callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(470, 250, 200, 30), "Lock User"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.LockUser(cons.userName, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(680, 250, 200, 30), "Unlock User"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.UnlockUser(cons.userName, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(890, 250, 200, 30), "Get LockedUsers"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.GetLockedUsers(callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(50, 300, 200, 30), "GetAllUsersByPaging"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.GetAllUsers(max, offSet, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(260, 300, 200, 30), "GetAllUsersCount"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.GetAllUsersCount(callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(680, 300, 200, 30), "ResetUserPassword"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.ResetUserPassword(cons.userName, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(890, 300, 200, 30), "Log out"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.Logout(cons.sessionId, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(50, 350, 200, 30), "GetLockedUsersCount"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.GetLockedUsersCount(callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(260, 350, 200, 30), "GetUserByEmailId"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.GetUserByEmailId(cons.updateEmailId, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(470, 350, 200, 30), "GetLockedUsersByPaging"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.
            userService.GetLockedUsers(max, offSet, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(680, 350, 200, 30), "CreateOrUpdateProfile"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.

            User.Profile profileObj = new User.Profile(createUserObj);
            profileObj.SetCountry("India");
            profileObj.SetCity("GGN");
            profileObj.SetFirstName("Akshay");
            profileObj.SetLastName("Mishra");
            profileObj.SetHomeLandLine("1234567890");
            profileObj.SetMobile("12345678900987654321");
            profileObj.SetOfficeLandLine("0987654321");
            profileObj.SetSex(UserGender.MALE);
            profileObj.SetState("UP");

            userService.CreateOrUpdateProfile(createUserObj, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(890, 350, 200, 30), "CreateUserWithRole"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.

            IList <string> roleList = new List <string>();
            roleList.Add("Admin");
            roleList.Add("Manager");
            roleList.Add("Programmer");
            roleList.Add("Tester");
            userService.CreateUser(cons.userName, password, cons.emailId, roleList, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(50, 400, 200, 30), "AssignRoles"))
        {
            userService = sp.BuildUserService();             // Initializing UserService.

            IList <string> roleList = new List <string>();
            roleList.Add("Designer");
            roleList.Add("Architect");

            userService.AssignRoles(cons.userName, roleList, callBack);
        }
    }
Exemplo n.º 9
0
    void OnGUI()
    {
        if (Time.time % 2 < 1)
        {
            success = callBack.getResult();
        }

        // For Setting Up ResponseBox.
        GUI.TextArea(new Rect(10, 5, 1300, 175), success);

        //=========================================================================
        if (GUI.Button(new Rect(50, 200, 200, 30), "Create User"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.CreateUser(cons.userName, password, cons.emailId, callBack);
        }

        //=========================================================================
        if (GUI.Button(new Rect(260, 200, 200, 30), "Get User"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.GetUser(cons.userName, callBack);
        }

        //=========================================================================
        if (GUI.Button(new Rect(470, 200, 200, 30), "Get All Users"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.GetAllUsers(callBack);
        }

        //=========================================================================
        if (GUI.Button(new Rect(680, 200, 200, 30), "Update Email"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.UpdateEmail(cons.userName, cons.updateEmailId, callBack);
        }

        //=========================================================================
        if (GUI.Button(new Rect(890, 200, 200, 30), "Delete User"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.DeleteUser(cons.userName, callBack);
        }

        //=========================================================================
        if (GUI.Button(new Rect(50, 250, 200, 30), "Authenticate User"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.Authenticate(cons.userName, password, callBack);
        }

        //=========================================================================
        if (GUI.Button(new Rect(260, 250, 200, 30), "Change UserPassword"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.ChangeUserPassword(cons.userName, password, "newPassWord", callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(470, 250, 200, 30), "Lock User"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.LockUser(cons.userName, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(680, 250, 200, 30), "Unlock User"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.UnlockUser(cons.userName, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(890, 250, 200, 30), "Get LockedUsers"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.GetLockedUsers(callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(50, 300, 200, 30), "GetAllUsersByPaging"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.GetAllUsers(max, offSet, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(260, 300, 200, 30), "GetAllUsersCount"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.GetAllUsersCount(callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(680, 300, 200, 30), "ResetUserPassword"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.ResetUserPassword(cons.userName, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(890, 300, 200, 30), "Log out"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.Logout(cons.sessionId, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(50, 350, 200, 30), "GetLockedUsersCount"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.GetLockedUsersCount(callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(260, 350, 200, 30), "GetUserByEmailId"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.GetUserByEmailId(cons.updateEmailId, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(470, 350, 200, 30), "GetLockedUsersByPaging"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            userService.GetLockedUsers(max, offSet, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(890, 350, 200, 30), "CreateUserWithRole"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.

            IList <string> roleList = new List <string> ();
            roleList.Add("Admin");
            roleList.Add("Manager");
            roleList.Add("Programmer");
            roleList.Add("Tester");
            userService.CreateUser(cons.userName, password, cons.emailId, roleList, callBack);
        }

        //===================================###################=========================================
        if (GUI.Button(new Rect(50, 400, 200, 30), "AssignRoles"))
        {
            userService = sp.BuildUserService();                                      // Initializing UserService.
            IList <string> roleList = new List <string> ();
            roleList.Add("Designer");
            roleList.Add("Architect");
            userService.AssignRoles(cons.userName, roleList, callBack);
        }
    }