Пример #1
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.SetPasswordWindow = ((WpfRegister.SetPassword)(target));
         return;
     }
     this._contentLoaded = true;
 }
Пример #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            UserRegister   ur     = new UserRegister(UserName, UserSurname, UserEmail, UserProfilePhoto, UserBornDate, UserCountry);
            JObject        json   = callSync(ur);
            RegisterResult result = json.ToObject <RegisterResult>(new Newtonsoft.Json.JsonSerializer());

            if (String.IsNullOrEmpty(result.TokenString))
            {
                string exception = json.ToObject <string>(new Newtonsoft.Json.JsonSerializer());
            }
            else
            {
                RunTimeVariables.TokenString = result.TokenString;
                RunTimeVariables.IdUser      = result.IdUser;
            }
            SetPassword password = new SetPassword();

            password.Show();
            Close();
        }