Exemplo n.º 1
0
        private void SetSignUpControl()
        {
            this.Title = "Регистрация";
            var control = new SignUpControl();

            control.RegisterEnded += OnRegisterEnded;
            MainControl.Content    = control;
        }
Exemplo n.º 2
0
        protected void Submit_Click(object sender, EventArgs e)
        {
            SignUpControl suControl = new SignUpControl();

            if (suControl.checkEmailAvailability(email.Text) > 0)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('El email ya se encuentra registrado!')", true);
            }
            else if (!suControl.checkPasswordEquality(firstPassword.Text, secondPassword.Text))
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Las contraseñas no coinciden!')", true);
            }
            else
            {
                Session["ClientID"] = suControl.saveToDB(fullName.Text, lastName.Text, secondLastName.Text, email.Text, adress.Text, firstPassword.Text);
            }
        }
Exemplo n.º 3
0
        internal void Navigate(ModesEnum mode)
        {
            switch (mode)
            {
            case ModesEnum.LogIn:
                _contentWindow.ContentControl.Content = _loginControl ?? (_loginControl = new LogInControl());
                break;

            case ModesEnum.TextEditor:
                _contentWindow.ContentControl.Content = _textEditorControl ?? (_textEditorControl = new TextEditorControl());
                break;

            case ModesEnum.SignUp:
                _contentWindow.ContentControl.Content = _signUpControl ?? (_signUpControl = new SignUpControl());
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(mode), mode, null);
            }
        }