Пример #1
0
        public static UserProfileProxy GetUserProfileProxy(AuthUser user)
        {
            if (user == null)
            {
                return(null);
            }

            UserProfileProxy proxy = new UserProfileProxy();

            proxy.UserID          = user.UserID;
            proxy.Gender          = (int)user.Gender;
            proxy.GenderName      = user.GenderName;
            proxy.Birthday        = user.Birthday;
            proxy.TimeZone        = user.TimeZone;
            proxy.Signature       = user.Signature;
            proxy.SignatureFormat = (int)user.SignatureFormat;
            proxy.ExtendedFields  = new List <UserExtendedValueProxy>();

            foreach (UserExtendedValue item in user.ExtendedFields)
            {
                proxy.ExtendedFields.Add(GetUserExtendedValueProxy(item));
            }

            return(proxy);
        }
Пример #2
0
 public ChangePasswordViewModel(string username)
 {
     _username           = username;
     SavePasswordCommand = new DelegateCommand(async x => await SavePasswordAsync(x));
     _validator          = new UserCredentialsValidator();
     _loginService       = new LoginProxy();
     _profileProxy       = new UserProfileProxy();
 }
Пример #3
0
        private void InitializeUserProfile()
        {
#if UNITY_ANDROID
            m_GetUserHandler          = new GetUserResponseHandler();
            m_SetAnonUserHandler      = new SetAnonUserResponseHandler();
            m_CheckUserChangedHandler = new CheckUserChangedResponseHandler();

            m_UserProfileProxy = new UserProfileProxy();
#endif
        }
Пример #4
0
        public MyProfileViewModel()
        {
            _service    = new UserProfileProxy();
            ReloadData += async(x, e) => await LoadUserDataAsync();

            EditDataCommand       = new DelegateCommand(x => EditData());
            ChangePasswordCommand = new DelegateCommand(x => ChangePassword());
            ReloadData?.Invoke(this, EventArgs.Empty);
            (App.Current as App).Login += async(x, e) => await LoadUserDataAsync();
        }
Пример #5
0
 public EditUserDataViewModel(string username)
 {
     _username       = username;
     _service        = new UserProfileProxy();
     SaveDataCommand = new DelegateCommand(async x => await SaveDataAsync());
 }
Пример #6
0
        public override void Execute(int userID, DateTime instructDateTime, string datas)
        {
            UserProfileProxy proxy = DataReadWrap.Get <UserProfileProxy>(datas);

            UserBO.Instance.Client_UpdateUserProfile(proxy);
        }